GBA: Timer 0 cannot be count up

This commit is contained in:
Jeffrey Pfau 2016-08-29 10:19:53 -07:00
parent d401db77f0
commit 1462ffe7d5
2 changed files with 2 additions and 1 deletions

View File

@ -35,6 +35,7 @@ Bugfixes:
- GBA: Fix losing IRQs when CPSR I bit isn't cleared
- VFS: Fix reading multiple files from a 7z archive
- GBA: Fix filehandle leak with savegames
- GBA: Timer 0 cannot be count up
Misc:
- 3DS: Use blip_add_delta_fast for a small speed improvement
- OpenGL: Log shader compilation failure

View File

@ -569,7 +569,7 @@ void GBATimerWriteTMCNT_HI(struct GBA* gba, int timer, uint16_t control) {
currentTimer->flags = GBATimerFlagsSetPrescaleBits(currentTimer->flags, 10);
break;
}
currentTimer->flags = GBATimerFlagsTestFillCountUp(currentTimer->flags, control & 0x0004);
currentTimer->flags = GBATimerFlagsTestFillCountUp(currentTimer->flags, timer > 0 && (control & 0x0004));
currentTimer->flags = GBATimerFlagsTestFillDoIrq(currentTimer->flags, control & 0x0040);
currentTimer->overflowInterval = (0x10000 - currentTimer->reload) << GBATimerFlagsGetPrescaleBits(currentTimer->flags);
bool wasEnabled = GBATimerFlagsIsEnable(currentTimer->flags);