all repos — mgba @ 1c06cbd8d30bf26fb9d23a76d36eaaa00ae8268f

mGBA Game Boy Advance Emulator

GBA: Fix timers not updating timing when writing to only the reload register
Jeffrey Pfau jeffrey@endrift.com
Fri, 03 Apr 2015 23:51:58 -0700
commit

1c06cbd8d30bf26fb9d23a76d36eaaa00ae8268f

parent

12c6aaa21340d2a759a5b05610bcd26b71568d78

2 files changed, 5 insertions(+), 0 deletions(-)

jump to
M CHANGESCHANGES

@@ -1,3 +1,7 @@

+0.2.1: (Future) +Bugfixes: + - GBA: Fix timers not updating timing when writing to only the reload register + 0.2.0: (2015-04-03) Features: - Support for gamepad axes, e.g. analog sticks or triggers
M src/gba/gba.csrc/gba/gba.c

@@ -433,6 +433,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) {