GBA: Timer 0 cannot be count up
Jeffrey Pfau jeffrey@endrift.com
Mon, 29 Aug 2016 10:19:53 -0700
2 files changed,
2 insertions(+),
1 deletions(-)
M
CHANGES
→
CHANGES
@@ -35,6 +35,7 @@ - VFS: Fix uninitialized varaible reading from 7z
- 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
M
src/gba/gba.c
→
src/gba/gba.c
@@ -569,7 +569,7 @@ case 0x0003:
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);