mirror of https://github.com/mgba-emu/mgba.git
GBA Memory: Fix bad Load16 on big endian
This commit is contained in:
parent
9cda63f6c0
commit
7a6582503f
|
@ -446,8 +446,7 @@ uint32_t GBALoad16(struct ARMCore* cpu, uint32_t address, int* cycleCounter) {
|
|||
} else {
|
||||
GBALog(gba, GBA_LOG_GAME_ERROR, "Bad memory Load16: 0x%08X", address);
|
||||
LOAD_BAD;
|
||||
volatile uint32_t v2 = value;
|
||||
LOAD_16(value, address & 2, &v2);
|
||||
value = (value >> ((address & 2) * 8)) & 0xFFFF;
|
||||
}
|
||||
break;
|
||||
case REGION_WORKING_RAM:
|
||||
|
@ -506,8 +505,7 @@ uint32_t GBALoad16(struct ARMCore* cpu, uint32_t address, int* cycleCounter) {
|
|||
default:
|
||||
GBALog(gba, GBA_LOG_GAME_ERROR, "Bad memory Load16: 0x%08X", address);
|
||||
LOAD_BAD;
|
||||
volatile uint32_t v2 = value;
|
||||
LOAD_16(value, address & 2, &v2);
|
||||
value = (value >> ((address & 2) * 8)) & 0xFFFF;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue