all repos — mgba @ 03543eeab4627483100c360805bf7885c86c3b60

mGBA Game Boy Advance Emulator

GBA SIO: Fix regression when switching modes
Jeffrey Pfau jeffrey@endrift.com
Fri, 29 May 2015 22:51:34 -0700
commit

03543eeab4627483100c360805bf7885c86c3b60

parent

a2cba75819f03531ec0d55e23b41e7f484ad0ea9

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

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

@@ -131,6 +131,10 @@ }

} void GBASIOWriteSIOCNT(struct GBASIO* sio, uint16_t value) { + if ((value ^ sio->siocnt) & 0x3000) { + sio->siocnt = value & 0x3000; + _switchMode(sio); + } if (sio->activeDriver && sio->activeDriver->writeRegister) { value = sio->activeDriver->writeRegister(sio->activeDriver, REG_SIOCNT, value); } else {

@@ -151,7 +155,6 @@ break;

} } sio->siocnt = value; - _switchMode(sio); } void GBASIOWriteSIOMLT_SEND(struct GBASIO* sio, uint16_t value) {