From fb743285fe1343db83e410a48d714a271b824ba0 Mon Sep 17 00:00:00 2001 From: sanni Date: Fri, 19 Aug 2022 12:16:14 +0200 Subject: [PATCH] Only correct SNES ROM size if non-standard size found in database, else trust header info to be correct --- Cart_Reader/SNES.ino | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Cart_Reader/SNES.ino b/Cart_Reader/SNES.ino index e63a76f..201da87 100644 --- a/Cart_Reader/SNES.ino +++ b/Cart_Reader/SNES.ino @@ -852,11 +852,14 @@ void checkAltConf() { byte numBanks2 = (myFile.read() - 48) * 100 + (myFile.read() - 48) * 10 + (myFile.read() - 48); if ((romSize != romSize2) || (numBanks != numBanks2)) { - romSize = romSize2; - numBanks = numBanks2; - altconf = 1; - println_Msg(F("Correcting size")); - display_Update(); + // Only correct if non-standard size found in database, else trust header info to be correct + if ((romSize2 == 6) || (romSize2 == 7) || (romSize2 == 10) || (romSize2 == 12) || (romSize2 == 16) || (romSize2 == 24)) { + romSize = romSize2; + numBanks = numBanks2; + altconf = 1; + println_Msg(F("Correcting size")); + display_Update(); + } } break; }