mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-30 08:24:14 +01:00
Move automatic voltage selection from menu to setup functions
This commit is contained in:
parent
4a5c4a5fca
commit
dee54dd30e
@ -56,6 +56,11 @@ static const char arcMenuItem4[] PROGMEM = "Reset";
|
||||
static const char* const menuOptionsARC[] PROGMEM = { arcMenuItem1, arcMenuItem2, arcMenuItem3, arcMenuItem4 };
|
||||
|
||||
void setup_ARC() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 5V
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
#endif
|
||||
|
||||
// Set Address Pins to Output
|
||||
// Arcadia 2001 uses A0-A13 [A14-A23 UNUSED]
|
||||
//A0-A7
|
||||
@ -94,7 +99,6 @@ void setup_ARC() {
|
||||
}
|
||||
|
||||
void arcMenu() {
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
convertPgm(menuOptionsARC, 4);
|
||||
uint8_t mainMenu = question_box(F("ARCADIA 2001 MENU"), menuOptions, 4, 0);
|
||||
|
||||
|
@ -63,6 +63,11 @@ static const char atariMenuItem4[] PROGMEM = "Reset";
|
||||
static const char* const menuOptionsATARI[] PROGMEM = { atariMenuItem1, atariMenuItem2, atariMenuItem3, atariMenuItem4 };
|
||||
|
||||
void setup_ATARI() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 5V
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
#endif
|
||||
|
||||
// Set Address Pins to Output
|
||||
// Atari 2600 uses A0-A12 [A13-A23 UNUSED]
|
||||
//A0-A7
|
||||
@ -101,7 +106,6 @@ void setup_ATARI() {
|
||||
}
|
||||
|
||||
void atariMenu() {
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
convertPgm(menuOptionsATARI, 4);
|
||||
uint8_t mainMenu = question_box(F("ATARI 2600 MENU"), menuOptions, 4, 0);
|
||||
|
||||
|
@ -55,6 +55,11 @@ static const char colMenuItem3[] PROGMEM = "Set Size";
|
||||
static const char* const menuOptionsCOL[] PROGMEM = { colMenuItem1, colMenuItem2, colMenuItem3, string_reset2 };
|
||||
|
||||
void setup_COL() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 5V
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
#endif
|
||||
|
||||
// Set Address Pins to Output
|
||||
// Colecovision uses A0-A14 [A15-A23 UNUSED]
|
||||
//A0-A7
|
||||
@ -93,7 +98,6 @@ void setup_COL() {
|
||||
}
|
||||
|
||||
void colMenu() {
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
convertPgm(menuOptionsCOL, 4);
|
||||
uint8_t mainMenu = question_box(F("COLECOVISION MENU"), menuOptions, 4, 0);
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
This project represents a community-driven effort to provide
|
||||
an easy to build and easy to modify cartridge dumper.
|
||||
|
||||
Date: 2023-06-25
|
||||
Date: 2023-06-26
|
||||
Version: 12.6
|
||||
|
||||
SD lib: https://github.com/greiman/SdFat
|
||||
@ -837,7 +837,7 @@ static const char modeItem9[] PROGMEM = "NeoGeo Pocket (3V)";
|
||||
static const char modeItem10[] PROGMEM = "Intellivision";
|
||||
static const char modeItem11[] PROGMEM = "Colecovision";
|
||||
static const char modeItem12[] PROGMEM = "Virtual Boy";
|
||||
static const char modeItem13[] PROGMEM = "Watara Supervision";
|
||||
static const char modeItem13[] PROGMEM = "Watara Supervision (3V)";
|
||||
static const char modeItem14[] PROGMEM = "Pocket Challenge W";
|
||||
static const char modeItem15[] PROGMEM = "Atari 2600";
|
||||
static const char modeItem16[] PROGMEM = "Magnavox Odyssey 2";
|
||||
@ -847,7 +847,7 @@ static const char modeItem19[] PROGMEM = "Super A'can";
|
||||
static const char modeItem20[] PROGMEM = "MSX";
|
||||
static const char modeItem21[] PROGMEM = "Pokemon Mini (3V)";
|
||||
static const char modeItem22[] PROGMEM = "Flashrom Programmer";
|
||||
static const char modeItem23[] PROGMEM = "Self Test";
|
||||
static const char modeItem23[] PROGMEM = "Self Test (3V)";
|
||||
static const char modeItem24[] PROGMEM = "About";
|
||||
//static const char modeItem25[] PROGMEM = "Reset"; (stored in common strings array)
|
||||
static const char* const modeOptions[] PROGMEM = { modeItem1, modeItem2, modeItem3, modeItem4, modeItem5, modeItem6, modeItem7, modeItem8, modeItem9, modeItem10, modeItem11, modeItem12, modeItem13, modeItem14, modeItem15, modeItem16, modeItem17, modeItem18, modeItem19, modeItem20, modeItem21, modeItem22, modeItem23, modeItem24, string_reset2 };
|
||||
@ -1046,6 +1046,9 @@ void mainMenu() {
|
||||
|
||||
#ifdef enable_FLASH
|
||||
case 21:
|
||||
#ifdef ENABLE_VSELECT
|
||||
setup_FlashVoltage();
|
||||
#endif
|
||||
flashMenu();
|
||||
break;
|
||||
#endif
|
||||
@ -1123,7 +1126,7 @@ static const char* const consoles90Options[] PROGMEM = { consoles90Item1, string
|
||||
static const char handheldsItem1[] PROGMEM = "Virtual Boy";
|
||||
static const char handheldsItem2[] PROGMEM = "WonderSwan (3V)";
|
||||
static const char handheldsItem3[] PROGMEM = "NeoGeo Pocket (3V)";
|
||||
static const char handheldsItem4[] PROGMEM = "Watara Supervision";
|
||||
static const char handheldsItem4[] PROGMEM = "Watara Supervision (3V)";
|
||||
static const char handheldsItem5[] PROGMEM = "Pocket Challenge W";
|
||||
static const char handheldsItem6[] PROGMEM = "Pokemon Mini (3V)";
|
||||
//static const char handheldsItem6[] PROGMEM = "Reset"; (stored in common strings array)
|
||||
@ -1211,6 +1214,9 @@ void addonMenu() {
|
||||
|
||||
#ifdef enable_FLASH
|
||||
case 4:
|
||||
#ifdef ENABLE_VSELECT
|
||||
setup_FlashVoltage();
|
||||
#endif
|
||||
flashMenu();
|
||||
break;
|
||||
#endif
|
||||
@ -1439,6 +1445,11 @@ void handheldMenu() {
|
||||
#ifdef enable_selftest
|
||||
|
||||
void selfTest() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 3V
|
||||
setVoltage(VOLTS_SET_3V3);
|
||||
#endif
|
||||
|
||||
display_Clear();
|
||||
println_Msg(F("Self Test"));
|
||||
println_Msg(F(""));
|
||||
@ -2134,7 +2145,7 @@ void setup() {
|
||||
statusLED(true);
|
||||
|
||||
// Start menu system
|
||||
startMenu();
|
||||
mainMenu();
|
||||
}
|
||||
|
||||
/******************************************
|
||||
|
@ -279,19 +279,6 @@
|
||||
|
||||
/****/
|
||||
|
||||
/* [ Start Menu --------------------------------------------------- ]
|
||||
* Change this when using a single slot cart reader to always start
|
||||
* in that menu.
|
||||
*
|
||||
* OPTIONS :
|
||||
* mainMenu, snsMenu, mdMenu, n64Menu, gbxMenu, pcsMenu,
|
||||
* flashMenu, nesMenu, smsMenu
|
||||
*/
|
||||
|
||||
#define startMenu mainMenu
|
||||
|
||||
/****/
|
||||
|
||||
/* [ Logging ------------------------------------------------------ ]
|
||||
* Write all info to OSCR_LOG.txt in root dir
|
||||
*/
|
||||
|
@ -87,6 +87,11 @@ static const char fairchildMenuItem5[] PROGMEM = "Reset";
|
||||
static const char* const menuOptionsFAIRCHILD[] PROGMEM = { fairchildMenuItem1, fairchildMenuItem2, fairchildMenuItem3, fairchildMenuItem4, fairchildMenuItem5 };
|
||||
|
||||
void setup_FAIRCHILD() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 5V
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
#endif
|
||||
|
||||
// Set Address Pins to Output
|
||||
// Channel F uses A0-A4 [A5-A23 UNUSED]
|
||||
//A0-A7
|
||||
@ -126,7 +131,6 @@ void setup_FAIRCHILD() {
|
||||
}
|
||||
|
||||
void fairchildMenu() {
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
convertPgm(menuOptionsFAIRCHILD, 5);
|
||||
uint8_t mainMenu = question_box(F("CHANNEL F MENU"), menuOptions, 5, 0);
|
||||
|
||||
|
@ -680,6 +680,38 @@ void id_Flash16() {
|
||||
/******************************************
|
||||
Setup
|
||||
*****************************************/
|
||||
#ifdef ENABLE_VSELECT
|
||||
static const char flashvoltItem1[] PROGMEM = "3.3V";
|
||||
static const char flashvoltItem2[] PROGMEM = "5V";
|
||||
//static const char flashvoltItem3[] PROGMEM = "Reset"; (stored in common strings array)
|
||||
static const char* const flashvoltOptions[] PROGMEM = { flashvoltItem1, flashvoltItem2, string_reset2 };
|
||||
|
||||
void setup_FlashVoltage() {
|
||||
// create menu with title and 3 options to choose from
|
||||
unsigned char flashvolt;
|
||||
// Copy menuOptions out of progmem
|
||||
convertPgm(flashvoltOptions, 3);
|
||||
flashvolt = question_box(F("Select Flash Voltage"), menuOptions, 3, 0);
|
||||
|
||||
// wait for user choice to come back from the question box menu
|
||||
switch (flashvolt) {
|
||||
case 0:
|
||||
// Set Automatic Voltage Selection to 3V
|
||||
setVoltage(VOLTS_SET_3V3);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
// Set Automatic Voltage Selection to 5V
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
resetArduino();
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void setup_Flash8() {
|
||||
// Set Address Pins to Output
|
||||
//A0-A7
|
||||
|
@ -41,8 +41,7 @@ static const char* const menuOptionsGBFlash[] PROGMEM = { GBFlashItem1, GBFlashI
|
||||
|
||||
// Start menu for both GB and GBA
|
||||
void gbxMenu() {
|
||||
setVoltage(VOLTS_SET_3V3);
|
||||
// create menu with title and 4 options to choose from
|
||||
// create menu with title and 5 options to choose from
|
||||
unsigned char gbType;
|
||||
// Copy menuOptions out of progmem
|
||||
convertPgm(menuOptionsGBx, 5);
|
||||
@ -51,7 +50,6 @@ void gbxMenu() {
|
||||
// wait for user choice to come back from the question box menu
|
||||
switch (gbType) {
|
||||
case 0:
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
display_Clear();
|
||||
display_Update();
|
||||
setup_GB();
|
||||
@ -59,7 +57,6 @@ void gbxMenu() {
|
||||
break;
|
||||
|
||||
case 1:
|
||||
setVoltage(VOLTS_SET_3V3);
|
||||
display_Clear();
|
||||
display_Update();
|
||||
setup_GBA();
|
||||
@ -69,7 +66,6 @@ void gbxMenu() {
|
||||
case 2:
|
||||
// create submenu with title and 7 options to choose from
|
||||
unsigned char gbFlash;
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
// Copy menuOptions out of progmem
|
||||
convertPgm(menuOptionsGBFlash, 7);
|
||||
gbFlash = question_box(F("Select type"), menuOptions, 7, 0);
|
||||
@ -97,7 +93,6 @@ void gbxMenu() {
|
||||
|
||||
case 1:
|
||||
//Flash MBC5
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
display_Clear();
|
||||
display_Update();
|
||||
setup_GB();
|
||||
@ -291,7 +286,7 @@ void gbxMenu() {
|
||||
}
|
||||
|
||||
void gbMenu() {
|
||||
// create menu with title and 3 options to choose from
|
||||
// create menu with title and 4 options to choose from
|
||||
unsigned char mainMenu;
|
||||
// Copy menuOptions out of progmem
|
||||
convertPgm(menuOptionsGB, 4);
|
||||
@ -375,6 +370,11 @@ void gbMenu() {
|
||||
Setup
|
||||
*****************************************/
|
||||
void setup_GB() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 5V
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
#endif
|
||||
|
||||
// Set Address Pins to Output
|
||||
//A0-A7
|
||||
DDRF = 0xFF;
|
||||
|
@ -34,7 +34,6 @@ static const char GBASaveItem6[] PROGMEM = "1M FLASH";
|
||||
static const char* const saveOptionsGBA[] PROGMEM = { GBASaveItem1, GBASaveItem2, GBASaveItem3, GBASaveItem4, GBASaveItem5, GBASaveItem6 };
|
||||
|
||||
void gbaMenu() {
|
||||
setVoltage(VOLTS_SET_3V3);
|
||||
// create menu with title and 4 options to choose from
|
||||
unsigned char mainMenu;
|
||||
// Copy menuOptions out of progmem
|
||||
@ -247,6 +246,11 @@ void gbaMenu() {
|
||||
Setup
|
||||
*****************************************/
|
||||
void setup_GBA() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 3V
|
||||
setVoltage(VOLTS_SET_3V3);
|
||||
#endif
|
||||
|
||||
setROM_GBA();
|
||||
|
||||
// Get cart info
|
||||
|
@ -17,7 +17,6 @@ static const char gbmMenuItem7[] PROGMEM = "Write Mapping";
|
||||
static const char* const menuOptionsGBM[] PROGMEM = { gbmMenuItem1, gbmMenuItem2, gbmMenuItem3, gbmMenuItem4, gbmMenuItem5, gbmMenuItem6, gbmMenuItem7 };
|
||||
|
||||
void gbmMenu() {
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
// create menu with title and 7 options to choose from
|
||||
unsigned char mainMenu;
|
||||
// Copy menuOptions out of progmem
|
||||
@ -185,6 +184,11 @@ void gbmMenu() {
|
||||
Setup
|
||||
*****************************************/
|
||||
void setup_GBM() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 5V
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
#endif
|
||||
|
||||
// Set RST(PH0) to Input
|
||||
DDRH &= ~(1 << 0);
|
||||
// Activate Internal Pullup Resistors
|
||||
|
@ -109,6 +109,11 @@ byte readByte_GBS(word myAddress) {
|
||||
}
|
||||
|
||||
void setup_GBSmart() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 5V
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
#endif
|
||||
|
||||
// take from setup_GB
|
||||
// Set RST(PH0) to Input
|
||||
DDRH &= ~(1 << 0);
|
||||
@ -145,7 +150,6 @@ void setup_GBSmart() {
|
||||
}
|
||||
|
||||
void gbSmartMenu() {
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
uint8_t mainMenu;
|
||||
|
||||
// Copy menuOptions out of progmem
|
||||
|
@ -99,6 +99,11 @@ static const char intvMenuItem3[] PROGMEM = "Set Mapper + Size";
|
||||
static const char* const menuOptionsINTV[] PROGMEM = { intvMenuItem1, intvMenuItem2, intvMenuItem3, string_reset2 };
|
||||
|
||||
void setup_INTV() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 5V
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
#endif
|
||||
|
||||
// Set Address Pins to Output (UNUSED)
|
||||
//A0-A7
|
||||
DDRF = 0xFF;
|
||||
@ -135,7 +140,6 @@ void setup_INTV() {
|
||||
}
|
||||
|
||||
void intvMenu() {
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
convertPgm(menuOptionsINTV, 4);
|
||||
uint8_t mainMenu = question_box(F("INTELLIVISION MENU"), menuOptions, 4, 0);
|
||||
|
||||
|
@ -217,7 +217,6 @@ static const char* const menuOptionsSCD[] PROGMEM = { SCDMenuItem1, SCDMenuItem2
|
||||
|
||||
// Sega start menu
|
||||
void mdMenu() {
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
// create menu with title and 4 options to choose from
|
||||
unsigned char mdDev;
|
||||
// Copy menuOptions out of progmem
|
||||
@ -464,6 +463,11 @@ void segaCDMenu() {
|
||||
Setup
|
||||
*****************************************/
|
||||
void setup_MD() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 5V
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
#endif
|
||||
|
||||
#ifdef use_md_conf
|
||||
mdLoadConf();
|
||||
#endif
|
||||
|
@ -133,7 +133,6 @@ static const char msxMenuItem4[] PROGMEM = "Write SRAM";
|
||||
static const char* const menuOptionsMSX[] PROGMEM = { msxMenuItem1, msxMenuItem2, msxMenuItem3, msxMenuItem4, string_reset2 };
|
||||
|
||||
void msxMenu() {
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
convertPgm(menuOptionsMSX, 5);
|
||||
uint8_t mainMenu = question_box(F("MSX MENU"), menuOptions, 5, 0);
|
||||
|
||||
@ -182,6 +181,11 @@ void msxMenu() {
|
||||
// SETUP
|
||||
//******************************************
|
||||
void setup_MSX() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 5V
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
#endif
|
||||
|
||||
// Set Address Pins to Output
|
||||
// MSX uses A0-A15
|
||||
//A0-A7
|
||||
|
@ -114,7 +114,6 @@ static const char* const sectorOptionsN64[] PROGMEM = { N64SectorItem1, N64Secto
|
||||
|
||||
// N64 start menu
|
||||
void n64Menu() {
|
||||
setVoltage(VOLTS_SET_3V3);
|
||||
// create menu with title and 5 options to choose from
|
||||
unsigned char n64Dev;
|
||||
// Copy menuOptions out of progmem
|
||||
@ -400,6 +399,11 @@ void n64CartMenu() {
|
||||
Setup
|
||||
*****************************************/
|
||||
void setup_N64_Controller() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 3V
|
||||
setVoltage(VOLTS_SET_3V3);
|
||||
#endif
|
||||
|
||||
// Output a low signal
|
||||
PORTH &= ~(1 << 4);
|
||||
// Set Controller Data Pin(PH4) to Input
|
||||
@ -407,6 +411,11 @@ void setup_N64_Controller() {
|
||||
}
|
||||
|
||||
void setup_N64_Cart() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 3V
|
||||
setVoltage(VOLTS_SET_3V3);
|
||||
#endif
|
||||
|
||||
// Set Address Pins to Output and set them low
|
||||
//A0-A7
|
||||
DDRF = 0xFF;
|
||||
|
@ -273,7 +273,6 @@ static const char* const menuOptionsNESChips[] PROGMEM = { nesChipsMenuItem1, ne
|
||||
|
||||
// NES start menu
|
||||
void nesMenu() {
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
unsigned char answer;
|
||||
|
||||
// create menu with title "NES CART READER" and 7 options to choose from
|
||||
@ -448,6 +447,11 @@ void nesChipMenu() {
|
||||
Setup
|
||||
*****************************************/
|
||||
void setup_NES() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 5V
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
#endif
|
||||
|
||||
// CPU R/W, IRQ, PPU /RD, PPU /A13, CIRAM /CE, PPU /WR, /ROMSEL, PHI2
|
||||
DDRF = 0b10110111;
|
||||
// CPU R/W, IRQ, PPU /RD, PPU /A13, CIRAM /CE, PPU /WR, /ROMSEL, PHI2
|
||||
|
@ -21,6 +21,11 @@ uint8_t manufacturerID;
|
||||
uint8_t deviceID;
|
||||
|
||||
void setup_NGP() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 3V
|
||||
setVoltage(VOLTS_SET_3V3);
|
||||
#endif
|
||||
|
||||
// A0 - A7
|
||||
DDRF = 0xff;
|
||||
// A8 - A15
|
||||
@ -52,7 +57,6 @@ void setup_NGP() {
|
||||
}
|
||||
|
||||
void ngpMenu() {
|
||||
setVoltage(VOLTS_SET_3V3);
|
||||
uint8_t mainMenu;
|
||||
|
||||
convertPgm(menuOptionsNGP, 4);
|
||||
|
@ -69,6 +69,11 @@ static const char ody2MenuItem4[] PROGMEM = "Reset";
|
||||
static const char* const menuOptionsODY2[] PROGMEM = { ody2MenuItem1, ody2MenuItem2, ody2MenuItem3, ody2MenuItem4 };
|
||||
|
||||
void setup_ODY2() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 5V
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
#endif
|
||||
|
||||
// Set Address Pins to Output
|
||||
// Odyssey 2 uses A0-A13 [A14-A23 UNUSED]
|
||||
//A0-A7
|
||||
@ -110,7 +115,6 @@ void setup_ODY2() {
|
||||
}
|
||||
|
||||
void ody2Menu() {
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
convertPgm(menuOptionsODY2, 4);
|
||||
uint8_t mainMenu = question_box(F("ODYSSEY 2 MENU"), menuOptions, 4, 0);
|
||||
|
||||
|
@ -70,7 +70,6 @@ static const char *const menuOptionspceTC[] PROGMEM = { pceTCMenuItem1, string_r
|
||||
|
||||
// PCE start menu
|
||||
void pcsMenu(void) {
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
// create menu with title and 3 options to choose from
|
||||
unsigned char pceDev;
|
||||
// Copy menuOptions out of progmem
|
||||
@ -171,6 +170,11 @@ void pin_init_PCE(void) {
|
||||
}
|
||||
|
||||
void setup_cart_PCE(void) {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 5V
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
#endif
|
||||
|
||||
// Set cicrstPin(PG1) to Output
|
||||
DDRG |= (1 << 1);
|
||||
// Output a high to disable CIC
|
||||
|
@ -101,6 +101,11 @@ byte bank1;
|
||||
//******************************************
|
||||
|
||||
void setup_PCW() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 5V
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
#endif
|
||||
|
||||
// Set Address Pins to Output
|
||||
//A8-A15
|
||||
DDRK = 0xFF;
|
||||
@ -141,7 +146,6 @@ static const char pcwmenuItem3[] PROGMEM = "Write SRAM";
|
||||
static const char* const menuOptionsPCW[] PROGMEM = { pcwmenuItem1, pcwmenuItem2, pcwmenuItem3, string_reset2 };
|
||||
|
||||
void pcwMenu() {
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
convertPgm(menuOptionsPCW, 4);
|
||||
uint8_t mainMenu = question_box(F(" POCKET CHALLENGE W"), menuOptions, 4, 0);
|
||||
|
||||
|
@ -83,7 +83,6 @@ static const char pokeMenuItem1[] PROGMEM = "Read ROM";
|
||||
static const char* const menuOptionsPOKE[] PROGMEM = { pokeMenuItem1, string_reset2 };
|
||||
|
||||
void pokeMenu() {
|
||||
setVoltage(VOLTS_SET_3V3);
|
||||
convertPgm(menuOptionsPOKE, 2);
|
||||
uint8_t mainMenu = question_box(F("POKEMON MINI MENU"), menuOptions, 2, 0);
|
||||
|
||||
@ -106,6 +105,11 @@ void pokeMenu() {
|
||||
// SETUP
|
||||
//******************************************
|
||||
void setup_POKE() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 3V
|
||||
setVoltage(VOLTS_SET_3V3);
|
||||
#endif
|
||||
|
||||
// Set Address Pins to Output
|
||||
// Pokemon Mini uses A0-A9 (DUAL A10-A19) + A20 (CONNECT TO SNES A10) [A11-A23 UNUSED]
|
||||
//A0-A7
|
||||
|
@ -50,7 +50,6 @@ static const char sfmGameMenuItem4[] PROGMEM = "Switch Game";
|
||||
static const char* const menuOptionsSFMGame[] PROGMEM = { sfmGameMenuItem1, sfmGameMenuItem2, sfmGameMenuItem3, sfmGameMenuItem4, string_reset2 };
|
||||
|
||||
void sfmMenu() {
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
// create menu with title and 3 options to choose from
|
||||
unsigned char mainMenu;
|
||||
// Copy menuOptions out of progmem
|
||||
@ -525,6 +524,11 @@ void getGames(char gameCode[8][20], boolean* hasMenu, byte* numGames) {
|
||||
Setup
|
||||
*****************************************/
|
||||
void setup_SFM() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 5V
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
#endif
|
||||
|
||||
// Set cicrstPin(PG1) to Output
|
||||
DDRG |= (1 << 1);
|
||||
// Output a high signal to disable snesCIC
|
||||
|
@ -50,7 +50,6 @@ static bool adapter_retron = false; // Retron 3in1 adapter (SMS-to-MD or GG-to-
|
||||
// Main menu with systems/adapters setups to choose from
|
||||
//*********************************************************
|
||||
void smsMenu() {
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
unsigned char SMSSetup;
|
||||
convertPgm(SMSAdapterMenu, 6);
|
||||
SMSSetup = question_box(F("Select your setup"), menuOptions, 6, 0);
|
||||
@ -156,6 +155,11 @@ void smsOperations() {
|
||||
// Setup I/O
|
||||
//********************************
|
||||
void setup_SMS() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 5V
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
#endif
|
||||
|
||||
// Set Address Pins to Output
|
||||
//A0-A7
|
||||
DDRF = 0xFF;
|
||||
|
@ -70,7 +70,6 @@ static const char* const menuOptionsRepro[] PROGMEM = { reproMenuItem1, reproMen
|
||||
|
||||
// SNES repro menu
|
||||
void reproMenu() {
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
// create menu with title and 6 options to choose from
|
||||
unsigned char snsRepro;
|
||||
// Copy menuOptions out of progmem
|
||||
@ -133,7 +132,6 @@ void reproMenu() {
|
||||
|
||||
// SNES start menu
|
||||
void snsMenu() {
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
// create menu with title and 6 options to choose from
|
||||
unsigned char snsCart;
|
||||
// Copy menuOptions out of progmem
|
||||
@ -192,7 +190,6 @@ void snsMenu() {
|
||||
|
||||
// SNES Menu
|
||||
void snesMenu() {
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
// create menu with title and 7 options to choose from
|
||||
unsigned char mainMenu;
|
||||
// Copy menuOptions out of progmem
|
||||
@ -388,6 +385,11 @@ void stopSnesClocks_resetCic_resetCart() {
|
||||
Setup
|
||||
*****************************************/
|
||||
void setup_Snes() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 5V
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
#endif
|
||||
|
||||
// Set cicrstPin(PG1) to Output
|
||||
DDRG |= (1 << 1);
|
||||
// Output a high signal until we're ready to start
|
||||
|
@ -17,7 +17,10 @@ static const char acanMenuItem6[] PROGMEM = "Flash repro";
|
||||
static const char *const menuOptionsAcan[] PROGMEM = { acanMenuItem1, acanMenuItem2, acanMenuItem3, acanMenuItem4, acanMenuItem5, string_reset2, acanMenuItem6 };
|
||||
|
||||
void setup_SuprAcan() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 5V
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
#endif
|
||||
|
||||
// addr as output
|
||||
DDRF = 0xff; // A0 - A7
|
||||
|
@ -42,7 +42,6 @@ static const char* const menuOptionsSVFlash[] PROGMEM = { svFlashMenuItem1, svFl
|
||||
|
||||
|
||||
void svMenu() {
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
// create menu with title and 3 options to choose from
|
||||
unsigned char mainMenu;
|
||||
// Copy menuOptions out of progmem
|
||||
@ -102,6 +101,11 @@ void svMenu() {
|
||||
Setup
|
||||
*****************************************/
|
||||
void setup_SV() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 5V
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
#endif
|
||||
|
||||
// Set cicrstPin(PG1) to Output
|
||||
DDRG |= (1 << 1);
|
||||
// Output a high signal until we're ready to start
|
||||
|
@ -56,6 +56,11 @@
|
||||
//******************************************
|
||||
|
||||
void setup_VBOY() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 5V
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
#endif
|
||||
|
||||
// Set Address Pins to Output
|
||||
//A0-A7
|
||||
DDRF = 0xFF;
|
||||
@ -101,7 +106,6 @@ static const char vboyMenuItem3[] PROGMEM = "Write SRAM";
|
||||
static const char* const menuOptionsVBOY[] PROGMEM = { vboyMenuItem1, vboyMenuItem2, vboyMenuItem3, string_reset2 };
|
||||
|
||||
void vboyMenu() {
|
||||
setVoltage(VOLTS_SET_5V);
|
||||
convertPgm(menuOptionsVBOY, 4);
|
||||
uint8_t mainMenu = question_box(F("VIRTUALBOY MENU"), menuOptions, 4, 0);
|
||||
|
||||
|
@ -46,6 +46,11 @@ static uint8_t wsEepromShiftReg[2];
|
||||
static boolean wsWitch = false;
|
||||
|
||||
void setup_WS() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 3V
|
||||
setVoltage(VOLTS_SET_3V3);
|
||||
#endif
|
||||
|
||||
// A-1 - A6
|
||||
DDRF = 0xff;
|
||||
// A7 - A14
|
||||
@ -117,7 +122,6 @@ static boolean headerCheck() {
|
||||
}
|
||||
|
||||
void wsMenu() {
|
||||
setVoltage(VOLTS_SET_3V3);
|
||||
uint8_t mainMenu = (wsWitch ? 5 : 4);
|
||||
|
||||
convertPgm(menuOptionsWS, mainMenu);
|
||||
|
@ -53,6 +53,11 @@ byte newwsvsize;
|
||||
//******************************************
|
||||
|
||||
void setup_WSV() {
|
||||
#ifdef ENABLE_VSELECT
|
||||
// Set Automatic Voltage Selection to 3V
|
||||
setVoltage(VOLTS_SET_3V3);
|
||||
#endif
|
||||
|
||||
// Set Address Pins to Output
|
||||
//A0-A7
|
||||
DDRF = 0xFF;
|
||||
@ -106,7 +111,6 @@ static const char wsvMenuItem3[] PROGMEM = "Set Size";
|
||||
static const char* const menuOptionsSV[] PROGMEM = { wsvMenuItem1, wsvMenuItem2, wsvMenuItem3, string_reset2 };
|
||||
|
||||
void wsvMenu() {
|
||||
setVoltage(VOLTS_SET_3V3);
|
||||
convertPgm(menuOptionsSV, 4);
|
||||
uint8_t mainMenu = question_box(F("SUPERVISION MENU"), menuOptions, 4, 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user