all repos — mgba @ a5a7ace86eb0feaf156842029af59a869151712a

mGBA Game Boy Advance Emulator

GBA SIO: Fix RCNT reading for mode
Jeffrey Pfau jeffrey@endrift.com
Thu, 26 Feb 2015 23:10:01 -0800
commit

a5a7ace86eb0feaf156842029af59a869151712a

parent

bb05764cd5ee87d0a679799ca4025d3c28c4bb33

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

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

@@ -29,7 +29,7 @@ }

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