From 73b157205ae6a19da7cea9903dff744115547108 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Mon, 14 Sep 2015 19:24:47 -0700 Subject: [PATCH] GBA Audio: Fix 8-bit writes to audio channel 3 and 4 registers --- CHANGES | 1 + src/gba/io.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 7bd22952c..e67847a42 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,7 @@ Bugfixes: - GBA: Deinit savegame when unloading a ROM - GBA: Fix BIOS check on big endian - Libretro: Fix a memory leak with the render buffer + - GBA Audio: Fix 8-bit writes to audio channel 3 and 4 registers Misc: - Qt: Remove useless help icons in dialogs - GBA: Attempting to save a screenshot-style savestate should be allowed without libpng diff --git a/src/gba/io.c b/src/gba/io.c index 304a6253a..63d514a70 100644 --- a/src/gba/io.c +++ b/src/gba/io.c @@ -328,7 +328,7 @@ void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) { break; case REG_SOUND3CNT_HI: GBAAudioWriteSOUND3CNT_HI(&gba->audio, value); - value &= 0xE000; + value &= 0xE03F; break; case REG_SOUND3CNT_X: GBAAudioWriteSOUND3CNT_X(&gba->audio, value); @@ -337,7 +337,7 @@ void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) { break; case REG_SOUND4CNT_LO: GBAAudioWriteSOUND4CNT_LO(&gba->audio, value); - value &= 0xFF00; + value &= 0xFF3F; break; case REG_SOUND4CNT_HI: GBAAudioWriteSOUND4CNT_HI(&gba->audio, value);