all repos — mgba @ f775af67f352e08d55891c1031b0f3a75285da4f

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

f775af67f352e08d55891c1031b0f3a75285da4f

parent

e241566ee706ed59369133718ff5ad21564e8de7

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);