summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/cop452.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/cop452.cpp')
-rw-r--r--src/devices/machine/cop452.cpp7
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