diff --git a/CHANGES b/CHANGES index fc2436f71..f60f6b8e9 100644 --- a/CHANGES +++ b/CHANGES @@ -91,6 +91,7 @@ Emulation fixes: - ARM: Partially fix LDM/STM writeback with empty register list - GBA DMA: Fix case where DMAs could get misaligned (fixes mgba.io/i/1092) - GBA Video: Fix OpenGL renderer 512x512 backgrounds (fixes mgba.io/i/1572) + - GBA Memory: Fix open bus from IWRAM (fixes mgba.io/i/1575) Other fixes: - 3DS: Fix screen darkening (fixes mgba.io/i/1562) - Vita: Fix analog controls (fixes mgba.io/i/1554) diff --git a/src/gba/memory.c b/src/gba/memory.c index d70578830..091bfa1e1 100644 --- a/src/gba/memory.c +++ b/src/gba/memory.c @@ -353,10 +353,10 @@ static void GBASetActiveRegion(struct ARMCore* cpu, uint32_t address) { case REGION_WORKING_IRAM: \ /* This doesn't handle prefetch clobbering */ \ if (cpu->gprs[ARM_PC] & 2) { \ - value |= cpu->prefetch[0] << 16; \ - } else { \ value <<= 16; \ value |= cpu->prefetch[0]; \ + } else { \ + value |= cpu->prefetch[0] << 16; \ } \ break; \ default: \