Filter out 0xFF checksum

This commit is contained in:
sanni 2022-07-07 11:22:16 +02:00
parent 9d4336741e
commit e80866a5ff

View File

@ -212,7 +212,7 @@ static const char* const menuOptionsNESChips[] PROGMEM = {nesChipsMenuItem1, nes
void nesMenu() { void nesMenu() {
// create menu with title "NES CART READER" and 5 options to choose from // create menu with title "NES CART READER" and 5 options to choose from
convertPgm(menuOptionsNES, 7); convertPgm(menuOptionsNES, 7);
unsigned char answer = question_box(F("NES CART READER"), menuOptions, 7, 1); unsigned char answer = question_box(F("NES CART READER"), menuOptions, 7, 0);
// wait for user choice to come back from the question box menu // wait for user choice to come back from the question box menu
switch (answer) { switch (answer) {
@ -424,7 +424,11 @@ boolean getMapping() {
char iNES_STR[33]; char iNES_STR[33];
sprintf(crcStr, "%08lX", ~oldcrc32); sprintf(crcStr, "%08lX", ~oldcrc32);
// Search in database // Filter out 0xFF checksum
if (strcmp(crcStr, "BD7BC39F") == 0) {
return 0;
}
else {
//Search for CRC32 in file //Search for CRC32 in file
char gamename[100]; char gamename[100];
char crc_search[9]; char crc_search[9];
@ -569,6 +573,7 @@ boolean getMapping() {
return 0; return 0;
} }
} }
}
void readRom_NES() { void readRom_NES() {
// Get name, add extension and convert to char array for sd lib // Get name, add extension and convert to char array for sd lib