fix superfx sram size detection

The header offsets were wrong so the size wasn't correctly computed and generally ended up defaulting to 32KB. Stunt Race FX, at least, uses 64KB and so only half the save data was being read.
This commit is contained in:
BacteriaMage 2022-10-25 19:54:40 -05:00
parent 9cabf64a0e
commit ab5f94af85

View File

@ -1102,8 +1102,8 @@ boolean checkcart_SNES() {
byte sramSizeExp; byte sramSizeExp;
if ((romChips == 19) || (romChips == 20) || (romChips == 21) || (romChips == 26)) { if ((romChips == 19) || (romChips == 20) || (romChips == 21) || (romChips == 26)) {
// SuperFX // SuperFX
if (snesHeader[0x7FDA - headerStart] == 0x33) { if (snesHeader[0xFFDA - headerStart] == 0x33) {
sramSizeExp = snesHeader[0x7FBD - headerStart]; sramSizeExp = snesHeader[0xFFBD - headerStart];
} else { } else {
if (strncmp(romName, "STARFOX2", 8) == 0) { if (strncmp(romName, "STARFOX2", 8) == 0) {
sramSizeExp = 6; sramSizeExp = 6;