diff options
Diffstat (limited to 'src/mame/drivers/taotaido.c')
-rw-r--r-- | src/mame/drivers/taotaido.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/src/mame/drivers/taotaido.c b/src/mame/drivers/taotaido.c index cf1b2f0a20f..176b0d3bf13 100644 --- a/src/mame/drivers/taotaido.c +++ b/src/mame/drivers/taotaido.c @@ -72,21 +72,19 @@ zooming might be wrong #define TAOTAIDO_SHOW_ALL_INPUTS 0 -static READ16_HANDLER( pending_command_r ) +READ16_MEMBER(taotaido_state::pending_command_r) { - taotaido_state *state = space->machine().driver_data<taotaido_state>(); /* Only bit 0 is tested */ - return state->m_pending_command; + return m_pending_command; } -static WRITE16_HANDLER( sound_command_w ) +WRITE16_MEMBER(taotaido_state::sound_command_w) { - taotaido_state *state = space->machine().driver_data<taotaido_state>(); if (ACCESSING_BITS_0_7) { - state->m_pending_command = 1; + m_pending_command = 1; soundlatch_w(space, offset, data & 0xff); - cputag_set_input_line(space->machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); + cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } } static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, taotaido_state ) @@ -111,24 +109,23 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, taotaido_state ) AM_RANGE(0xffff10, 0xffff11) AM_WRITENOP // unknown AM_RANGE(0xffff20, 0xffff21) AM_WRITENOP // unknown - flip screen related AM_RANGE(0xffff40, 0xffff47) AM_WRITE_LEGACY(taotaido_sprite_character_bank_select_w) - AM_RANGE(0xffffc0, 0xffffc1) AM_WRITE_LEGACY(sound_command_w) // seems right - AM_RANGE(0xffffe0, 0xffffe1) AM_READ_LEGACY(pending_command_r) // guess - seems to be needed for all the sounds to work + AM_RANGE(0xffffc0, 0xffffc1) AM_WRITE(sound_command_w) // seems right + AM_RANGE(0xffffe0, 0xffffe1) AM_READ(pending_command_r) // guess - seems to be needed for all the sounds to work ADDRESS_MAP_END /* sound cpu - same as aerofgt */ -static WRITE8_HANDLER( pending_command_clear_w ) +WRITE8_MEMBER(taotaido_state::pending_command_clear_w) { - taotaido_state *state = space->machine().driver_data<taotaido_state>(); - state->m_pending_command = 0; + m_pending_command = 0; } -static WRITE8_HANDLER( taotaido_sh_bankswitch_w ) +WRITE8_MEMBER(taotaido_state::taotaido_sh_bankswitch_w) { - UINT8 *rom = space->machine().region("audiocpu")->base() + 0x10000; + UINT8 *rom = machine().region("audiocpu")->base() + 0x10000; - memory_set_bankptr(space->machine(), "bank1",rom + (data & 0x03) * 0x8000); + memory_set_bankptr(machine(), "bank1",rom + (data & 0x03) * 0x8000); } static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, taotaido_state ) @@ -140,8 +137,8 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_port_map, AS_IO, 8, taotaido_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x03) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w) - AM_RANGE(0x04, 0x04) AM_WRITE_LEGACY(taotaido_sh_bankswitch_w) - AM_RANGE(0x08, 0x08) AM_WRITE_LEGACY(pending_command_clear_w) + AM_RANGE(0x04, 0x04) AM_WRITE(taotaido_sh_bankswitch_w) + AM_RANGE(0x08, 0x08) AM_WRITE(pending_command_clear_w) AM_RANGE(0x0c, 0x0c) AM_READ_LEGACY(soundlatch_r) ADDRESS_MAP_END |