summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/brkthru.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2009-02-11 19:48:39 +0000
committer Aaron Giles <aaron@aarongiles.com>2009-02-11 19:48:39 +0000
commit5cb6bf00e90dd0e836bcabf7d5a8a2bdbf941767 (patch)
treef0fd5a55acb6b6592a5be0fd9c766aed1a695c88 /src/mame/drivers/brkthru.c
parent1420ed893ae8344144582793cdcc1a0eafda4610 (diff)
Ok, this is The Big One.
Please note: regression testing is in progress, but the first round of glaring regressions have already been taken care of. That said, there is likely to be a host of regressions as a result of this change. Also note: There are still a few rough edges in the interfaces. I will try to clean them up systematically once the basic system is working. All sound chips are now proper devices. Merged the sound chip interface into the device interface, removing any differences (such as the whole ALIASing concept). Modified every sound chip in the following ways: * updated to match the device interface * reduced read/write handlers down to the minimal number * added the use of get_safe_token() for ensuring correctness * other minor cleanup Removed the custom sound device. The additional work to just make custom sound cases into full devices is minimal, so I just converted them all over to be actual devices. Vastly simplified the sound interfaces, removing the ghastly sndti_* business and moving everyone over to using tags for sound identity. sndintrf, like cpuintrf, is now just a header file with no implementation. Modified each and every driver that references a sound chip: * all memory maps explicitly reference the targeted device via AM_DEVREAD/AM_DEVWRITE/AM_DEVREADWRITE * 16-bit and 32-bit accesses to 8-bit chips no longer use trampoline functions but instead use the 8-bit AM_DEVREAD/WRITE macros * all references to sound chips are now done via tags * note that these changes are brute force, not optimal; in many cases drivers should grab pointers to devices in MACHINE_START and stash them away
Diffstat (limited to 'src/mame/drivers/brkthru.c')
-rw-r--r--src/mame/drivers/brkthru.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/mame/drivers/brkthru.c b/src/mame/drivers/brkthru.c
index b2c41f56b40..b6320e2f34e 100644
--- a/src/mame/drivers/brkthru.c
+++ b/src/mame/drivers/brkthru.c
@@ -51,7 +51,7 @@ Dip locations verified with manual for brkthru (US conv. kit) and darwin
#include "driver.h"
#include "cpu/m6809/m6809.h"
#include "sound/2203intf.h"
-#include "sound/3812intf.h"
+#include "sound/3526intf.h"
#define MASTER_CLOCK XTAL_12MHz
@@ -138,12 +138,9 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x1fff) AM_RAM
- AM_RANGE(0x2000, 0x2000) AM_WRITE(ym3526_control_port_0_w)
- AM_RANGE(0x2001, 0x2001) AM_WRITE(ym3526_write_port_0_w)
+ AM_RANGE(0x2000, 0x2001) AM_DEVWRITE(SOUND, "ym2", ym3526_w)
AM_RANGE(0x4000, 0x4000) AM_READ(soundlatch_r)
- AM_RANGE(0x6000, 0x6000) AM_READ(ym2203_status_port_0_r)
- AM_RANGE(0x6000, 0x6000) AM_WRITE(ym2203_control_port_0_w)
- AM_RANGE(0x6001, 0x6001) AM_WRITE(ym2203_write_port_0_w)
+ AM_RANGE(0x6000, 0x6001) AM_DEVREADWRITE(SOUND, "ym1", ym2203_r, ym2203_w)
AM_RANGE(0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END
@@ -325,9 +322,9 @@ static GFXDECODE_START( brkthru )
GFXDECODE_END
/* handler called by the 3812 emulator when the internal timers cause an IRQ */
-static void irqhandler(running_machine *machine, int linestate)
+static void irqhandler(const device_config *device, int linestate)
{
- cpu_set_input_line(machine->cpu[1],M6809_IRQ_LINE,linestate);
+ cpu_set_input_line(device->machine->cpu[1],M6809_IRQ_LINE,linestate);
}
static const ym3526_interface ym3526_config =