From ac6f3a3060b89085611b1ca6e6563a2fadb75dd5 Mon Sep 17 00:00:00 2001 From: Felix Jones Date: Fri, 17 Nov 2023 16:29:29 +0100 Subject: [PATCH] Use Everdrive style UTTD "U" save type detection --- src/gba/overrides.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/gba/overrides.c b/src/gba/overrides.c index 1d417d86b..16c66ebd8 100644 --- a/src/gba/overrides.c +++ b/src/gba/overrides.c @@ -432,6 +432,23 @@ void GBAOverrideApplyDefaults(struct GBA* gba, const struct Configuration* overr GBAOverrideApply(gba, &override); } 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; + } + GBAOverrideApply(gba, &override); } } }