summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/z80/kp64.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/z80/kp64.cpp')
-rw-r--r--src/devices/cpu/z80/kp64.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/devices/cpu/z80/kp64.cpp b/src/devices/cpu/z80/kp64.cpp
index aac78425951..697ed65268a 100644
--- a/src/devices/cpu/z80/kp64.cpp
+++ b/src/devices/cpu/z80/kp64.cpp
@@ -189,11 +189,13 @@ 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(m_cr == 0)
- m_cr = 0xffff;
-
- m_count_timer->adjust(clocks_to_attotime(u32(m_count) + 1));
+ if (BIT(m_status, 0))
+ {
+ // hng64 network MCU configures this supposedly invalid value and thrashes the scheduler if the timer is enabled
+ if (m_count == 0)
+ logerror("%s: Zero reload value specified for timer\n", machine().describe_context());
+ else
+ m_count_timer->adjust(clocks_to_attotime(u32(m_count) + 1));
}
// Count is now started whether or not it was before