From 2817c513446e4edf305ddadeb415377ce5b0ab4c Mon Sep 17 00:00:00 2001 From: RidgeX Date: Tue, 27 Nov 2018 12:34:00 +0000 Subject: [PATCH] GBA I/O: SOUNDCNT_HI is readable when sound is off --- CHANGES | 1 + src/gba/io.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index c65e9d8d3..cbef011d0 100644 --- a/CHANGES +++ b/CHANGES @@ -130,6 +130,7 @@ Bugfixes: - GBA Savedata: Fix EEPROM writing codepath when savetype is not EEPROM - Core: Reroot timing list when (de)scheduling - GB Video: Changing LYC while LCDC off doesn't affect STAT (fixes mgba.io/i/1224) + - GBA I/O: SOUNDCNT_HI is readable when sound is off Misc: - mGUI: Add SGB border configuration option - mGUI: Add support for different settings types diff --git a/src/gba/io.c b/src/gba/io.c index 7621c887c..84a2c9478 100644 --- a/src/gba/io.c +++ b/src/gba/io.c @@ -838,7 +838,6 @@ uint16_t GBAIORead(struct GBA* gba, uint32_t address) { case REG_SOUND4CNT_LO: case REG_SOUND4CNT_HI: case REG_SOUNDCNT_LO: - case REG_SOUNDCNT_HI: if (!GBAudioEnableIsEnable(gba->memory.io[REG_SOUNDCNT_X >> 1])) { // TODO: Is writing allowed when the circuit is disabled? return 0; @@ -855,6 +854,7 @@ uint16_t GBAIORead(struct GBA* gba, uint32_t address) { case REG_WINOUT: case REG_BLDCNT: case REG_BLDALPHA: + case REG_SOUNDCNT_HI: case REG_SOUNDCNT_X: case REG_WAVE_RAM0_LO: case REG_WAVE_RAM0_HI: