diff options
author | Andrew Gardner <andrew-gardner@users.noreply.github.com> | 2013-05-15 07:10:37 +0000 |
---|---|---|
committer | Andrew Gardner <andrew-gardner@users.noreply.github.com> | 2013-05-15 07:10:37 +0000 |
commit | 0d2eb770265c85a5b829f26bbb759e8514167ea3 (patch) | |
tree | efadccb1c6d15c7c6ea7fa4a8191d4af3d15d845 /src/mame/drivers/m10.c | |
parent | d1ef4803722799d1bd4e32bf85a912e1eddd5a1a (diff) |
Eliminate some of MAME's anonymous timers. [Andrew Gardner]
Diffstat (limited to 'src/mame/drivers/m10.c')
-rw-r--r-- | src/mame/drivers/m10.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/mame/drivers/m10.c b/src/mame/drivers/m10.c index 4d4ca8b518f..3ee44b89a43 100644 --- a/src/mame/drivers/m10.c +++ b/src/mame/drivers/m10.c @@ -499,23 +499,34 @@ TIMER_CALLBACK_MEMBER(m10_state::interrupt_callback) if (param == 0) { m_maincpu->set_input_line(0, ASSERT_LINE); - machine().scheduler().timer_set(machine().primary_screen->time_until_pos(IREMM10_VBSTART + 16), timer_expired_delegate(FUNC(m10_state::interrupt_callback),this), 1); + timer_set(machine().primary_screen->time_until_pos(IREMM10_VBSTART + 16), TIMER_INTERRUPT, 1); } if (param == 1) { m_maincpu->set_input_line(0, ASSERT_LINE); - machine().scheduler().timer_set(machine().primary_screen->time_until_pos(IREMM10_VBSTART + 24), timer_expired_delegate(FUNC(m10_state::interrupt_callback),this), 2); + timer_set(machine().primary_screen->time_until_pos(IREMM10_VBSTART + 24), TIMER_INTERRUPT, 2); } if (param == -1) m_maincpu->set_input_line(0, CLEAR_LINE); +} +void m10_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +{ + switch (id) + { + case TIMER_INTERRUPT: + interrupt_callback(ptr, param); + break; + default: + assert_always(FALSE, "Unknown id in m10_state::device_timer"); + } } #if 0 INTERRUPT_GEN_MEMBER(m10_state::m11_interrupt) { device.execute().set_input_line(0, ASSERT_LINE); - //machine().scheduler().timer_set(machine.primary_screen->time_until_pos(IREMM10_VBEND), timer_expired_delegate(FUNC(m10_state::interrupt_callback),this), -1); + //timer_set(machine.primary_screen->time_until_pos(IREMM10_VBEND), TIMER_INTERRUPT, -1); } INTERRUPT_GEN_MEMBER(m10_state::m10_interrupt) @@ -527,7 +538,7 @@ INTERRUPT_GEN_MEMBER(m10_state::m10_interrupt) INTERRUPT_GEN_MEMBER(m10_state::m15_interrupt) { device.execute().set_input_line(0, ASSERT_LINE); - machine().scheduler().timer_set(machine().primary_screen->time_until_pos(IREMM10_VBSTART + 1, 80), timer_expired_delegate(FUNC(m10_state::interrupt_callback),this), -1); + timer_set(machine().primary_screen->time_until_pos(IREMM10_VBSTART + 1, 80), TIMER_INTERRUPT, -1); } /************************************* |