mirror of
https://github.com/holub/mame
synced 2025-07-01 08:18:59 +03:00
pit8253: prevent elapsed_cycles from going negative
This commit is contained in:
parent
36d87db751
commit
02cd26d37e
@ -507,7 +507,7 @@ void pit_counter_device::simulate(int64_t elapsed_cycles)
|
||||
}
|
||||
}
|
||||
|
||||
if (elapsed_cycles > 0 && m_phase == 3)
|
||||
if (elapsed_cycles >= adjusted_value && m_phase == 3)
|
||||
{
|
||||
/* Reload counter, output goes high */
|
||||
elapsed_cycles -= adjusted_value;
|
||||
|
Loading…
Reference in New Issue
Block a user