From e1bd042d822c2f9c23f0a9236b7081da51bc72f5 Mon Sep 17 00:00:00 2001 From: smesgr9000 Date: Sun, 16 Jun 2024 00:39:21 +0200 Subject: [PATCH] replace duplicate error string "Can't open file" --- Cart_Reader/COLV.ino | 3 +-- Cart_Reader/GBA.ino | 4 ++-- Cart_Reader/GBM.ino | 4 ++-- Cart_Reader/GPC.ino | 2 +- Cart_Reader/N64.ino | 6 +++--- Cart_Reader/SNES.ino | 2 +- Cart_Reader/SV.ino | 2 +- 7 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Cart_Reader/COLV.ino b/Cart_Reader/COLV.ino index 8b852ca..4a5afb2 100644 --- a/Cart_Reader/COLV.ino +++ b/Cart_Reader/COLV.ino @@ -151,7 +151,7 @@ uint8_t readData_COL(uint32_t addr) { return ret; } -void readSegment_COL(uint32_t startaddr, uint32_t endaddr) { +void readSegment_COL(uint16_t startaddr, uint32_t endaddr) { for (uint32_t addr = startaddr; addr < endaddr; addr += 512) { for (int w = 0; w < 512; w++) { uint8_t temp = readData_COL(addr + w); @@ -166,7 +166,6 @@ void readROM_COL() { // RESET ALL CS PINS HIGH (DISABLE) PORTH |= (1 << 3) | (1 << 4) | (1 << 5) | (1 << 6); - readSegment_COL(0x8000, 0xA000); // 8K if (colsize > 0) { readSegment_COL(0xA000, 0xB000); // +4K = 12K diff --git a/Cart_Reader/GBA.ino b/Cart_Reader/GBA.ino index 049709b..94bf9ea 100644 --- a/Cart_Reader/GBA.ino +++ b/Cart_Reader/GBA.ino @@ -1014,7 +1014,7 @@ unsigned long verifySRAM_GBA(unsigned long sramSize, uint32_t pos) { return writeErrors; } else { - print_Error(F("Can't open file")); + print_Error(open_file_STR); return 1; } } @@ -1202,7 +1202,7 @@ unsigned long verifyFRAM_GBA(unsigned long framSize) { myFile.close(); return writeErrors; } else { - print_Error(F("Can't open file")); + print_Error(open_file_STR); return 1; } } diff --git a/Cart_Reader/GBM.ino b/Cart_Reader/GBM.ino index 2693a5c..e2469bc 100644 --- a/Cart_Reader/GBM.ino +++ b/Cart_Reader/GBM.ino @@ -688,7 +688,7 @@ void writeFlash_GBM() { myFile.close(); print_STR(done_STR, 1); } else { - print_Error(F("Can't open file")); + print_Error(open_file_STR); } } @@ -902,7 +902,7 @@ void writeMapping_GBM() { myFile.close(); print_STR(done_STR, 1); } else { - print_Error(F("Can't open file")); + print_Error(open_file_STR); } } diff --git a/Cart_Reader/GPC.ino b/Cart_Reader/GPC.ino index f9a3ec3..5c48d4c 100644 --- a/Cart_Reader/GPC.ino +++ b/Cart_Reader/GPC.ino @@ -386,7 +386,7 @@ unsigned long verifyRAM_GPC() { myFile.close(); return writeErrors; } else { - print_Error(F("Can't open file")); + print_Error(open_file_STR); return 1; } } diff --git a/Cart_Reader/N64.ino b/Cart_Reader/N64.ino index e8d08a1..7031393 100644 --- a/Cart_Reader/N64.ino +++ b/Cart_Reader/N64.ino @@ -3282,7 +3282,7 @@ void flashRepro_N64() { print_Error(F("failed")); } } else { - print_Error(F("Can't open file")); + print_Error(open_file_STR); } // Prints string out of the common strings array either with or without newline @@ -4066,7 +4066,7 @@ void flashGameshark_N64() { print_Error(did_not_verify_STR); } } else { - print_Error(F("Can't open file")); + print_Error(open_file_STR); } } @@ -4422,7 +4422,7 @@ void flashXplorer_N64() { print_Error(did_not_verify_STR); } } else { - print_Error(F("Can't open file")); + print_Error(open_file_STR); } } diff --git a/Cart_Reader/SNES.ino b/Cart_Reader/SNES.ino index 72007b3..f7bdce2 100644 --- a/Cart_Reader/SNES.ino +++ b/Cart_Reader/SNES.ino @@ -1971,7 +1971,7 @@ unsigned long verifySRAM() { myFile.close(); return writeErrors; } else { - print_Error(F("Can't open file")); + print_Error(open_file_STR); return 1; } } diff --git a/Cart_Reader/SV.ino b/Cart_Reader/SV.ino index e91af24..bed6f5b 100644 --- a/Cart_Reader/SV.ino +++ b/Cart_Reader/SV.ino @@ -398,7 +398,7 @@ unsigned long verifySRAM_SV() { myFile.close(); return writeErrors; } else { - print_Error(F("Can't open file")); + print_Error(open_file_STR); return 1; } }