GBA: Fix FireRed revision misdetecting as a ROM hack

This commit is contained in:
Vicki Pfau 2021-03-29 21:10:44 -07:00
parent d4d4bfd3d1
commit 5a0257480a
2 changed files with 4 additions and 1 deletions

View File

@ -2,6 +2,8 @@
Emulation fixes: Emulation fixes:
- Core: Fix first event scheduling after loading savestate - Core: Fix first event scheduling after loading savestate
- GBA Memory: Fix loading Thumb savestates when in ARM mode - GBA Memory: Fix loading Thumb savestates when in ARM mode
Other fixes:
- GBA: Fix FireRed revision misdetecting as a ROM hack
0.9.0: (2021-03-28) 0.9.0: (2021-03-28)
Features: Features:

View File

@ -375,7 +375,8 @@ void GBAOverrideApplyDefaults(struct GBA* gba, const struct Configuration* overr
if (cart) { if (cart) {
memcpy(override.id, &cart->id, sizeof(override.id)); memcpy(override.id, &cart->id, sizeof(override.id));
if (!strncmp("pokemon red version", &((const char*) gba->memory.rom)[0x108], 20) && gba->romCrc32 != 0xDD88761C) { if (!strncmp("pokemon red version", &((const char*) gba->memory.rom)[0x108], 20) &&
gba->romCrc32 != 0xDD88761C && gba->romCrc32 != 0x84EE4776) {
// Enable FLASH1M and RTC on Pokémon FireRed ROM hacks // Enable FLASH1M and RTC on Pokémon FireRed ROM hacks
override.savetype = SAVEDATA_FLASH1M; override.savetype = SAVEDATA_FLASH1M;
override.hardware = HW_RTC; override.hardware = HW_RTC;