all repos — mgba @ 0789ebb8cca0765adde856cd3d7f208d74ffb883

mGBA Game Boy Advance Emulator

GBA Memory: Fix 32-bit loads from unaddress cartridge space
Jeffrey Pfau jeffrey@endrift.com
Sat, 18 Apr 2015 13:53:26 -0700
commit

0789ebb8cca0765adde856cd3d7f208d74ffb883

parent

b8edf968a4d2d2eb09a521d05a2309ff526eb2be

2 files changed, 2 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -28,6 +28,7 @@ - Qt: Fix potential crash if a gamepad causes focus to change

- 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
M src/gba/memory.csrc/gba/memory.c

@@ -347,7 +347,7 @@ LOAD_32(value, address & (SIZE_CART0 - 1), memory->rom); \

} 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 \