From 33df3c43b567a4c8f0894f388273c0dd387a392c Mon Sep 17 00:00:00 2001 From: PsyK0p4T <87064902+PsyK0p4T@users.noreply.github.com> Date: Wed, 10 May 2023 20:08:48 +0200 Subject: [PATCH] Update N64.ino Allows to manually select a dump size up to 128 MB (used by some repros/aftermarket boards) --- Cart_Reader/N64.ino | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/Cart_Reader/N64.ino b/Cart_Reader/N64.ino index 4fcb469..4aade9b 100644 --- a/Cart_Reader/N64.ino +++ b/Cart_Reader/N64.ino @@ -87,7 +87,8 @@ static const char N64RomItem3[] PROGMEM = "12 MB"; static const char N64RomItem4[] PROGMEM = "16 MB"; static const char N64RomItem5[] PROGMEM = "32 MB"; static const char N64RomItem6[] PROGMEM = "64 MB"; -static const char* const romOptionsN64[] PROGMEM = { N64RomItem1, N64RomItem2, N64RomItem3, N64RomItem4, N64RomItem5, N64RomItem6 }; +static const char N64RomItem7[] PROGMEM = "128 MB"; +static const char* const romOptionsN64[] PROGMEM = { N64RomItem1, N64RomItem2, N64RomItem3, N64RomItem4, N64RomItem5, N64RomItem6, N64RomItem7 }; // Save menu static const char N64SaveItem1[] PROGMEM = "None"; @@ -1973,8 +1974,8 @@ void printCartInfo_N64() { // Set cartsize manually unsigned char N64RomMenu; // Copy menuOptions out of progmem - convertPgm(romOptionsN64, 6); - N64RomMenu = question_box(F("Select ROM size"), menuOptions, 6, 0); + convertPgm(romOptionsN64, 7); + N64RomMenu = question_box(F("Select ROM size"), menuOptions, 7, 0); // wait for user choice to come back from the question box menu switch (N64RomMenu) { @@ -2007,6 +2008,11 @@ void printCartInfo_N64() { // 64MB cartSize = 64; break; + + case 6: + // 128MB + cartSize = 128; + break; } } } @@ -3107,13 +3113,11 @@ void flashRepro_N64() { sprintf(flashid_str, "%s", "CONF"); sprintf(cartID, "%s", "CONF"); - - // Set cartsize manually unsigned char N64RomMenu; // Copy menuOptions out of progmem - convertPgm(romOptionsN64, 6); - N64RomMenu = question_box(F("Select flash size"), menuOptions, 6, 0); + convertPgm(romOptionsN64, 7); + N64RomMenu = question_box(F("Select flash size"), menuOptions, 7, 0); // wait for user choice to come back from the question box menu switch (N64RomMenu) { @@ -3146,6 +3150,11 @@ void flashRepro_N64() { // 64MB cartSize = 64; break; + + case 6: + // 128MB + cartSize = 128; + break; } // Set flash buffer manually