From 956c2d1402e9e42ae6b971ef95e71eed0bbd48af Mon Sep 17 00:00:00 2001 From: sanni Date: Wed, 28 Sep 2022 10:13:48 +0200 Subject: [PATCH] Show NES database CRC while searching --- Cart_Reader/Cart_Reader.ino | 2 +- Cart_Reader/NES.ino | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Cart_Reader/Cart_Reader.ino b/Cart_Reader/Cart_Reader.ino index 3503f1f..2e3dcde 100644 --- a/Cart_Reader/Cart_Reader.ino +++ b/Cart_Reader/Cart_Reader.ino @@ -4,7 +4,7 @@ This project represents a community-driven effort to provide an easy to build and easy to modify cartridge dumper. - Date: 27.09.2022 + Date: 28.09.2022 Version: 10.0 SD lib: https://github.com/greiman/SdFat diff --git a/Cart_Reader/NES.ino b/Cart_Reader/NES.ino index 8fb58ea..6678a63 100644 --- a/Cart_Reader/NES.ino +++ b/Cart_Reader/NES.ino @@ -428,7 +428,7 @@ uint32_t uppow2(uint32_t n) { boolean getMapping() { display_Clear(); - println_Msg(F("Searching database...")); + println_Msg(F("Searching database")); display_Update(); // Read first 512 bytes of prg rom @@ -446,8 +446,19 @@ boolean getMapping() { char iNES_STR[33]; sprintf(crcStr, "%08lX", ~oldcrc32); + print_Msg(F("for ")); + print_Msg(crcStr); + println_Msg(F("...")); + display_Update(); + // Filter out 0xFF checksum 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[1] = 'A'; romName[2] = 'R'; @@ -726,7 +737,11 @@ boolean getMapping() { } // File searched until end but nothing found 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[1] = 'A'; romName[2] = 'R';