GBA I/O: Clear JOYSTAT RECV flag when reading JOY_RECV registers
Jeffrey Pfau jeffrey@endrift.com
Tue, 27 Dec 2016 02:11:54 -0800
2 files changed,
6 insertions(+),
2 deletions(-)
M
src/gba/io.c
→
src/gba/io.c
@@ -806,6 +806,11 @@ // Write-only register
mLOG(GBA_IO, GAME_ERROR, "Read from write-only I/O register: %03X", address); return 0; + case REG_JOY_RECV_LO: + case REG_JOY_RECV_HI: + gba->memory.io[REG_JOYSTAT >> 1] &= ~JOYSTAT_RECV_BIT; + break; + case REG_SOUNDBIAS: case REG_KEYCNT: case REG_POSTFLG:@@ -862,8 +867,6 @@ case REG_SIOMULTI2:
case REG_SIOMULTI3: case REG_SIOMLT_SEND: case REG_JOYCNT: - case REG_JOY_RECV_LO: - case REG_JOY_RECV_HI: case REG_JOY_TRANS_LO: case REG_JOY_TRANS_HI: case REG_JOYSTAT: