diff --git a/CHANGES b/CHANGES index e4a87bdf6..3e7ad3932 100644 --- a/CHANGES +++ b/CHANGES @@ -40,6 +40,7 @@ Bugfixes: - GB: Properly initialize sramRealVf variable - Qt: Fix Apply button for key and controller configurations - GB Video: Initialize LCDC in renderer + - GBA I/O: Mask off WAITCNT bits that cannot be written Misc: - SDL: Remove scancode key input - GBA Video: Clean up unused timers diff --git a/src/gba/io.c b/src/gba/io.c index fe4262f6c..6aa68a8b9 100644 --- a/src/gba/io.c +++ b/src/gba/io.c @@ -535,6 +535,7 @@ void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) { // Interrupts and misc case REG_WAITCNT: + value &= 0x5FFF; GBAAdjustWaitstates(gba, value); break; case REG_IE: