mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-12-23 00:29:47 +00:00
Timers can (of course) expire during CPU instruction execution.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
This commit is contained in:
parent
406e651c66
commit
a2784ae02d
@ -180,7 +180,7 @@ void EightBit::Bus::checkTimer(int cycles) {
|
||||
if (timerEnabled()) {
|
||||
m_timerCounter -= cycles;
|
||||
if (m_timerCounter <= 0) {
|
||||
m_timerCounter = m_timerRate;
|
||||
m_timerCounter += m_timerRate;
|
||||
incrementTIMA();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user