mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-27 23:14:14 +01:00
Update SNES.ino
Add Sufami Turbo support
This commit is contained in:
parent
0287ea8ed2
commit
70d52636d7
@ -32,14 +32,15 @@ boolean altconf = 0;
|
|||||||
static const char snsMenuItem1[] PROGMEM = "SNES/SFC cartridge";
|
static const char snsMenuItem1[] PROGMEM = "SNES/SFC cartridge";
|
||||||
static const char snsMenuItem2[] PROGMEM = "SF Memory Cassette";
|
static const char snsMenuItem2[] PROGMEM = "SF Memory Cassette";
|
||||||
static const char snsMenuItem3[] PROGMEM = "Satellaview BS-X";
|
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
|
#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 snsMenuItem6[] PROGMEM = "Reset"; (stored in common strings array)
|
||||||
static const char* const menuOptionsSNS[] PROGMEM = { snsMenuItem1, snsMenuItem2, snsMenuItem3, snsMenuItem4, snsMenuItem5, string_reset2 };
|
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
|
#endif
|
||||||
|
|
||||||
// SNES menu items
|
// SNES menu items
|
||||||
@ -132,15 +133,15 @@ void reproMenu() {
|
|||||||
|
|
||||||
// SNES start menu
|
// SNES start menu
|
||||||
void snsMenu() {
|
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;
|
unsigned char snsCart;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
#ifdef clockgen_calibration
|
#ifdef clockgen_calibration
|
||||||
|
convertPgm(menuOptionsSNS, 7);
|
||||||
|
snsCart = question_box(F("Select Cart Type"), menuOptions, 7, 0);
|
||||||
|
#else
|
||||||
convertPgm(menuOptionsSNS, 6);
|
convertPgm(menuOptionsSNS, 6);
|
||||||
snsCart = question_box(F("Select Cart Type"), menuOptions, 6, 0);
|
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
|
#endif
|
||||||
|
|
||||||
// wait for user choice to come back from the question box menu
|
// wait for user choice to come back from the question box menu
|
||||||
@ -170,19 +171,28 @@ void snsMenu() {
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef enable_FLASH
|
#ifdef enable_ST
|
||||||
case 3:
|
case 3:
|
||||||
|
display_Clear();
|
||||||
|
display_Update();
|
||||||
|
setup_ST();
|
||||||
|
mode = mode_ST;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef enable_FLASH
|
||||||
|
case 4:
|
||||||
setup_FlashVoltage();
|
setup_FlashVoltage();
|
||||||
reproMenu();
|
reproMenu();
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
case 4:
|
case 5:
|
||||||
#ifdef clockgen_calibration
|
#ifdef clockgen_calibration
|
||||||
clkcal();
|
clkcal();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 6:
|
||||||
#endif
|
#endif
|
||||||
resetArduino();
|
resetArduino();
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user