GBA Memory: Fix misaligned 32-bit I/O loads (fixes #2307)

This commit is contained in:
Vicki Pfau 2021-09-14 10:51:06 -07:00
parent daa2650cbb
commit cb366ab3ea
2 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
Emulation fixes:
- GB I/O: Fix incrementing SGB controller when P14 is low (fixes mgba.io/i/2202)
- GB Video: Render SGB border when unmasking with ATTR/PAL_SET (fixes mgba.io/i/2261)
- GBA Memory: Add cursory cartridge open bus emulation (fixes mgba.io/i/2032)
- GBA SIO: Fix SI value for unattached MULTI mode
- GBA Video: Fix backdrop color if DISPCNT is first set to 0 (fixes mgba.io/i/2260)
Other fixes:

View File

@ -375,7 +375,7 @@ static void GBASetActiveRegion(struct ARMCore* cpu, uint32_t address) {
wait += waitstatesRegion[REGION_WORKING_RAM];
#define LOAD_WORKING_IRAM LOAD_32(value, address & (SIZE_WORKING_IRAM - 4), memory->iwram);
#define LOAD_IO value = GBAIORead(gba, address & OFFSET_MASK & ~2) | (GBAIORead(gba, (address & OFFSET_MASK) | 2) << 16);
#define LOAD_IO value = GBAIORead(gba, address & OFFSET_MASK & ~3) | (GBAIORead(gba, (address & OFFSET_MASK & ~1) | 2) << 16);
#define LOAD_PALETTE_RAM \
LOAD_32(value, address & (SIZE_PALETTE_RAM - 4), gba->video.palette); \