mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-01-10 10:29:43 +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()) {
|
if (timerEnabled()) {
|
||||||
m_timerCounter -= cycles;
|
m_timerCounter -= cycles;
|
||||||
if (m_timerCounter <= 0) {
|
if (m_timerCounter <= 0) {
|
||||||
m_timerCounter = m_timerRate;
|
m_timerCounter += m_timerRate;
|
||||||
incrementTIMA();
|
incrementTIMA();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user