mirror of
https://github.com/holub/mame
synced 2025-04-16 05:24:54 +03:00
kp64.cpp: Better workaround
This commit is contained in:
parent
32c507d34d
commit
b1a3c44e47
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user