diff options
Diffstat (limited to 'src/mame/drivers/lastduel.c')
-rw-r--r-- | src/mame/drivers/lastduel.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/src/mame/drivers/lastduel.c b/src/mame/drivers/lastduel.c index 489d8f5b4a9..4c72da53a7b 100644 --- a/src/mame/drivers/lastduel.c +++ b/src/mame/drivers/lastduel.c @@ -109,18 +109,16 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_readmem, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0000, 0xdfff) AM_READ(SMH_ROM) AM_RANGE(0xe000, 0xe7ff) AM_READ(SMH_RAM) - AM_RANGE(0xe800, 0xe800) AM_READ(ym2203_status_port_0_r) - AM_RANGE(0xf000, 0xf000) AM_READ(ym2203_status_port_1_r) + AM_RANGE(0xe800, 0xe801) AM_DEVREAD(SOUND, "ym1", ym2203_r) + AM_RANGE(0xf000, 0xf001) AM_DEVREAD(SOUND, "ym2", ym2203_r) AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_r) ADDRESS_MAP_END static ADDRESS_MAP_START( sound_writemem, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0000, 0xdfff) AM_WRITE(SMH_ROM) AM_RANGE(0xe000, 0xe7ff) AM_WRITE(SMH_RAM) - AM_RANGE(0xe800, 0xe800) AM_WRITE(ym2203_control_port_0_w) - AM_RANGE(0xe801, 0xe801) AM_WRITE(ym2203_write_port_0_w) - AM_RANGE(0xf000, 0xf000) AM_WRITE(ym2203_control_port_1_w) - AM_RANGE(0xf001, 0xf001) AM_WRITE(ym2203_write_port_1_w) + AM_RANGE(0xe800, 0xe801) AM_DEVWRITE(SOUND, "ym1", ym2203_w) + AM_RANGE(0xf000, 0xf001) AM_DEVWRITE(SOUND, "ym2", ym2203_w) ADDRESS_MAP_END static WRITE8_HANDLER( mg_bankswitch_w ) @@ -136,19 +134,17 @@ static ADDRESS_MAP_START( mg_sound_readmem, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0000, 0x7fff) AM_READ(SMH_ROM) AM_RANGE(0x8000, 0xcfff) AM_READ(SMH_BANK3) AM_RANGE(0xd000, 0xd7ff) AM_READ(SMH_RAM) - AM_RANGE(0xf000, 0xf000) AM_READ(ym2203_status_port_0_r) - AM_RANGE(0xf002, 0xf002) AM_READ(ym2203_status_port_1_r) + AM_RANGE(0xf000, 0xf001) AM_DEVREAD(SOUND, "ym1", ym2203_r) + AM_RANGE(0xf002, 0xf003) AM_DEVREAD(SOUND, "ym2", ym2203_r) AM_RANGE(0xf006, 0xf006) AM_READ(soundlatch_r) ADDRESS_MAP_END static ADDRESS_MAP_START( mg_sound_writemem, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0000, 0xcfff) AM_WRITE(SMH_ROM) AM_RANGE(0xd000, 0xd7ff) AM_WRITE(SMH_RAM) - AM_RANGE(0xf000, 0xf000) AM_WRITE(ym2203_control_port_0_w) - AM_RANGE(0xf001, 0xf001) AM_WRITE(ym2203_write_port_0_w) - AM_RANGE(0xf002, 0xf002) AM_WRITE(ym2203_control_port_1_w) - AM_RANGE(0xf003, 0xf003) AM_WRITE(ym2203_write_port_1_w) - AM_RANGE(0xf004, 0xf004) AM_WRITE(okim6295_data_0_w) + AM_RANGE(0xf000, 0xf001) AM_DEVWRITE(SOUND, "ym1", ym2203_w) + AM_RANGE(0xf002, 0xf003) AM_DEVWRITE(SOUND, "ym2", ym2203_w) + AM_RANGE(0xf004, 0xf004) AM_DEVWRITE(SOUND, "oki", okim6295_w) AM_RANGE(0xf00a, 0xf00a) AM_WRITE(mg_bankswitch_w) ADDRESS_MAP_END @@ -234,9 +230,9 @@ GFXDECODE_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],0,irq ? ASSERT_LINE : CLEAR_LINE); + cpu_set_input_line(device->machine->cpu[1],0,irq ? ASSERT_LINE : CLEAR_LINE); } static const ym2203_interface ym2203_config = @@ -244,7 +240,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 }; |