all repos — mgba @ b2fdb22cd73b307d55eed86ecb3074c728f075d1

mGBA Game Boy Advance Emulator

GBA SIO: Fix TRANS bit clearing order
Vicki Pfau vi@endrift.com
Fri, 12 Mar 2021 20:19:16 -0800
commit

b2fdb22cd73b307d55eed86ecb3074c728f075d1

parent

a6e747add45fc8fd3b959d647634bee1f8dee0b1

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

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

@@ -72,14 +72,14 @@ GBARaiseIRQ(sio->p->p, IRQ_SIO, 0);

} return 1; case JOY_TRANS: - sio->p->p->memory.io[REG_JOYCNT >> 1] |= JOYCNT_TRANS; - sio->p->p->memory.io[REG_JOYSTAT >> 1] &= ~JOYSTAT_TRANS; - data[0] = sio->p->p->memory.io[REG_JOY_TRANS_LO >> 1]; data[1] = sio->p->p->memory.io[REG_JOY_TRANS_LO >> 1] >> 8; data[2] = sio->p->p->memory.io[REG_JOY_TRANS_HI >> 1]; data[3] = sio->p->p->memory.io[REG_JOY_TRANS_HI >> 1] >> 8; data[4] = sio->p->p->memory.io[REG_JOYSTAT >> 1]; + + sio->p->p->memory.io[REG_JOYCNT >> 1] |= JOYCNT_TRANS; + sio->p->p->memory.io[REG_JOYSTAT >> 1] &= ~JOYSTAT_TRANS; mLOG(GBA_SIO, DEBUG, "JOY trans: %02X%02X%02X%02X:%02X (%02X)", data[0], data[1], data[2], data[3], data[4], sio->p->p->memory.io[REG_JOYCNT >> 1]);