From f775af67f352e08d55891c1031b0f3a75285da4f Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sat, 28 Feb 2015 14:52:46 -0800 Subject: [PATCH] GBA SIO: Fix writing to RCNT --- src/gba/sio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gba/sio.c b/src/gba/sio.c index d1e732492..1c770d7fb 100644 --- a/src/gba/sio.c +++ b/src/gba/sio.c @@ -122,7 +122,8 @@ void GBASIOSetDriver(struct GBASIO* sio, struct GBASIODriver* driver, enum GBASI } 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);