diff --git a/CHANGES b/CHANGES index 56cc57125..1be8e51ba 100644 --- a/CHANGES +++ b/CHANGES @@ -28,6 +28,7 @@ Bugfixes: - GBA Memory: Allow SRAM to be 64kB - Qt: Fix controller axis querying - GBA Memory: Improve Thumb open bus behavior + - GBA Memory: Fix 32-bit loads from unaddress cartridge space Misc: - Qt: Show multiplayer numbers in window title diff --git a/src/gba/memory.c b/src/gba/memory.c index 65750b472..c85a1a844 100644 --- a/src/gba/memory.c +++ b/src/gba/memory.c @@ -347,7 +347,7 @@ static void GBASetActiveRegion(struct ARMCore* cpu, uint32_t address) { } else { \ GBALog(gba, GBA_LOG_GAME_ERROR, "Out of bounds ROM Load32: 0x%08X", address); \ value = (address >> 1) & 0xFFFF; \ - value |= value << 16; \ + value |= ((address + 2) >> 1) << 16; \ } #define LOAD_SRAM \