GBA SIO: Fix RCNT reading for mode

This commit is contained in:
Jeffrey Pfau 2015-02-26 23:10:01 -08:00
parent bb05764cd5
commit a5a7ace86e
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ static struct GBASIODriver* _lookupDriver(struct GBASIO* sio, enum GBASIOMode mo
}
static void _switchMode(struct GBASIO* sio) {
unsigned mode = ((sio->rcnt >> 14) & 0xC) | ((sio->siocnt >> 12) & 0x3);
unsigned mode = ((sio->rcnt & 0xC000) | (sio->siocnt & 0x3000)) >> 12;
enum GBASIOMode oldMode = sio->mode;
if (mode < 8) {
sio->mode = (enum GBASIOMode) (mode & 0x3);