GBA Memory: Fix bad Load16 on big endian
Jeffrey Pfau jeffrey@endrift.com
Sat, 15 Aug 2015 20:32:43 -0700
1 files changed,
2 insertions(+),
4 deletions(-)
jump to
M
src/gba/memory.c
→
src/gba/memory.c
@@ -446,8 +446,7 @@ }
} 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 @@ break;
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; }