all repos — mgba @ 9b8b56d701b6aa204f67e102a07af763fb877828

mGBA Game Boy Advance Emulator

GBA SIO: Fix writing to RCNT
Jeffrey Pfau jeffrey@endrift.com
Sat, 28 Feb 2015 14:52:46 -0800
commit

9b8b56d701b6aa204f67e102a07af763fb877828

parent

8112ffdabc633f92ce61d4716b9f7857a2cf1a97

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

jump to
M src/gba/sio.csrc/gba/sio.c

@@ -122,7 +122,8 @@ *driverLoc = driver;

} void GBASIOWriteRCNT(struct GBASIO* sio, uint16_t value) { - sio->rcnt = value; + sio->rcnt &= 0xF; + sio->rcnt |= value & ~0xF; _switchMode(sio); if (sio->activeDriver && sio->activeDriver->writeRegister) { sio->activeDriver->writeRegister(sio->activeDriver, REG_RCNT, value);