mirror of https://github.com/mgba-emu/mgba.git
GB Timer: Fix low bit of DIV resetting
This commit is contained in:
parent
0ce3b9a2b7
commit
a382c1ee9b
|
@ -1 +0,0 @@
|
|||
fail: true
|
|
@ -70,7 +70,7 @@ void GBTimerDivReset(struct GBTimer* timer) {
|
|||
timer->nextDiv -= mTimingUntil(&timer->p->timing, &timer->event);
|
||||
mTimingDeschedule(&timer->p->timing, &timer->event);
|
||||
_GBTimerDivIncrement(timer, (timer->p->cpu->executionState + 1) & 3);
|
||||
if (timer->internalDiv & (timer->timaPeriod >> 1)) {
|
||||
if (((timer->internalDiv << 1) | ((timer->nextDiv >> 3) & 1)) & timer->timaPeriod) {
|
||||
++timer->p->memory.io[REG_TIMA];
|
||||
if (!timer->p->memory.io[REG_TIMA]) {
|
||||
mTimingSchedule(&timer->p->timing, &timer->irq, 4 - ((timer->p->cpu->executionState + 1) & 3));
|
||||
|
|
Loading…
Reference in New Issue