mirror of https://github.com/mgba-emu/mgba.git
GBA SIO: Fix writing to RCNT
This commit is contained in:
parent
8112ffdabc
commit
9b8b56d701
|
@ -122,7 +122,8 @@ void GBASIOSetDriver(struct GBASIO* sio, struct GBASIODriver* driver, enum GBASI
|
||||||
}
|
}
|
||||||
|
|
||||||
void GBASIOWriteRCNT(struct GBASIO* sio, uint16_t value) {
|
void GBASIOWriteRCNT(struct GBASIO* sio, uint16_t value) {
|
||||||
sio->rcnt = value;
|
sio->rcnt &= 0xF;
|
||||||
|
sio->rcnt |= value & ~0xF;
|
||||||
_switchMode(sio);
|
_switchMode(sio);
|
||||||
if (sio->activeDriver && sio->activeDriver->writeRegister) {
|
if (sio->activeDriver && sio->activeDriver->writeRegister) {
|
||||||
sio->activeDriver->writeRegister(sio->activeDriver, REG_RCNT, value);
|
sio->activeDriver->writeRegister(sio->activeDriver, REG_RCNT, value);
|
||||||
|
|
Loading…
Reference in New Issue