all repos — mgba @ da3198ff2a1b8b638f5280514c1b33d40a861016

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

da3198ff2a1b8b638f5280514c1b33d40a861016

parent

555a7404d6459e2dc0370eb79485ed1a696d50db

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

jump to
M CHANGESCHANGES

@@ -11,6 +11,7 @@ - Libretro: Fix problems with rumble not turning off

- 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: - GBA Audio: Implement missing flags on SOUNDCNT_X register
M src/gba/memory.csrc/gba/memory.c

@@ -1095,7 +1095,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:

@@ -1208,7 +1210,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: