V30C: Removed Nintendo Power Menu entry

Nintendo Power SF Memory is now found under the SNES and Nintendo Power GB Memory under the Game Boy submenu.
This commit is contained in:
sanni 2017-11-19 21:03:37 +01:00 committed by GitHub
parent 0ab9f7f120
commit 13657e3a13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 55 additions and 59 deletions

View File

@ -2,8 +2,8 @@
Cartridge Reader for Arduino Mega2560 Cartridge Reader for Arduino Mega2560
Author: sanni Author: sanni
Date: 2017-11-17 Date: 2017-11-19
Version: V30B Version: V30C
SD lib: https://github.com/greiman/SdFat SD lib: https://github.com/greiman/SdFat
LCD lib: https://github.com/adafruit/Adafruit_SSD1306 LCD lib: https://github.com/adafruit/Adafruit_SSD1306
@ -35,7 +35,7 @@
infinest - help with GB Memory cart infinest - help with GB Memory cart
**********************************************************************************/ **********************************************************************************/
char ver[5] = "V30B"; char ver[5] = "V30C";
/****************************************** /******************************************
Define Starting Point Define Starting Point
@ -325,12 +325,11 @@ static const unsigned char PROGMEM sig [] = {
// Main menu // Main menu
static const char modeItem1[] PROGMEM = "Nintendo 64"; static const char modeItem1[] PROGMEM = "Nintendo 64";
static const char modeItem2[] PROGMEM = "Super Nintendo"; static const char modeItem2[] PROGMEM = "Super Nintendo";
static const char modeItem3[] PROGMEM = "Nintendo Power"; static const char modeItem3[] PROGMEM = "Game Boy";
static const char modeItem4[] PROGMEM = "Game Boy"; static const char modeItem4[] PROGMEM = "Mega Drive";
static const char modeItem5[] PROGMEM = "Mega Drive"; static const char modeItem5[] PROGMEM = "Flashrom Programmer";
static const char modeItem6[] PROGMEM = "Flashrom Programmer"; static const char modeItem6[] PROGMEM = "About";
static const char modeItem7[] PROGMEM = "About"; static const char* const modeOptions[] PROGMEM = {modeItem1, modeItem2, modeItem3, modeItem4, modeItem5, modeItem6};
static const char* const modeOptions[] PROGMEM = {modeItem1, modeItem2, modeItem3, modeItem4, modeItem5, modeItem6, modeItem7};
void aboutScreen() { void aboutScreen() {
display_Clear(); display_Clear();
@ -386,8 +385,8 @@ void mainMenu() {
// create menu with title and 6 options to choose from // create menu with title and 6 options to choose from
unsigned char modeMenu; unsigned char modeMenu;
// Copy menuOptions out of progmem // Copy menuOptions out of progmem
convertPgm(modeOptions, 7); convertPgm(modeOptions, 6);
modeMenu = question_box("Cartridge Reader", menuOptions, 7, 0); modeMenu = question_box("Cartridge Reader", menuOptions, 6, 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 (modeMenu) switch (modeMenu)
@ -401,22 +400,18 @@ void mainMenu() {
break; break;
case 2: case 2:
npMenu();
break;
case 3:
gbxMenu(); gbxMenu();
break; break;
case 4: case 3:
segaMenu(); segaMenu();
break; break;
case 5: case 4:
flashMenu(); flashMenu();
break; break;
case 6: case 5:
aboutScreen(); aboutScreen();
break; break;
} }
@ -682,8 +677,8 @@ byte questionBox_Serial(const char* question, char answers[7][20], int num_answe
} }
// Print the received byte for validation e.g. in case of a different keyboard mapping // Print the received byte for validation e.g. in case of a different keyboard mapping
Serial.println(incomingByte); //Serial.println(incomingByte);
Serial.println(""); //Serial.println("");
return incomingByte; return incomingByte;
} }

View File

@ -16,7 +16,8 @@ uint16_t sramEndAddress = 0;
// GBx start menu // GBx start menu
static const char gbxMenuItem1[] PROGMEM = "Game Boy (Color)"; static const char gbxMenuItem1[] PROGMEM = "Game Boy (Color)";
static const char gbxMenuItem2[] PROGMEM = "Game Boy Advance"; static const char gbxMenuItem2[] PROGMEM = "Game Boy Advance";
static const char* const menuOptionsGBx[] PROGMEM = {gbxMenuItem1, gbxMenuItem2}; static const char gbxMenuItem3[] PROGMEM = "NP GB Memory";
static const char* const menuOptionsGBx[] PROGMEM = {gbxMenuItem1, gbxMenuItem2, gbxMenuItem3};
// GB menu items // GB menu items
static const char GBMenuItem1[] PROGMEM = "Read Rom"; static const char GBMenuItem1[] PROGMEM = "Read Rom";
@ -28,11 +29,11 @@ static const char* const menuOptionsGB[] PROGMEM = {GBMenuItem1, GBMenuItem2, GB
// Start menu for both GB and GBA // Start menu for both GB and GBA
void gbxMenu() { void gbxMenu() {
// create menu with title and 2 options to choose from // create menu with title and 3 options to choose from
unsigned char gbType; unsigned char gbType;
// Copy menuOptions out of progmem // Copy menuOptions out of progmem
convertPgm(menuOptionsGBx, 2); convertPgm(menuOptionsGBx, 3);
gbType = question_box("Select Game Boy", menuOptions, 2, 0); gbType = question_box("Select Game Boy", menuOptions, 3, 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 (gbType) switch (gbType)
@ -50,6 +51,13 @@ void gbxMenu() {
setup_GBA(); setup_GBA();
mode = mode_GBA; mode = mode_GBA;
break; break;
case 2:
display_Clear();
display_Update();
setup_GBM();
mode = mode_GBM;
break;
} }
} }

View File

@ -35,11 +35,6 @@ boolean hirom[8];
/****************************************** /******************************************
Menu Menu
*****************************************/ *****************************************/
// Nintendo Power start menu
static const char npMenuItem1[] PROGMEM = "SF Memory";
static const char npMenuItem2[] PROGMEM = "GB Memory";
static const char* const menuOptionsNP[] PROGMEM = {npMenuItem1, npMenuItem2};
// SFM menu items // SFM menu items
static const char sfmMenuItem1[] PROGMEM = "Game Menu"; static const char sfmMenuItem1[] PROGMEM = "Game Menu";
static const char sfmMenuItem2[] PROGMEM = "Flash Menu"; static const char sfmMenuItem2[] PROGMEM = "Flash Menu";
@ -63,32 +58,6 @@ static const char sfmGameMenuItem4[] PROGMEM = "Switch Game";
static const char sfmGameMenuItem5[] PROGMEM = "Reset"; static const char sfmGameMenuItem5[] PROGMEM = "Reset";
static const char* const menuOptionsSFMGame[] PROGMEM = {sfmGameMenuItem1, sfmGameMenuItem2, sfmGameMenuItem3, sfmGameMenuItem4, sfmGameMenuItem5}; static const char* const menuOptionsSFMGame[] PROGMEM = {sfmGameMenuItem1, sfmGameMenuItem2, sfmGameMenuItem3, sfmGameMenuItem4, sfmGameMenuItem5};
void npMenu() {
// create menu with title and 2 options to choose from
unsigned char npCart;
// Copy menuOptions out of progmem
convertPgm(menuOptionsNP, 2);
npCart = question_box("Select NP Cart", menuOptions, 2, 0);
// wait for user choice to come back from the question box menu
switch (npCart)
{
case 0:
display_Clear();
display_Update();
setup_SFM();
mode = mode_SFM;
break;
case 1:
display_Clear();
display_Update();
setup_GBM();
mode = mode_GBM;
break;
}
}
void sfmMenu() { void sfmMenu() {
// create menu with title and 3 options to choose from // create menu with title and 3 options to choose from
unsigned char mainMenu; unsigned char mainMenu;

View File

@ -25,6 +25,11 @@ boolean NP = false;
/****************************************** /******************************************
Menu Menu
*****************************************/ *****************************************/
// SNES/Nintendo Power SF Memory start menu
static const char snsMenuItem1[] PROGMEM = "SNES SFC";
static const char snsMenuItem2[] PROGMEM = "NP SF Memory";
static const char* const menuOptionsSNS[] PROGMEM = {snsMenuItem1, snsMenuItem2};
// SNES menu items // SNES menu items
static const char SnesMenuItem1[] PROGMEM = "Read Rom"; static const char SnesMenuItem1[] PROGMEM = "Read Rom";
static const char SnesMenuItem2[] PROGMEM = "Read Save"; static const char SnesMenuItem2[] PROGMEM = "Read Save";
@ -44,10 +49,29 @@ static const char* const menuOptionsConf[] PROGMEM = {confMenuItem1, confMenuIte
// SNES start menu // SNES start menu
void snsMenu() { void snsMenu() {
display_Clear(); // create menu with title and 2 options to choose from
display_Update(); unsigned char snsCart;
setup_Snes(); // Copy menuOptions out of progmem
mode = mode_SNES; convertPgm(menuOptionsSNS, 2);
snsCart = question_box("Select Cart Type", menuOptions, 2, 0);
// wait for user choice to come back from the question box menu
switch (snsCart)
{
case 0:
display_Clear();
display_Update();
setup_Snes();
mode = mode_SNES;
break;
case 1:
display_Clear();
display_Update();
setup_SFM();
mode = mode_SFM;
break;
}
} }
// SNES Menu // SNES Menu