summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2022-06-16 11:11:17 +0200
committer Olivier Galibert <galibert@pobox.com>2022-06-16 11:12:03 +0200
commit9305f188a507e84723dc40ccfa4a6ba5ee5d76eb (patch)
treea6decea00d1778573f788f54faa3ec02d0c90f09
parent184259c82d21e6a2fa85dbde1c1a13def09b4154 (diff)
hng64/kp64: two 6.25MHz timers are not a good idea. Hack them out for now, someone interested can try to understand what's really going on
-rw-r--r--src/devices/cpu/z80/kp64.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/devices/cpu/z80/kp64.cpp b/src/devices/cpu/z80/kp64.cpp
index f1e419e7286..aac78425951 100644
--- a/src/devices/cpu/z80/kp64.cpp
+++ b/src/devices/cpu/z80/kp64.cpp
@@ -189,8 +189,12 @@ u16 kp64_device::count_value() const noexcept
void kp64_device::reload_count()
{
m_count = BIT(m_status, 5) ? 0xffff : m_cr;
- if (BIT(m_status, 0))
+ if (BIT(m_status, 0)) {
+ if(m_cr == 0)
+ m_cr = 0xffff;
+
m_count_timer->adjust(clocks_to_attotime(u32(m_count) + 1));
+ }
// Count is now started whether or not it was before
m_reload = false;