Skip to content

Commit

Permalink
Use Everdrive style UTTD "U" save type detection
Browse files Browse the repository at this point in the history
  • Loading branch information
felixjones committed Nov 17, 2023
1 parent 7c1302e commit 5dca66a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/gba/overrides.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5dca66a

Please sign in to comment.