From 3e827c24a83a10b46202560276e8214b6510e8d0 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Wed, 9 Jul 2014 03:52:43 -0700 Subject: [PATCH] Fix 8-bit IO writes on SOUND3CNT_X --- src/gba/gba-io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gba/gba-io.c b/src/gba/gba-io.c index 53c5863c1..6bd7a5ddf 100644 --- a/src/gba/gba-io.c +++ b/src/gba/gba-io.c @@ -135,7 +135,8 @@ void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) { break; case REG_SOUND3CNT_X: GBAAudioWriteSOUND3CNT_X(&gba->audio, value); - value &= 0x4000; + // TODO: The low bits need to not be readable, but still 8-bit writable + value &= 0x43FF; break; case REG_SOUND4CNT_LO: GBAAudioWriteSOUND4CNT_LO(&gba->audio, value);