From ab5f94af85a88944329adef2af9997899db93bef Mon Sep 17 00:00:00 2001 From: BacteriaMage Date: Tue, 25 Oct 2022 19:54:40 -0500 Subject: [PATCH] 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. --- Cart_Reader/SNES.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cart_Reader/SNES.ino b/Cart_Reader/SNES.ino index 24d54d7..bbbb6de 100644 --- a/Cart_Reader/SNES.ino +++ b/Cart_Reader/SNES.ino @@ -1102,8 +1102,8 @@ boolean checkcart_SNES() { byte sramSizeExp; if ((romChips == 19) || (romChips == 20) || (romChips == 21) || (romChips == 26)) { // SuperFX - if (snesHeader[0x7FDA - headerStart] == 0x33) { - sramSizeExp = snesHeader[0x7FBD - headerStart]; + if (snesHeader[0xFFDA - headerStart] == 0x33) { + sramSizeExp = snesHeader[0xFFBD - headerStart]; } else { if (strncmp(romName, "STARFOX2", 8) == 0) { sramSizeExp = 6;