From 625339d7ab035c452b346f8a69d156926ee8a40b Mon Sep 17 00:00:00 2001 From: fulivi Date: Sun, 5 Jul 2020 17:37:35 +0200 Subject: hp_ipc: fixed timer reloading in COP452 (#6914) --- src/devices/machine/cop452.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/devices/machine/cop452.cpp b/src/devices/machine/cop452.cpp index e70cf1db868..09e31df2c82 100644 --- a/src/devices/machine/cop452.cpp +++ b/src/devices/machine/cop452.cpp @@ -180,12 +180,9 @@ void cop452_device::device_reset() void cop452_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) { - attotime target = attotime::never; - switch (m_mode) { case MODE_DUAL_FREQ: toggle_n_reload(id); - target = counts_to_attotime(m_cnt[ id ]); break; case MODE_TRIG_PULSE: @@ -195,7 +192,6 @@ void cop452_device::device_timer(emu_timer &timer, device_timer_id id, int param case MODE_NUMBER_PULSES: if (id == 0) { toggle_n_reload(0); - target = counts_to_attotime(m_cnt[ 0 ]); if (!m_out[ 0 ]) { // It seems that cnt B decrements each time OA goes low if (m_cnt[ 1 ] != 0) { @@ -204,7 +200,6 @@ void cop452_device::device_timer(emu_timer &timer, device_timer_id id, int param // End of pulse train toggle_n_reload(1); m_mode = MODE_RESET; - target = attotime::never; } } } @@ -256,7 +251,7 @@ void cop452_device::device_timer(emu_timer &timer, device_timer_id id, int param break; } - timer.adjust(target); + set_timer(id); } attotime cop452_device::counts_to_attotime(unsigned counts) const -- cgit v1.2.3