summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2024-09-14 09:01:46 +0200
committer Olivier Galibert <galibert@pobox.com>2024-09-14 09:52:48 +0200
commitf460c1e4b64d48d9e95252db6a7d96498c969daf (patch)
treed7126196dac0083b36238e273c737e802067594b /src/devices
parentb4a5e3fd28c2b702e000b622898cacc3496bde38 (diff)
sh: mtu fix
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/cpu/sh/sh_mtu.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/devices/cpu/sh/sh_mtu.cpp b/src/devices/cpu/sh/sh_mtu.cpp
index 2b612bd12b4..f11df8381e3 100644
--- a/src/devices/cpu/sh/sh_mtu.cpp
+++ b/src/devices/cpu/sh/sh_mtu.cpp
@@ -216,7 +216,7 @@ void sh_mtu_channel_device::device_reset()
m_last_clock_update = 0;
m_event_time = 0;
m_phase = 0;
- m_counter_cycle = 0;
+ m_counter_cycle = 1;
m_counter_incrementing = true;
}
@@ -419,7 +419,7 @@ void sh_mtu_channel_device::recalc_event(u64 cur_time)
}
if(!cur_time)
- cur_time = m_cpu->total_cycles();
+ cur_time = m_cpu->current_cycles();
if(m_counter_incrementing) {
u32 event_delay = 0xffffffff;
@@ -466,7 +466,7 @@ void sh_mtu_channel_device::update_counter(u64 cur_time)
return;
if(!cur_time)
- cur_time = m_cpu->total_cycles();
+ cur_time = m_cpu->current_cycles();
if(!m_channel_active) {
m_last_clock_update = cur_time;