summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/goal92.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/goal92.c')
-rw-r--r--src/mame/drivers/goal92.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/mame/drivers/goal92.c b/src/mame/drivers/goal92.c
index 868058f4869..3775c483246 100644
--- a/src/mame/drivers/goal92.c
+++ b/src/mame/drivers/goal92.c
@@ -86,16 +86,16 @@ ADDRESS_MAP_END
/* Sound CPU */
-static WRITE8_HANDLER( adpcm_control_w )
+static WRITE8_DEVICE_HANDLER( adpcm_control_w )
{
int bankaddress;
- UINT8 *RAM = memory_region(space->machine, "audio");
+ UINT8 *RAM = memory_region(device->machine, "audio");
/* the code writes either 2 or 3 in the bottom two bits */
bankaddress = 0x10000 + (data & 0x01) * 0x4000;
- memory_set_bankptr(space->machine, 1,&RAM[bankaddress]);
+ memory_set_bankptr(device->machine, 1,&RAM[bankaddress]);
- msm5205_reset_w(0,data & 0x08);
+ msm5205_reset_w(device,data & 0x08);
}
static WRITE8_HANDLER( adpcm_data_w )
@@ -106,12 +106,10 @@ static WRITE8_HANDLER( adpcm_data_w )
static ADDRESS_MAP_START( sound_cpu, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x7fff) AM_ROM
AM_RANGE(0x8000, 0xbfff) AM_ROMBANK(1)
- AM_RANGE(0xe000, 0xe000) AM_WRITE(adpcm_control_w)
+ AM_RANGE(0xe000, 0xe000) AM_DEVWRITE(SOUND, "msm", adpcm_control_w)
AM_RANGE(0xe400, 0xe400) AM_WRITE(adpcm_data_w)
- AM_RANGE(0xe800, 0xe800) AM_READWRITE(ym2203_status_port_0_r, ym2203_control_port_0_w)
- AM_RANGE(0xe801, 0xe801) AM_READWRITE(ym2203_read_port_0_r, ym2203_write_port_0_w)
- AM_RANGE(0xec00, 0xec00) AM_READWRITE(ym2203_status_port_1_r, ym2203_control_port_1_w)
- AM_RANGE(0xec01, 0xec01) AM_READWRITE(ym2203_read_port_1_r, ym2203_write_port_1_w)
+ AM_RANGE(0xe800, 0xe801) AM_DEVREADWRITE(SOUND, "ym1", ym2203_r, ym2203_w)
+ AM_RANGE(0xec00, 0xec01) AM_DEVREADWRITE(SOUND, "ym2", ym2203_r, ym2203_w)
AM_RANGE(0xf000, 0xf7ff) AM_RAM
AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_r)
ADDRESS_MAP_END
@@ -234,9 +232,9 @@ static INPUT_PORTS_START( goal92 )
INPUT_PORTS_END
/* handler called by the 2203 emulator when the internal timers cause an IRQ */
-static void irqhandler(running_machine *machine, int irq)
+static void irqhandler(const device_config *device, int irq)
{
- cpu_set_input_line(machine->cpu[1], INPUT_LINE_NMI, irq ? ASSERT_LINE : CLEAR_LINE);
+ cpu_set_input_line(device->machine->cpu[1], INPUT_LINE_NMI, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2203_interface ym2203_config =
@@ -244,7 +242,7 @@ static const ym2203_interface ym2203_config =
{
AY8910_LEGACY_OUTPUT,
AY8910_DEFAULT_LOADS,
- NULL, NULL, NULL, NULL
+ DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
},
irqhandler
};
@@ -253,7 +251,7 @@ static void goal92_adpcm_int(const device_config *device)
{
static int toggle = 0;
- msm5205_data_w (0,msm5205next);
+ msm5205_data_w (device,msm5205next);
msm5205next>>=4;
toggle ^= 1;