From 535f35055d853b02c574bd9722160043999793be Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Fri, 20 Nov 2020 01:15:46 -0800 Subject: [PATCH] GBA I/O: Ignore high bits on IME --- CHANGES | 1 + src/gba/io.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 81f3cacbe..bef7697a9 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ 0.8.5: (Future) Emulation fixes: - ARM: Fix Addressing mode 1 shifter on rs == pc (fixes mgba.io/i/1926) + - GBA I/O: Ignore high bits on IME - GBA Memory: Mark Famicom Mini games 22 through 28 as non-mirroring Other fixes: - CMake: Fix build with downstream minizip that exports incompatible symbols diff --git a/src/gba/io.c b/src/gba/io.c index 209335ec6..fcc7b37f7 100644 --- a/src/gba/io.c +++ b/src/gba/io.c @@ -556,7 +556,7 @@ void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) { GBATestIRQ(gba, 1); return; case REG_IME: - gba->memory.io[REG_IME >> 1] = value; + gba->memory.io[REG_IME >> 1] = value & 1; GBATestIRQ(gba, 1); return; case REG_MAX: