From 7c1302e9bc891cf0e5487a5e1bc587241cfcc284 Mon Sep 17 00:00:00 2001 From: Felix Jones Date: Fri, 17 Nov 2023 16:28:53 +0100 Subject: [PATCH 1/2] Enable GBA core RTC hardware by default --- src/gba/overrides.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gba/overrides.c b/src/gba/overrides.c index 1d417d86b..4d79157c0 100644 --- a/src/gba/overrides.c +++ b/src/gba/overrides.c @@ -432,6 +432,10 @@ void GBAOverrideApplyDefaults(struct GBA* gba, const struct Configuration* overr GBAOverrideApply(gba, &override); } else if (GBAOverrideFind(overrides, &override)) { GBAOverrideApply(gba, &override); + } else { + // Enable RTC for unknown ROMs + override.hardware = HW_RTC; + GBAOverrideApply(gba, &override); } } } From 5dca66ac5deacc153da32bf6fff1358c15a3a3e5 Mon Sep 17 00:00:00 2001 From: Felix Jones Date: Fri, 17 Nov 2023 16:29:29 +0100 Subject: [PATCH 2/2] Use Everdrive style UTTD "U" save type detection --- src/gba/overrides.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/gba/overrides.c b/src/gba/overrides.c index 4d79157c0..d390a1faf 100644 --- a/src/gba/overrides.c +++ b/src/gba/overrides.c @@ -433,6 +433,21 @@ void GBAOverrideApplyDefaults(struct GBA* gba, const struct Configuration* overr } else if (GBAOverrideFind(overrides, &override)) { GBAOverrideApply(gba, &override); } else { + // Apply Everdrive UTTD save detection + switch (override.id[0]) { + case '1': + override.savetype = SAVEDATA_EEPROM; + break; + case '2': + override.savetype = SAVEDATA_SRAM; + break; + case '3': + override.savetype = SAVEDATA_FLASH512; + break; + case '4': + override.savetype = SAVEDATA_FLASH1M; + break; + } // Enable RTC for unknown ROMs override.hardware = HW_RTC; GBAOverrideApply(gba, &override);