Skip to content

Commit

Permalink
N64.ino: Handle reused global from FLASH.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
Ancyker committed Sep 14, 2023
1 parent 4f8ef61 commit 74fba5e
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions Cart_Reader/N64.ino
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ String CRC1 = "";
String CRC2 = "";
#endif

#if !defined(enable_FLASH)
unsigned long flashSize;
#endif

static const char N64_EEP_FILENAME_FMT[] PROGMEM = "%s.eep";
static const char N64_SAVE_DIRNAME_FMT[] PROGMEM = "N64/SAVE/%s/%d";

Expand Down Expand Up @@ -4181,15 +4185,15 @@ void idGameshark_N64() {
} else if (flashid == 0x0404) {
//Set SST 28LF040 flashrom size
flashSize = 1048574;
} else {
println_Msg(F("Check cart connection"));
println_Msg(F("Unknown Flash ID"));
sprintf(flashid_str, "%04X", flashid);
print_STR(press_button_STR, 1);
display_Update();
wait();
mainMenu();
}
} else {
println_Msg(F("Check cart connection"));
println_Msg(F("Unknown Flash ID"));
sprintf(flashid_str, "%04X", flashid);
print_STR(press_button_STR, 1);
display_Update();
wait();
mainMenu();
}
sprintf(flashid_str, "%04X", flashid);
// Reset flashrom
resetGameshark_N64();
Expand Down

0 comments on commit 74fba5e

Please sign in to comment.