GBA I/O: Set JOYSTAT TRANS flag when writing JOY_TRANS registers

This commit is contained in:
Jeffrey Pfau 2016-12-27 03:48:41 -08:00
parent 75d9085eef
commit 9cbbd9f255
2 changed files with 5 additions and 2 deletions

View File

@ -71,6 +71,7 @@ Misc:
- GBA DMA: Move DMAs to using absolute timing
- All: Add C++ header guards
- GBA I/O: Clear JOYSTAT RECV flag when reading JOY_RECV registers
- GBA I/O: Set JOYSTAT TRANS flag when writing JOY_TRANS registers
0.5.1: (2016-10-05)
Bugfixes:

View File

@ -524,13 +524,15 @@ void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) {
value &= 0xC1FF;
GBASIOWriteRCNT(&gba->sio, value);
break;
case REG_JOY_TRANS_LO:
case REG_JOY_TRANS_HI:
gba->memory.io[REG_JOYSTAT >> 1] |= JOYSTAT_TRANS_BIT;
// Fall through
case REG_SIOMLT_SEND:
case REG_JOYCNT:
case REG_JOYSTAT:
case REG_JOY_RECV_LO:
case REG_JOY_RECV_HI:
case REG_JOY_TRANS_LO:
case REG_JOY_TRANS_HI:
value = GBASIOWriteRegister(&gba->sio, address, value);
break;