all repos — mgba @ 13a77ea3fff2da06b208c5f42016e171ac3dc53a

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:36 -0700
commit

13a77ea3fff2da06b208c5f42016e171ac3dc53a

parent

67bc9e7280bffbf7b6b8dc9c8ba858caf0826e54

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

jump to
M CHANGESCHANGES

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

+0.3.0: (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

@@ -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) {