GBA Memory: Fix 32-bit loads from unaddress cartridge space

This commit is contained in:
Jeffrey Pfau 2015-04-18 13:53:26 -07:00
parent 717f4ec493
commit 7db12fae96
2 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@ Bugfixes:
- Qt: Fix potential crash if a gamepad causes focus to change - Qt: Fix potential crash if a gamepad causes focus to change
- GBA Memory: Allow SRAM to be 64kB - GBA Memory: Allow SRAM to be 64kB
- Qt: Fix controller axis querying - Qt: Fix controller axis querying
- GBA Memory: Fix 32-bit loads from unaddress cartridge space
Misc: Misc:
- Qt: Show multiplayer numbers in window title - Qt: Show multiplayer numbers in window title

View File

@ -324,7 +324,7 @@ static void GBASetActiveRegion(struct ARMCore* cpu, uint32_t address) {
} else { \ } else { \
GBALog(gba, GBA_LOG_GAME_ERROR, "Out of bounds ROM Load32: 0x%08X", address); \ GBALog(gba, GBA_LOG_GAME_ERROR, "Out of bounds ROM Load32: 0x%08X", address); \
value = (address >> 1) & 0xFFFF; \ value = (address >> 1) & 0xFFFF; \
value |= value << 16; \ value |= ((address + 2) >> 1) << 16; \
} }
#define LOAD_SRAM \ #define LOAD_SRAM \