From 9cbbd9f255fda8a27a025a1f244d4e22028f199f Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Tue, 27 Dec 2016 03:48:41 -0800 Subject: [PATCH] GBA I/O: Set JOYSTAT TRANS flag when writing JOY_TRANS registers --- CHANGES | 1 + src/gba/io.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index b9174874f..43cdc4881 100644 --- a/CHANGES +++ b/CHANGES @@ -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: diff --git a/src/gba/io.c b/src/gba/io.c index 0ec739915..c705a3cc3 100644 --- a/src/gba/io.c +++ b/src/gba/io.c @@ -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;