mirror of
https://github.com/sanni/cartreader.git
synced 2024-12-28 22:11:51 +01:00
V4.8: Add Reset Option to sub menues
This commit is contained in:
parent
aa4621a54d
commit
7b263115a5
@ -2,8 +2,8 @@
|
||||
Cartridge Reader for Arduino Mega2560
|
||||
|
||||
Author: sanni
|
||||
Date: 19.03.2020
|
||||
Version: 4.7
|
||||
Date: 12.04.2020
|
||||
Version: 4.8
|
||||
|
||||
SD lib: https://github.com/greiman/SdFat
|
||||
LCD lib: https://github.com/adafruit/Adafruit_SSD1306
|
||||
@ -43,7 +43,7 @@
|
||||
**********************************************************************************/
|
||||
#include <SdFat.h>
|
||||
|
||||
char ver[5] = "4.7";
|
||||
char ver[5] = "4.8";
|
||||
|
||||
/******************************************
|
||||
Options
|
||||
@ -393,7 +393,7 @@ void aboutScreen() {
|
||||
display.drawBitmap(0, 0, sig, 128, 64, 1);
|
||||
println_Msg(F("Cartridge Reader"));
|
||||
println_Msg(F("github.com/sanni"));
|
||||
print_Msg(F("2019 Version "));
|
||||
print_Msg(F("2020 Version "));
|
||||
println_Msg(ver);
|
||||
println_Msg(F(""));
|
||||
println_Msg(F(""));
|
||||
@ -621,7 +621,7 @@ void setup() {
|
||||
// Serial Begin
|
||||
Serial.begin(9600);
|
||||
Serial.println(F("Cartridge Reader"));
|
||||
Serial.println(F("2019 sanni"));
|
||||
Serial.println(F("2020 sanni"));
|
||||
Serial.println("");
|
||||
// LED Error
|
||||
rgb.setColor(0, 0, 255);
|
||||
|
@ -22,7 +22,8 @@ boolean hiROM = 1;
|
||||
static const char flashMenuItem1[] PROGMEM = "8bit Flash adapter";
|
||||
static const char flashMenuItem2[] PROGMEM = "Eprom adapter";
|
||||
static const char flashMenuItem3[] PROGMEM = "MX26L6420 adapter";
|
||||
static const char* const menuOptionsFlash[] PROGMEM = {flashMenuItem1, flashMenuItem2, flashMenuItem3};
|
||||
static const char flashMenuItem4[] PROGMEM = "Reset";
|
||||
static const char* const menuOptionsFlash[] PROGMEM = {flashMenuItem1, flashMenuItem2, flashMenuItem3, flashMenuItem4};
|
||||
|
||||
// 8bit Flash menu items
|
||||
static const char flash8MenuItem1[] PROGMEM = "Blankcheck";
|
||||
@ -57,8 +58,8 @@ void flashMenu() {
|
||||
// create menu with title and 3 options to choose from
|
||||
unsigned char flashSlot;
|
||||
// Copy menuOptions out of progmem
|
||||
convertPgm(menuOptionsFlash, 3);
|
||||
flashSlot = question_box(F("Select adapter PCB"), menuOptions, 3, 0);
|
||||
convertPgm(menuOptionsFlash, 4);
|
||||
flashSlot = question_box(F("Select adapter PCB"), menuOptions, 4, 0);
|
||||
|
||||
// wait for user choice to come back from the question box menu
|
||||
switch (flashSlot)
|
||||
@ -88,6 +89,10 @@ void flashMenu() {
|
||||
wait();
|
||||
mode = mode_FLASH16;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
resetArduino();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,8 @@ static const char gbxMenuItem1[] PROGMEM = "Game Boy (Color)";
|
||||
static const char gbxMenuItem2[] PROGMEM = "Game Boy Advance";
|
||||
static const char gbxMenuItem3[] PROGMEM = "NPower GB Memory";
|
||||
static const char gbxMenuItem4[] PROGMEM = "GB Smart";
|
||||
static const char* const menuOptionsGBx[] PROGMEM = {gbxMenuItem1, gbxMenuItem2, gbxMenuItem3, gbxMenuItem4};
|
||||
static const char gbxMenuItem5[] PROGMEM = "Reset";
|
||||
static const char* const menuOptionsGBx[] PROGMEM = {gbxMenuItem1, gbxMenuItem2, gbxMenuItem3, gbxMenuItem4, gbxMenuItem5};
|
||||
|
||||
// GB menu items
|
||||
static const char GBMenuItem1[] PROGMEM = "Read Rom";
|
||||
@ -31,11 +32,11 @@ static const char* const menuOptionsGB[] PROGMEM = {GBMenuItem1, GBMenuItem2, GB
|
||||
|
||||
// Start menu for both GB and GBA
|
||||
void gbxMenu() {
|
||||
// create menu with title and 3 options to choose from
|
||||
// create menu with title and 5 options to choose from
|
||||
unsigned char gbType;
|
||||
// Copy menuOptions out of progmem
|
||||
convertPgm(menuOptionsGBx, 4);
|
||||
gbType = question_box(F("Select Game Boy"), menuOptions, 4, 0);
|
||||
convertPgm(menuOptionsGBx, 5);
|
||||
gbType = question_box(F("Select Game Boy"), menuOptions, 5, 0);
|
||||
|
||||
// wait for user choice to come back from the question box menu
|
||||
switch (gbType)
|
||||
@ -67,6 +68,10 @@ void gbxMenu() {
|
||||
setup_GBSmart();
|
||||
mode = mode_GB_GBSmart;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
resetArduino();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -96,11 +96,11 @@ static const char* const saveOptionsN64[] PROGMEM = {N64SaveItem1, N64SaveItem2,
|
||||
|
||||
// N64 start menu
|
||||
void n64Menu() {
|
||||
// create menu with title and 3 options to choose from
|
||||
// create menu with title and 5 options to choose from
|
||||
unsigned char n64Dev;
|
||||
// Copy menuOptions out of progmem
|
||||
convertPgm(menuOptionsN64, 4);
|
||||
n64Dev = question_box(F("Select N64 device"), menuOptions, 4, 0);
|
||||
convertPgm(menuOptionsN64, 5);
|
||||
n64Dev = question_box(F("Select N64 device"), menuOptions, 5, 0);
|
||||
|
||||
// wait for user choice to come back from the question box menu
|
||||
switch (n64Dev)
|
||||
|
@ -47,7 +47,8 @@ uint8_t pce_internal_mode; //0 - HuCARD, 1 - TurboChip
|
||||
// PCE start menu
|
||||
static const char pceMenuItem1[] PROGMEM = "HuCARD";
|
||||
static const char pceMenuItem2[] PROGMEM = "Turbochip";
|
||||
static const char* const menuOptionspce[] PROGMEM = {pceMenuItem1, pceMenuItem2};
|
||||
static const char pceMenuItem3[] PROGMEM = "Reset";
|
||||
static const char* const menuOptionspce[] PROGMEM = {pceMenuItem1, pceMenuItem2, pceMenuItem3};
|
||||
|
||||
// PCE card menu items
|
||||
static const char pceCartMenuItem1[] PROGMEM = "Read Rom";
|
||||
@ -66,8 +67,8 @@ void pcsMenu(void) {
|
||||
// create menu with title and 3 options to choose from
|
||||
unsigned char pceDev;
|
||||
// Copy menuOptions out of progmem
|
||||
convertPgm(menuOptionspce, 2);
|
||||
pceDev = question_box(F("Select device"), menuOptions, 2, 0);
|
||||
convertPgm(menuOptionspce, 3);
|
||||
pceDev = question_box(F("Select device"), menuOptions, 3, 0);
|
||||
|
||||
// wait for user choice to come back from the question box menu
|
||||
switch (pceDev)
|
||||
@ -89,6 +90,10 @@ void pcsMenu(void) {
|
||||
setup_cart_PCE();
|
||||
mode = mode_PCE;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
resetArduino();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ void smsMenu() {
|
||||
|
||||
case 1:
|
||||
// Reset
|
||||
asm volatile (" jmp 0");
|
||||
resetArduino();
|
||||
break;
|
||||
}
|
||||
println_Msg(F(""));
|
||||
|
@ -32,7 +32,8 @@ static const char snsMenuItem2[] PROGMEM = "NPower SF Memory";
|
||||
static const char snsMenuItem3[] PROGMEM = "Satellaview BS-X";
|
||||
static const char snsMenuItem4[] PROGMEM = "HiROM repro";
|
||||
static const char snsMenuItem5[] PROGMEM = "LoROM repro";
|
||||
static const char* const menuOptionsSNS[] PROGMEM = {snsMenuItem1, snsMenuItem2, snsMenuItem3, snsMenuItem4, snsMenuItem5};
|
||||
static const char snsMenuItem6[] PROGMEM = "Reset";
|
||||
static const char* const menuOptionsSNS[] PROGMEM = {snsMenuItem1, snsMenuItem2, snsMenuItem3, snsMenuItem4, snsMenuItem5, snsMenuItem6};
|
||||
|
||||
// SNES menu items
|
||||
static const char SnesMenuItem1[] PROGMEM = "Read Rom";
|
||||
@ -53,11 +54,11 @@ static const char* const menuOptionsConfManual[] PROGMEM = {confMenuItem1, confM
|
||||
|
||||
// SNES start menu
|
||||
void snsMenu() {
|
||||
// create menu with title and 4 options to choose from
|
||||
// create menu with title and 6 options to choose from
|
||||
unsigned char snsCart;
|
||||
// Copy menuOptions out of progmem
|
||||
convertPgm(menuOptionsSNS, 5);
|
||||
snsCart = question_box(F("Select Cart Type"), menuOptions, 5, 0);
|
||||
convertPgm(menuOptionsSNS, 6);
|
||||
snsCart = question_box(F("Select Cart Type"), menuOptions, 6, 0);
|
||||
|
||||
// wait for user choice to come back from the question box menu
|
||||
switch (snsCart)
|
||||
@ -102,6 +103,10 @@ void snsMenu() {
|
||||
wait();
|
||||
mode = mode_FLASH8;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
resetArduino();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user