diff options
author | fulivi <fulivi@users.noreply.github.com> | 2020-07-05 17:37:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-05 11:37:35 -0400 |
commit | 625339d7ab035c452b346f8a69d156926ee8a40b (patch) | |
tree | 8f9d72a00a7df63541c52e723cc2996916ee5bc9 | |
parent | e91cc18ec033bf361fa4b118ea62b52ea9748a71 (diff) |
hp_ipc: fixed timer reloading in COP452 (#6914)
-rw-r--r-- | src/devices/machine/cop452.cpp | 7 |
1 files changed, 1 insertions, 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 |