GBA: Fix timers not updating timing when writing to only the reload register
Jeffrey Pfau jeffrey@endrift.com
Fri, 03 Apr 2015 23:51:36 -0700
2 files changed,
5 insertions(+),
0 deletions(-)
M
src/gba/gba.c
→
src/gba/gba.c
@@ -434,6 +434,7 @@ }
void GBATimerWriteTMCNT_LO(struct GBA* gba, int timer, uint16_t reload) { gba->timers[timer].reload = reload; + gba->timers[timer].overflowInterval = (0x10000 - gba->timers[timer].reload) << gba->timers[timer].prescaleBits; } void GBATimerWriteTMCNT_HI(struct GBA* gba, int timer, uint16_t control) {