Show NES database CRC while searching

This commit is contained in:
sanni 2022-09-28 10:13:48 +02:00
parent b51a01f1f5
commit 956c2d1402
2 changed files with 18 additions and 3 deletions

View File

@ -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: 27.09.2022 Date: 28.09.2022
Version: 10.0 Version: 10.0
SD lib: https://github.com/greiman/SdFat SD lib: https://github.com/greiman/SdFat

View File

@ -428,7 +428,7 @@ uint32_t uppow2(uint32_t n) {
boolean getMapping() { boolean getMapping() {
display_Clear(); display_Clear();
println_Msg(F("Searching database...")); println_Msg(F("Searching database"));
display_Update(); display_Update();
// Read first 512 bytes of prg rom // Read first 512 bytes of prg rom
@ -446,8 +446,19 @@ boolean getMapping() {
char iNES_STR[33]; char iNES_STR[33];
sprintf(crcStr, "%08lX", ~oldcrc32); sprintf(crcStr, "%08lX", ~oldcrc32);
print_Msg(F("for "));
print_Msg(crcStr);
println_Msg(F("..."));
display_Update();
// Filter out 0xFF checksum // Filter out 0xFF checksum
if (strcmp(crcStr, "BD7BC39F") == 0) { if (strcmp(crcStr, "BD7BC39F") == 0) {
delay(500);
println_Msg(F(""));
println_Msg(F("No data found at 0x8000"));
println_Msg(F("Using manual selection"));
display_Update();
delay(1000);
romName[0] = 'C'; romName[0] = 'C';
romName[1] = 'A'; romName[1] = 'A';
romName[2] = 'R'; romName[2] = 'R';
@ -726,7 +737,11 @@ boolean getMapping() {
} }
// File searched until end but nothing found // File searched until end but nothing found
if (strcmp(crc_search, crcStr) != 0) { if (strcmp(crc_search, crcStr) != 0) {
println_Msg(F("Not found")); println_Msg(F(""));
println_Msg(F("CRC not found in database"));
println_Msg(F("Using manual selection"));
display_Update();
delay(1000);
romName[0] = 'C'; romName[0] = 'C';
romName[1] = 'A'; romName[1] = 'A';
romName[2] = 'R'; romName[2] = 'R';