all repos — mgba @ a9956087bceb382af890d7abaed6f03da5e9e0d6

mGBA Game Boy Advance Emulator

GBA Memory: Fix alignment of LDM/STM on SRAM
Jeffrey Pfau jeffrey@endrift.com
Fri, 06 Nov 2015 21:08:29 -0800
commit

a9956087bceb382af890d7abaed6f03da5e9e0d6

parent

16e2aec6df0114eba7b6996d20409c643d004451

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

jump to
M CHANGESCHANGES

@@ -21,6 +21,7 @@ - ARM7: Fix sign of unaligned LDRSH

- GBA BIOS: Fix CpuSet on 0x01XXXXXX addresses - GBA Memory: Fix DMA behavior for SRAM accesses - GBA Memory: Fix Store8 to OBJ VRAM + - GBA Memory: Fix alignment of LDM/STM on SRAM Misc: - Qt: Window size command line options are now supported - Qt: Increase usability of key mapper
M src/gba/memory.csrc/gba/memory.c

@@ -1111,7 +1111,9 @@ address += offset;

} uint32_t addressMisalign = address & 0x3; - address &= 0xFFFFFFFC; + if (address >> BASE_OFFSET < REGION_CART_SRAM) { + address &= 0xFFFFFFFC; + } switch (address >> BASE_OFFSET) { case REGION_BIOS:

@@ -1224,7 +1226,9 @@ address += offset;

} uint32_t addressMisalign = address & 0x3; - address &= 0xFFFFFFFC; + if (address >> BASE_OFFSET < REGION_CART_SRAM) { + address &= 0xFFFFFFFC; + } switch (address >> BASE_OFFSET) { case REGION_WORKING_RAM: