diff options
Diffstat (limited to 'src/mame/drivers/moo.c')
-rw-r--r-- | src/mame/drivers/moo.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/mame/drivers/moo.c b/src/mame/drivers/moo.c index 4e857bf98a9..b919e23cca5 100644 --- a/src/mame/drivers/moo.c +++ b/src/mame/drivers/moo.c @@ -125,32 +125,30 @@ static TIMER_CALLBACK( dmaend_callback ) state->m_maincpu->set_input_line(4, HOLD_LINE); } -static INTERRUPT_GEN( moo_interrupt ) +INTERRUPT_GEN_MEMBER(moo_state::moo_interrupt) { - moo_state *state = device->machine().driver_data<moo_state>(); - if (k053246_is_irq_enabled(state->m_k053246)) + if (k053246_is_irq_enabled(m_k053246)) { - moo_objdma(device->machine(), state->m_game_type); + moo_objdma(machine(), m_game_type); // schedule DMA end interrupt (delay shortened to catch up with V-blank) - state->m_dmaend_timer->adjust(attotime::from_usec(MOO_DMADELAY)); + m_dmaend_timer->adjust(attotime::from_usec(MOO_DMADELAY)); } // trigger V-blank interrupt - if (state->m_cur_control2 & 0x20) - device->execute().set_input_line(5, HOLD_LINE); + if (m_cur_control2 & 0x20) + device.execute().set_input_line(5, HOLD_LINE); } -static INTERRUPT_GEN( moobl_interrupt ) +INTERRUPT_GEN_MEMBER(moo_state::moobl_interrupt) { - moo_state *state = device->machine().driver_data<moo_state>(); - moo_objdma(device->machine(), state->m_game_type); + moo_objdma(machine(), m_game_type); // schedule DMA end interrupt (delay shortened to catch up with V-blank) - state->m_dmaend_timer->adjust(attotime::from_usec(MOO_DMADELAY)); + m_dmaend_timer->adjust(attotime::from_usec(MOO_DMADELAY)); // trigger V-blank interrupt - device->execute().set_input_line(5, HOLD_LINE); + device.execute().set_input_line(5, HOLD_LINE); } WRITE16_MEMBER(moo_state::sound_cmd1_w) @@ -515,7 +513,7 @@ static MACHINE_CONFIG_START( moo, moo_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16000000) MCFG_CPU_PROGRAM_MAP(moo_map) - MCFG_CPU_VBLANK_INT("screen", moo_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", moo_state, moo_interrupt) MCFG_CPU_ADD("soundcpu", Z80, 8000000) MCFG_CPU_PROGRAM_MAP(sound_map) @@ -563,7 +561,7 @@ static MACHINE_CONFIG_START( moobl, moo_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 16100000) MCFG_CPU_PROGRAM_MAP(moobl_map) - MCFG_CPU_VBLANK_INT("screen", moobl_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", moo_state, moobl_interrupt) MCFG_MACHINE_START_OVERRIDE(moo_state,moo) MCFG_MACHINE_RESET_OVERRIDE(moo_state,moo) |