Update SNES.ino

Add Sufami Turbo support
This commit is contained in:
PsyK0p4T 2023-11-25 00:32:51 +01:00 committed by GitHub
parent 0287ea8ed2
commit 70d52636d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,14 +32,15 @@ boolean altconf = 0;
static const char snsMenuItem1[] PROGMEM = "SNES/SFC cartridge";
static const char snsMenuItem2[] PROGMEM = "SF Memory Cassette";
static const char snsMenuItem3[] PROGMEM = "Satellaview BS-X";
static const char snsMenuItem4[] PROGMEM = "Flash repro";
static const char snsMenuItem4[] PROGMEM = "Sufami Turbo";
static const char snsMenuItem5[] PROGMEM = "Flash repro";
#ifdef clockgen_calibration
static const char snsMenuItem5[] PROGMEM = "Calibrate Clock";
static const char snsMenuItem6[] PROGMEM = "Calibrate Clock";
//static const char snsMenuItem7[] PROGMEM = "Reset"; (stored in common strings array)
static const char* const menuOptionsSNS[] PROGMEM = { snsMenuItem1, snsMenuItem2, snsMenuItem3, snsMenuItem4, snsMenuItem5, snsMenuItem6, string_reset2 };
#else
//static const char snsMenuItem6[] PROGMEM = "Reset"; (stored in common strings array)
static const char* const menuOptionsSNS[] PROGMEM = { snsMenuItem1, snsMenuItem2, snsMenuItem3, snsMenuItem4, snsMenuItem5, string_reset2 };
#else
//static const char snsMenuItem5[] PROGMEM = "Reset"; (stored in common strings array)
static const char* const menuOptionsSNS[] PROGMEM = { snsMenuItem1, snsMenuItem2, snsMenuItem3, snsMenuItem4, string_reset2 };
#endif
// SNES menu items
@ -132,15 +133,15 @@ void reproMenu() {
// SNES start menu
void snsMenu() {
// create menu with title and 6 options to choose from
// create menu with title and 7 options to choose from
unsigned char snsCart;
// Copy menuOptions out of progmem
#ifdef clockgen_calibration
convertPgm(menuOptionsSNS, 7);
snsCart = question_box(F("Select Cart Type"), menuOptions, 7, 0);
#else
convertPgm(menuOptionsSNS, 6);
snsCart = question_box(F("Select Cart Type"), menuOptions, 6, 0);
#else
convertPgm(menuOptionsSNS, 5);
snsCart = question_box(F("Select Cart Type"), menuOptions, 5, 0);
#endif
// wait for user choice to come back from the question box menu
@ -170,19 +171,28 @@ void snsMenu() {
break;
#endif
#ifdef enable_FLASH
#ifdef enable_ST
case 3:
display_Clear();
display_Update();
setup_ST();
mode = mode_ST;
break;
#endif
#ifdef enable_FLASH
case 4:
setup_FlashVoltage();
reproMenu();
break;
#endif
case 4:
case 5:
#ifdef clockgen_calibration
clkcal();
break;
case 5:
case 6:
#endif
resetArduino();
break;