Do compareCRC when reading game in SFM.

Don't rename when calculate checksum, just use filename and folder.
This commit is contained in:
splash5 2022-12-11 10:49:07 +08:00
parent 7eb3acb2bb
commit eea4fb365f
2 changed files with 1 additions and 7 deletions

View File

@ -161,6 +161,7 @@ void sfmGameOptions() {
sd.chdir("/"); sd.chdir("/");
readROM_SFM(); readROM_SFM();
compare_checksum(); compare_checksum();
compareCRC("snes.txt", 0, 1, 0);
break; break;
// Write sram // Write sram

View File

@ -1246,13 +1246,6 @@ boolean compare_checksum() {
print_Msg(F("Checksum... ")); print_Msg(F("Checksum... "));
display_Update(); display_Update();
strcpy(fileName, romName);
strcat(fileName, ".sfc");
// last used rom folder
EEPROM_readAnything(0, foldern);
sprintf(folder, "SNES/ROM/%s/%d", romName, foldern - 1);
char calcsumStr[5]; char calcsumStr[5];
sprintf(calcsumStr, "%04X", calc_checksum(fileName, folder)); sprintf(calcsumStr, "%04X", calc_checksum(fileName, folder));
print_Msg(calcsumStr); print_Msg(calcsumStr);