all repos — mgba @ 1462ffe7d5482fbee9d8c3f040f5304093ed5484

mGBA Game Boy Advance Emulator

GBA: Timer 0 cannot be count up
Jeffrey Pfau jeffrey@endrift.com
Mon, 29 Aug 2016 10:19:53 -0700
commit

1462ffe7d5482fbee9d8c3f040f5304093ed5484

parent

d401db77f0a89d9b2a62ce9aa376032a889de5a3

2 files changed, 2 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -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.csrc/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);