mirror of https://github.com/mgba-emu/mgba.git
GBA Memory: Fix bad Load8 on big endian
This commit is contained in:
parent
42b011a68b
commit
2c7bb64ada
1
CHANGES
1
CHANGES
|
@ -16,6 +16,7 @@ Bugfixes:
|
||||||
- GBA Video: Fix OBJ semitransparency improperly interacting with other blending ops
|
- GBA Video: Fix OBJ semitransparency improperly interacting with other blending ops
|
||||||
- GBA: Fix autodetect problems with some bad dumps of Super Mario Advance 2
|
- GBA: Fix autodetect problems with some bad dumps of Super Mario Advance 2
|
||||||
- GBA Memory: Fix bad BIOS Load16 on big endian
|
- GBA Memory: Fix bad BIOS Load16 on big endian
|
||||||
|
- GBA Memory: Fix bad Load8 on big endian
|
||||||
Misc:
|
Misc:
|
||||||
- Qt: Remove useless help icons in dialogs
|
- Qt: Remove useless help icons in dialogs
|
||||||
- GBA: Attempting to save a screenshot-style savestate should be allowed without libpng
|
- GBA: Attempting to save a screenshot-style savestate should be allowed without libpng
|
||||||
|
|
|
@ -534,12 +534,12 @@ uint32_t GBALoad8(struct ARMCore* cpu, uint32_t address, int* cycleCounter) {
|
||||||
value = ((uint8_t*) memory->bios)[address];
|
value = ((uint8_t*) memory->bios)[address];
|
||||||
} else {
|
} else {
|
||||||
GBALog(gba, GBA_LOG_GAME_ERROR, "Bad BIOS Load8: 0x%08X", address);
|
GBALog(gba, GBA_LOG_GAME_ERROR, "Bad BIOS Load8: 0x%08X", address);
|
||||||
value = ((uint8_t*) &memory->biosPrefetch)[address & 3];
|
value = (memory->biosPrefetch >> ((address & 3) * 8)) & 0xFF;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
GBALog(gba, GBA_LOG_GAME_ERROR, "Bad memory Load8: 0x%08x", address);
|
GBALog(gba, GBA_LOG_GAME_ERROR, "Bad memory Load8: 0x%08x", address);
|
||||||
LOAD_BAD;
|
LOAD_BAD;
|
||||||
value = ((uint8_t*) &value)[address & 3];
|
value = (value >> ((address & 3) * 8)) & 0xFF;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case REGION_WORKING_RAM:
|
case REGION_WORKING_RAM:
|
||||||
|
@ -601,7 +601,7 @@ uint32_t GBALoad8(struct ARMCore* cpu, uint32_t address, int* cycleCounter) {
|
||||||
default:
|
default:
|
||||||
GBALog(gba, GBA_LOG_GAME_ERROR, "Bad memory Load8: 0x%08x", address);
|
GBALog(gba, GBA_LOG_GAME_ERROR, "Bad memory Load8: 0x%08x", address);
|
||||||
LOAD_BAD;
|
LOAD_BAD;
|
||||||
value = ((uint8_t*) &value)[address & 3];
|
value = (value >> ((address & 3) * 8)) & 0xFF;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue