mirror of
https://github.com/sanni/cartreader.git
synced 2024-12-25 04:21:53 +01:00
Add some text when changing size based on database
This commit is contained in:
parent
c353451e31
commit
d7d49bac75
@ -814,7 +814,7 @@ 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();
|
||||||
println_Msg(F("Searching database..."));
|
print_Msg(F("Searching database..."));
|
||||||
display_Update();
|
display_Update();
|
||||||
|
|
||||||
while (myFile.available()) {
|
while (myFile.available()) {
|
||||||
@ -832,7 +832,7 @@ 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) {
|
||||||
println_Msg(F("Found in database"));
|
print_Msg(F("..."));
|
||||||
display_Update();
|
display_Update();
|
||||||
|
|
||||||
// Skip the , in the file
|
// Skip the , in the file
|
||||||
@ -858,14 +858,31 @@ 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"));
|
||||||
|
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
|
||||||
if (((romSize != romSize2) || (numBanks != numBanks2)) && ((romSize2 == 10) || (romSize2 == 12) || (romSize2 == 20) || (romSize2 == 24) || (romSize2 == 48))) {
|
if (((romSize != romSize2) || (numBanks != numBanks2)) && ((romSize2 == 10) || (romSize2 == 12) || (romSize2 == 20) || (romSize2 == 24) || (romSize2 == 48))) {
|
||||||
// Correct size
|
// Correct size
|
||||||
|
println_Msg(F("Correcting size"));
|
||||||
|
print_Msg(F("Size: "));
|
||||||
|
print_Msg(romSize);
|
||||||
|
print_Msg(F(" -> "));
|
||||||
|
print_Msg(romSize2);
|
||||||
|
println_Msg(F("Mbit"));
|
||||||
|
print_Msg(F("Banks: "));
|
||||||
|
print_Msg(numBanks);
|
||||||
|
print_Msg(F(" -> "));
|
||||||
|
println_Msg(numBanks2);
|
||||||
|
println_Msg(F(""));
|
||||||
|
println_Msg(F(""));
|
||||||
|
print_Msg(F("Header CRC: "));
|
||||||
|
println_Msg(crcStr);
|
||||||
|
display_Update();
|
||||||
|
delay(1000);
|
||||||
romSize = romSize2;
|
romSize = romSize2;
|
||||||
numBanks = numBanks2;
|
numBanks = numBanks2;
|
||||||
altconf = 1;
|
altconf = 1;
|
||||||
println_Msg(F("Correcting size"));
|
|
||||||
display_Update();
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user