summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/tmnt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/tmnt.cpp')
-rw-r--r--src/mame/drivers/tmnt.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/mame/drivers/tmnt.cpp b/src/mame/drivers/tmnt.cpp
index b8c07eb9167..e43c6b68593 100644
--- a/src/mame/drivers/tmnt.cpp
+++ b/src/mame/drivers/tmnt.cpp
@@ -337,23 +337,16 @@ void tmnt_state::sound_nmi_callback( int param )
}
#endif
-void tmnt_state::device_timer(emu_timer &timer, device_timer_id id, int param)
+TIMER_CALLBACK_MEMBER(tmnt_state::audio_nmi)
{
- switch (id)
- {
- case TIMER_NMI:
- m_audiocpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
- break;
- default:
- throw emu_fatalerror("Unknown id in tmnt_state::device_timer");
- }
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
void tmnt_state::sound_arm_nmi_w(uint8_t data)
{
// sound_nmi_enabled = 1;
m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
- timer_set(attotime::from_usec(50), TIMER_NMI); /* kludge until the K053260 is emulated correctly */
+ m_audio_nmi_timer->adjust(attotime::from_usec(50)); /* kludge until the K053260 is emulated correctly */
}
@@ -2000,6 +1993,8 @@ void tmnt_state::machine_start()
save_item(NAME(m_layerpri));
save_item(NAME(m_sorted_layer));
save_item(NAME(m_irq5_mask));
+
+ m_audio_nmi_timer = timer_alloc(FUNC(tmnt_state::audio_nmi), this);
}
MACHINE_RESET_MEMBER(tmnt_state,common)
@@ -2008,6 +2003,7 @@ MACHINE_RESET_MEMBER(tmnt_state,common)
m_last = 0;
m_tmnt_soundlatch = 0;
m_irq5_mask = 0;
+ m_audio_nmi_timer->adjust(attotime::never);
}
void tmnt_state::cuebrick(machine_config &config)