replace duplicate error string "Can't open file"

This commit is contained in:
smesgr9000 2024-06-16 00:39:21 +02:00
parent ee6a7fe41f
commit e1bd042d82
7 changed files with 11 additions and 12 deletions

View File

@ -151,7 +151,7 @@ uint8_t readData_COL(uint32_t addr) {
return ret; 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 (uint32_t addr = startaddr; addr < endaddr; addr += 512) {
for (int w = 0; w < 512; w++) { for (int w = 0; w < 512; w++) {
uint8_t temp = readData_COL(addr + w); uint8_t temp = readData_COL(addr + w);
@ -166,7 +166,6 @@ void readROM_COL() {
// RESET ALL CS PINS HIGH (DISABLE) // RESET ALL CS PINS HIGH (DISABLE)
PORTH |= (1 << 3) | (1 << 4) | (1 << 5) | (1 << 6); PORTH |= (1 << 3) | (1 << 4) | (1 << 5) | (1 << 6);
readSegment_COL(0x8000, 0xA000); // 8K readSegment_COL(0x8000, 0xA000); // 8K
if (colsize > 0) { if (colsize > 0) {
readSegment_COL(0xA000, 0xB000); // +4K = 12K readSegment_COL(0xA000, 0xB000); // +4K = 12K

View File

@ -1014,7 +1014,7 @@ unsigned long verifySRAM_GBA(unsigned long sramSize, uint32_t pos) {
return writeErrors; return writeErrors;
} else { } else {
print_Error(F("Can't open file")); print_Error(open_file_STR);
return 1; return 1;
} }
} }
@ -1202,7 +1202,7 @@ unsigned long verifyFRAM_GBA(unsigned long framSize) {
myFile.close(); myFile.close();
return writeErrors; return writeErrors;
} else { } else {
print_Error(F("Can't open file")); print_Error(open_file_STR);
return 1; return 1;
} }
} }

View File

@ -688,7 +688,7 @@ void writeFlash_GBM() {
myFile.close(); myFile.close();
print_STR(done_STR, 1); print_STR(done_STR, 1);
} else { } else {
print_Error(F("Can't open file")); print_Error(open_file_STR);
} }
} }
@ -902,7 +902,7 @@ void writeMapping_GBM() {
myFile.close(); myFile.close();
print_STR(done_STR, 1); print_STR(done_STR, 1);
} else { } else {
print_Error(F("Can't open file")); print_Error(open_file_STR);
} }
} }

View File

@ -386,7 +386,7 @@ unsigned long verifyRAM_GPC() {
myFile.close(); myFile.close();
return writeErrors; return writeErrors;
} else { } else {
print_Error(F("Can't open file")); print_Error(open_file_STR);
return 1; return 1;
} }
} }

View File

@ -3282,7 +3282,7 @@ void flashRepro_N64() {
print_Error(F("failed")); print_Error(F("failed"));
} }
} else { } 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 // 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); print_Error(did_not_verify_STR);
} }
} else { } 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); print_Error(did_not_verify_STR);
} }
} else { } else {
print_Error(F("Can't open file")); print_Error(open_file_STR);
} }
} }

View File

@ -1971,7 +1971,7 @@ unsigned long verifySRAM() {
myFile.close(); myFile.close();
return writeErrors; return writeErrors;
} else { } else {
print_Error(F("Can't open file")); print_Error(open_file_STR);
return 1; return 1;
} }
} }

View File

@ -398,7 +398,7 @@ unsigned long verifySRAM_SV() {
myFile.close(); myFile.close();
return writeErrors; return writeErrors;
} else { } else {
print_Error(F("Can't open file")); print_Error(open_file_STR);
return 1; return 1;
} }
} }