mirror of https://github.com/mgba-emu/mgba.git
GBA: Detect hardware for Pokémon FireRed ROM hacks
This commit is contained in:
parent
f5bf854489
commit
5b395aafe0
1
CHANGES
1
CHANGES
|
@ -25,6 +25,7 @@ Bugfixes:
|
|||
Misc:
|
||||
- Qt: Don't rebuild library view if style hasn't changed
|
||||
- SDL: Fix 2.0.5 build on macOS under some circumstances
|
||||
- GBA: Detect hardware for Pokémon FireRed ROM hacks
|
||||
|
||||
0.6.0: (2017-07-16)
|
||||
Features:
|
||||
|
|
|
@ -385,11 +385,16 @@ static void _GBACoreReset(struct mCore* core) {
|
|||
const struct GBACartridge* cart = (const struct GBACartridge*) gba->memory.rom;
|
||||
if (cart) {
|
||||
memcpy(override.id, &cart->id, sizeof(override.id));
|
||||
if (GBAOverrideFind(gbacore->overrides, &override)) {
|
||||
|
||||
if (!strncmp("pokemon red version", &((const char*) gba->memory.rom)[0x108], 20) && gba->romCrc32 != 0xDD88761C) {
|
||||
// Enable FLASH1M and RTC on Pokémon FireRed ROM hacks
|
||||
override.savetype = SAVEDATA_FLASH1M;
|
||||
override.hardware = HW_RTC;
|
||||
GBAOverrideApply(gba, &override);
|
||||
} else if (GBAOverrideFind(gbacore->overrides, &override)) {
|
||||
GBAOverrideApply(gba, &override);
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2
|
||||
if (!gba->biosVf && core->opts.useBios) {
|
||||
struct VFile* bios = NULL;
|
||||
|
|
Loading…
Reference in New Issue