mirror of
https://github.com/sanni/cartreader.git
synced 2025-02-21 15:17:10 +01:00
Print checksum and header CRC32 when searching database
This commit is contained in:
parent
1a081eb6f6
commit
5357dea659
@ -4,7 +4,7 @@
|
|||||||
This project represents a community-driven effort to provide
|
This project represents a community-driven effort to provide
|
||||||
an easy to build and easy to modify cartridge dumper.
|
an easy to build and easy to modify cartridge dumper.
|
||||||
|
|
||||||
Date: 13.10.2022
|
Date: 27.10.2022
|
||||||
Version: 10.3
|
Version: 10.3
|
||||||
|
|
||||||
SD lib: https://github.com/greiman/SdFat
|
SD lib: https://github.com/greiman/SdFat
|
||||||
|
@ -4378,7 +4378,6 @@ void readCHR(boolean readrom) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!readrom) {
|
if (!readrom) {
|
||||||
myFile.flush();
|
myFile.flush();
|
||||||
|
@ -69,11 +69,9 @@ void _smsMenu() {
|
|||||||
readROM_SMS();
|
readROM_SMS();
|
||||||
if ((retrode_mode && !retrode_mode_sms) || retron_mode) {
|
if ((retrode_mode && !retrode_mode_sms) || retron_mode) {
|
||||||
compareCRC("gg.txt", 0, 1, 0);
|
compareCRC("gg.txt", 0, 1, 0);
|
||||||
}
|
} else if (raphnet_mode_sg1000) {
|
||||||
else if (raphnet_mode_sg1000) {
|
|
||||||
compareCRC("sg1000.txt", 0, 1, 0);
|
compareCRC("sg1000.txt", 0, 1, 0);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
compareCRC("sms.txt", 0, 1, 0);
|
compareCRC("sms.txt", 0, 1, 0);
|
||||||
}
|
}
|
||||||
#ifdef global_log
|
#ifdef global_log
|
||||||
@ -568,12 +566,10 @@ void readROM_SMS() {
|
|||||||
if ((retrode_mode && !retrode_mode_sms) || retron_mode) {
|
if ((retrode_mode && !retrode_mode_sms) || retron_mode) {
|
||||||
strcat(fileName, ".gg");
|
strcat(fileName, ".gg");
|
||||||
sprintf(folder, "GG/ROM/%s/%d", romName, foldern);
|
sprintf(folder, "GG/ROM/%s/%d", romName, foldern);
|
||||||
}
|
} else if (raphnet_mode_sg1000) {
|
||||||
else if (raphnet_mode_sg1000) {
|
|
||||||
strcat(fileName, ".sg");
|
strcat(fileName, ".sg");
|
||||||
sprintf(folder, "SG1000/ROM/%s/%d", romName, foldern);
|
sprintf(folder, "SG1000/ROM/%s/%d", romName, foldern);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
strcat(fileName, ".sms");
|
strcat(fileName, ".sms");
|
||||||
sprintf(folder, "SMS/ROM/%s/%d", romName, foldern);
|
sprintf(folder, "SMS/ROM/%s/%d", romName, foldern);
|
||||||
}
|
}
|
||||||
|
@ -862,7 +862,9 @@ void checkAltConf(char crcStr[9]) {
|
|||||||
if (myFile.open("snes.txt", O_READ)) {
|
if (myFile.open("snes.txt", O_READ)) {
|
||||||
// Get cart info
|
// Get cart info
|
||||||
display_Clear();
|
display_Clear();
|
||||||
print_Msg(F("Searching database..."));
|
println_Msg(F("Searching database..."));
|
||||||
|
print_Msg(F("Checksum: "));
|
||||||
|
println_Msg(checksumStr);
|
||||||
display_Update();
|
display_Update();
|
||||||
|
|
||||||
while (myFile.available()) {
|
while (myFile.available()) {
|
||||||
@ -880,7 +882,8 @@ void checkAltConf(char crcStr[9]) {
|
|||||||
|
|
||||||
// Check if checksum string is a match else go to next entry in database
|
// Check if checksum string is a match else go to next entry in database
|
||||||
if (strcmp(tempStr2, checksumStr) == 0) {
|
if (strcmp(tempStr2, checksumStr) == 0) {
|
||||||
print_Msg(F("..."));
|
print_Msg(F("Header CRC32: "));
|
||||||
|
println_Msg(crcStr);
|
||||||
display_Update();
|
display_Update();
|
||||||
|
|
||||||
// Skip the , in the file
|
// Skip the , in the file
|
||||||
@ -906,7 +909,6 @@ void checkAltConf(char crcStr[9]) {
|
|||||||
|
|
||||||
// Some games have the same checksum, so compare CRC32 of header area with database too
|
// Some games have the same checksum, so compare CRC32 of header area with database too
|
||||||
if (strcmp(tempStr3, crcStr) == 0) {
|
if (strcmp(tempStr3, crcStr) == 0) {
|
||||||
println_Msg(F(""));
|
|
||||||
println_Msg(F("Found"));
|
println_Msg(F("Found"));
|
||||||
display_Update();
|
display_Update();
|
||||||
// Game found, check if ROM sizes differ but only change ROM size if non- standard size found in database, else trust the header to be right and the database to be wrong
|
// Game found, check if ROM sizes differ but only change ROM size if non- standard size found in database, else trust the header to be right and the database to be wrong
|
||||||
@ -922,10 +924,6 @@ void checkAltConf(char crcStr[9]) {
|
|||||||
print_Msg(numBanks);
|
print_Msg(numBanks);
|
||||||
print_Msg(F(" -> "));
|
print_Msg(F(" -> "));
|
||||||
println_Msg(numBanks2);
|
println_Msg(numBanks2);
|
||||||
println_Msg(F(""));
|
|
||||||
println_Msg(F(""));
|
|
||||||
print_Msg(F("Header CRC: "));
|
|
||||||
println_Msg(crcStr);
|
|
||||||
display_Update();
|
display_Update();
|
||||||
delay(1000);
|
delay(1000);
|
||||||
romSize = romSize2;
|
romSize = romSize2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user