diff --git a/CHANGES b/CHANGES index f1ac1c151..42b1f040d 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,7 @@ Emulation fixes: - GB I/O: Fix incrementing SGB controller when P14 is low (fixes mgba.io/i/2202) - GB Video: Render SGB border when unmasking with ATTR/PAL_SET (fixes mgba.io/i/2261) + - GBA Memory: Add cursory cartridge open bus emulation (fixes mgba.io/i/2032) - GBA SIO: Fix SI value for unattached MULTI mode - GBA Video: Fix backdrop color if DISPCNT is first set to 0 (fixes mgba.io/i/2260) Other fixes: diff --git a/src/gba/memory.c b/src/gba/memory.c index 6a1631c5e..77fe2a36e 100644 --- a/src/gba/memory.c +++ b/src/gba/memory.c @@ -375,7 +375,7 @@ static void GBASetActiveRegion(struct ARMCore* cpu, uint32_t address) { wait += waitstatesRegion[REGION_WORKING_RAM]; #define LOAD_WORKING_IRAM LOAD_32(value, address & (SIZE_WORKING_IRAM - 4), memory->iwram); -#define LOAD_IO value = GBAIORead(gba, address & OFFSET_MASK & ~2) | (GBAIORead(gba, (address & OFFSET_MASK) | 2) << 16); +#define LOAD_IO value = GBAIORead(gba, address & OFFSET_MASK & ~3) | (GBAIORead(gba, (address & OFFSET_MASK & ~1) | 2) << 16); #define LOAD_PALETTE_RAM \ LOAD_32(value, address & (SIZE_PALETTE_RAM - 4), gba->video.palette); \