mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-14 08:55:06 +01:00
Merge pull request #35 from ramapcsx2/strings_to_flash
strings_to_flash
This commit is contained in:
commit
e00c097850
@ -413,7 +413,7 @@ void mainMenu() {
|
|||||||
unsigned char modeMenu;
|
unsigned char modeMenu;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(modeOptions, 7);
|
convertPgm(modeOptions, 7);
|
||||||
modeMenu = question_box("Cartridge Reader", menuOptions, 7, 0);
|
modeMenu = question_box(F("Cartridge Reader"), menuOptions, 7, 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)
|
||||||
@ -692,7 +692,7 @@ void display_Clear() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned char question_box(const char* question, char answers[7][20], int num_answers, int default_choice) {
|
unsigned char question_box(const __FlashStringHelper* question, char answers[7][20], int num_answers, int default_choice) {
|
||||||
if (enable_OLED) {
|
if (enable_OLED) {
|
||||||
return questionBox_OLED(question, answers, num_answers, default_choice);
|
return questionBox_OLED(question, answers, num_answers, default_choice);
|
||||||
}
|
}
|
||||||
@ -740,7 +740,7 @@ void wait_serial() {
|
|||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
byte questionBox_Serial(const char* question, char answers[7][20], int num_answers, int default_choice) {
|
byte questionBox_Serial(const __FlashStringHelper* question, char answers[7][20], int num_answers, int default_choice) {
|
||||||
// Print menu to serial monitor
|
// Print menu to serial monitor
|
||||||
//Serial.println(question);
|
//Serial.println(question);
|
||||||
for (byte i = 0; i < num_answers; i++) {
|
for (byte i = 0; i < num_answers; i++) {
|
||||||
@ -787,9 +787,9 @@ byte questionBox_Serial(const char* question, char answers[7][20], int num_answe
|
|||||||
foldern = foldern + 1;
|
foldern = foldern + 1;
|
||||||
EEPROM_writeAnything(10, foldern);
|
EEPROM_writeAnything(10, foldern);
|
||||||
|
|
||||||
print_Msg("Imported ");
|
print_Msg(F("Imported "));
|
||||||
print_Msg(fileSize);
|
print_Msg(fileSize);
|
||||||
print_Msg(" bytes to file ");
|
print_Msg(F(" bytes to file "));
|
||||||
println_Msg(fileName);
|
println_Msg(fileName);
|
||||||
return 7;
|
return 7;
|
||||||
}
|
}
|
||||||
@ -1018,7 +1018,7 @@ void wait_btn() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Display a question box with selectable answers. Make sure default choice is in (0, num_answers]
|
// Display a question box with selectable answers. Make sure default choice is in (0, num_answers]
|
||||||
unsigned char questionBox_OLED(const char* question, char answers[7][20], int num_answers, int default_choice) {
|
unsigned char questionBox_OLED(const __FlashStringHelper* question, char answers[7][20], int num_answers, int default_choice) {
|
||||||
|
|
||||||
//clear the screen
|
//clear the screen
|
||||||
display.clearDisplay();
|
display.clearDisplay();
|
||||||
@ -1145,7 +1145,7 @@ unsigned char questionBox_OLED(const char* question, char answers[7][20], int nu
|
|||||||
/******************************************
|
/******************************************
|
||||||
Filebrowser Module
|
Filebrowser Module
|
||||||
*****************************************/
|
*****************************************/
|
||||||
void fileBrowser(const char* browserTitle) {
|
void fileBrowser(const __FlashStringHelper* browserTitle) {
|
||||||
char fileNames[30][26];
|
char fileNames[30][26];
|
||||||
int currFile;
|
int currFile;
|
||||||
filebrowse = 1;
|
filebrowse = 1;
|
||||||
|
@ -62,7 +62,7 @@ void flashMenu() {
|
|||||||
flashSlot = question_box("Select adapter PCB", menuOptions, 3, 0);
|
flashSlot = question_box("Select adapter PCB", menuOptions, 3, 0);
|
||||||
#else
|
#else
|
||||||
convertPgm(menuOptionsFlash, 2);
|
convertPgm(menuOptionsFlash, 2);
|
||||||
flashSlot = question_box("Select adapter PCB", menuOptions, 2, 0);
|
flashSlot = question_box(F("Select adapter PCB"), menuOptions, 2, 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
|
||||||
@ -101,7 +101,7 @@ void flashromMenu8() {
|
|||||||
unsigned char mainMenu;
|
unsigned char mainMenu;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(menuOptionsFLASH8, 7);
|
convertPgm(menuOptionsFLASH8, 7);
|
||||||
mainMenu = question_box("Flashrom Writer 8", menuOptions, 7, 0);
|
mainMenu = question_box(F("Flashrom Writer 8"), menuOptions, 7, 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 (mainMenu)
|
switch (mainMenu)
|
||||||
@ -150,7 +150,7 @@ void flashromMenu8() {
|
|||||||
case 3:
|
case 3:
|
||||||
filePath[0] = '\0';
|
filePath[0] = '\0';
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
fileBrowser("Select file");
|
fileBrowser(F("Select file"));
|
||||||
display_Clear();
|
display_Clear();
|
||||||
time = millis();
|
time = millis();
|
||||||
if (flashromType == 1)
|
if (flashromType == 1)
|
||||||
@ -239,7 +239,7 @@ void flashromMenu16() {
|
|||||||
unsigned char mainMenu;
|
unsigned char mainMenu;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(menuOptionsFLASH16, 7);
|
convertPgm(menuOptionsFLASH16, 7);
|
||||||
mainMenu = question_box("Flashrom Writer 16", menuOptions, 7, 0);
|
mainMenu = question_box(F("Flashrom Writer 16"), menuOptions, 7, 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 (mainMenu)
|
switch (mainMenu)
|
||||||
@ -274,7 +274,7 @@ void flashromMenu16() {
|
|||||||
case 3:
|
case 3:
|
||||||
filePath[0] = '\0';
|
filePath[0] = '\0';
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
fileBrowser("Select file");
|
fileBrowser(F("Select file"));
|
||||||
display_Clear();
|
display_Clear();
|
||||||
time = millis();
|
time = millis();
|
||||||
if (strcmp(flashid, "C2F3") == 0) {
|
if (strcmp(flashid, "C2F3") == 0) {
|
||||||
@ -335,7 +335,7 @@ void epromMenu() {
|
|||||||
unsigned char mainMenu;
|
unsigned char mainMenu;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(menuOptionsEprom, 6);
|
convertPgm(menuOptionsEprom, 6);
|
||||||
mainMenu = question_box("Eprom Writer", menuOptions, 6, 0);
|
mainMenu = question_box(F("Eprom Writer"), 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 (mainMenu)
|
switch (mainMenu)
|
||||||
@ -357,7 +357,7 @@ void epromMenu() {
|
|||||||
case 2:
|
case 2:
|
||||||
filePath[0] = '\0';
|
filePath[0] = '\0';
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
fileBrowser("Select file");
|
fileBrowser(F("Select file"));
|
||||||
display_Clear();
|
display_Clear();
|
||||||
time = millis();
|
time = millis();
|
||||||
write_Eprom();
|
write_Eprom();
|
||||||
@ -368,7 +368,7 @@ void epromMenu() {
|
|||||||
case 3:
|
case 3:
|
||||||
filePath[0] = '\0';
|
filePath[0] = '\0';
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
fileBrowser("Verify against");
|
fileBrowser(F("Verify against"));
|
||||||
sprintf(filePath, "%s/%s", filePath, fileName);
|
sprintf(filePath, "%s/%s", filePath, fileName);
|
||||||
display_Clear();
|
display_Clear();
|
||||||
time = millis();
|
time = millis();
|
||||||
@ -1991,11 +1991,11 @@ void write_Eprom() {
|
|||||||
checkWord = writeWord_Eprom(currWord + c, myWord);
|
checkWord = writeWord_Eprom(currWord + c, myWord);
|
||||||
// Check for fail
|
// Check for fail
|
||||||
if (n == 25) {
|
if (n == 25) {
|
||||||
print_Msg("Program Error 0x");
|
print_Msg(F("Program Error 0x"));
|
||||||
println_Msg(currWord + c, HEX);
|
println_Msg(currWord + c, HEX);
|
||||||
print_Msg("0x");
|
print_Msg(F("0x"));
|
||||||
print_Msg(readWord_Eprom(currWord + c), HEX);
|
print_Msg(readWord_Eprom(currWord + c), HEX);
|
||||||
print_Msg(" != 0x");
|
print_Msg(F(" != 0x"));
|
||||||
println_Msg(myWord, HEX);
|
println_Msg(myWord, HEX);
|
||||||
print_Error(F("Press button to reset"), true);
|
print_Error(F("Press button to reset"), true);
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ void gbxMenu() {
|
|||||||
unsigned char gbType;
|
unsigned char gbType;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(menuOptionsGBx, 3);
|
convertPgm(menuOptionsGBx, 3);
|
||||||
gbType = question_box("Select Game Boy", menuOptions, 3, 0);
|
gbType = question_box(F("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)
|
||||||
@ -67,7 +67,7 @@ void gbMenu() {
|
|||||||
unsigned char mainMenu;
|
unsigned char mainMenu;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(menuOptionsGB, 6);
|
convertPgm(menuOptionsGB, 6);
|
||||||
mainMenu = question_box("GB Cart Reader", menuOptions, 6, 0);
|
mainMenu = question_box(F("GB Cart 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 (mainMenu)
|
switch (mainMenu)
|
||||||
@ -590,7 +590,7 @@ void writeSRAM_GB() {
|
|||||||
|
|
||||||
filePath[0] = '\0';
|
filePath[0] = '\0';
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
fileBrowser("Select sav file");
|
fileBrowser(F("Select sav file"));
|
||||||
// Create filepath
|
// Create filepath
|
||||||
sprintf(filePath, "%s/%s", filePath, fileName);
|
sprintf(filePath, "%s/%s", filePath, fileName);
|
||||||
|
|
||||||
@ -712,7 +712,7 @@ void writeFlash_GB(byte MBC) {
|
|||||||
// Launch filebrowser
|
// Launch filebrowser
|
||||||
filePath[0] = '\0';
|
filePath[0] = '\0';
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
fileBrowser("Select file");
|
fileBrowser(F("Select file"));
|
||||||
display_Clear();
|
display_Clear();
|
||||||
|
|
||||||
// Create filepath
|
// Create filepath
|
||||||
|
@ -43,7 +43,7 @@ void gbaMenu() {
|
|||||||
unsigned char mainMenu;
|
unsigned char mainMenu;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(menuOptionsGBA, 6);
|
convertPgm(menuOptionsGBA, 6);
|
||||||
mainMenu = question_box("GBA Cart Reader", menuOptions, 6, 0);
|
mainMenu = question_box(F("GBA Cart 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 (mainMenu)
|
switch (mainMenu)
|
||||||
@ -57,7 +57,7 @@ void gbaMenu() {
|
|||||||
unsigned char GBARomMenu;
|
unsigned char GBARomMenu;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(romOptionsGBA, 6);
|
convertPgm(romOptionsGBA, 6);
|
||||||
GBARomMenu = question_box("Select ROM size", menuOptions, 6, 0);
|
GBARomMenu = question_box(F("Select ROM size"), 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 (GBARomMenu)
|
switch (GBARomMenu)
|
||||||
@ -138,7 +138,7 @@ void gbaMenu() {
|
|||||||
unsigned char GBASaveMenu;
|
unsigned char GBASaveMenu;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(saveOptionsGBA, 6);
|
convertPgm(saveOptionsGBA, 6);
|
||||||
GBASaveMenu = question_box("Select save type", menuOptions, 6, 0);
|
GBASaveMenu = question_box(F("Select save type"), 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 (GBASaveMenu)
|
switch (GBASaveMenu)
|
||||||
@ -242,7 +242,7 @@ void gbaMenu() {
|
|||||||
unsigned char GBASavesMenu;
|
unsigned char GBASavesMenu;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(saveOptionsGBA, 6);
|
convertPgm(saveOptionsGBA, 6);
|
||||||
GBASavesMenu = question_box("Select save type", menuOptions, 6, 0);
|
GBASavesMenu = question_box(F("Select save type"), 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 (GBASavesMenu)
|
switch (GBASavesMenu)
|
||||||
{
|
{
|
||||||
@ -428,7 +428,7 @@ void gbaMenu() {
|
|||||||
unsigned char GBASaveMenu;
|
unsigned char GBASaveMenu;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(saveOptionsGBA, 6);
|
convertPgm(saveOptionsGBA, 6);
|
||||||
GBASaveMenu = question_box("Select save type", menuOptions, 6, 0);
|
GBASaveMenu = question_box(F("Select save type"), 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 (GBASaveMenu)
|
switch (GBASaveMenu)
|
||||||
@ -1015,7 +1015,7 @@ void writeSRAM_GBA(boolean browseFile, unsigned long sramSize, uint32_t pos) {
|
|||||||
if (browseFile) {
|
if (browseFile) {
|
||||||
filePath[0] = '\0';
|
filePath[0] = '\0';
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
fileBrowser("Select srm file");
|
fileBrowser(F("Select srm file"));
|
||||||
// Create filepath
|
// Create filepath
|
||||||
sprintf(filePath, "%s/%s", filePath, fileName);
|
sprintf(filePath, "%s/%s", filePath, fileName);
|
||||||
display_Clear();
|
display_Clear();
|
||||||
@ -1170,7 +1170,7 @@ void writeFRAM_GBA (boolean browseFile, unsigned long framSize) {
|
|||||||
if (browseFile) {
|
if (browseFile) {
|
||||||
filePath[0] = '\0';
|
filePath[0] = '\0';
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
fileBrowser("Select srm file");
|
fileBrowser(F("Select srm file"));
|
||||||
// Create filepath
|
// Create filepath
|
||||||
sprintf(filePath, "%s/%s", filePath, fileName);
|
sprintf(filePath, "%s/%s", filePath, fileName);
|
||||||
display_Clear();
|
display_Clear();
|
||||||
@ -1580,7 +1580,7 @@ void writeFLASH_GBA (boolean browseFile, unsigned long flashSize, uint32_t pos)
|
|||||||
if (browseFile) {
|
if (browseFile) {
|
||||||
filePath[0] = '\0';
|
filePath[0] = '\0';
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
fileBrowser("Select fla file");
|
fileBrowser(F("Select fla file"));
|
||||||
// Create filepath
|
// Create filepath
|
||||||
sprintf(filePath, "%s/%s", filePath, fileName);
|
sprintf(filePath, "%s/%s", filePath, fileName);
|
||||||
display_Clear();
|
display_Clear();
|
||||||
@ -1692,7 +1692,7 @@ void writeEeprom_GBA(word eepSize) {
|
|||||||
// Launch Filebrowser
|
// Launch Filebrowser
|
||||||
filePath[0] = '\0';
|
filePath[0] = '\0';
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
fileBrowser("Select eep file");
|
fileBrowser(F("Select eep file"));
|
||||||
// Create filepath
|
// Create filepath
|
||||||
sprintf(filePath, "%s/%s", filePath, fileName);
|
sprintf(filePath, "%s/%s", filePath, fileName);
|
||||||
display_Clear();
|
display_Clear();
|
||||||
@ -2509,7 +2509,7 @@ void flashRepro_GBA() {
|
|||||||
// Launch file browser
|
// Launch file browser
|
||||||
filePath[0] = '\0';
|
filePath[0] = '\0';
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
fileBrowser("Select gba file");
|
fileBrowser(F("Select gba file"));
|
||||||
display_Clear();
|
display_Clear();
|
||||||
display_Update();
|
display_Update();
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ void mdMenu() {
|
|||||||
unsigned char mainMenu;
|
unsigned char mainMenu;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(menuOptionsMD, 7);
|
convertPgm(menuOptionsMD, 7);
|
||||||
mainMenu = question_box("MEGA DRIVE Reader", menuOptions, 7, 0);
|
mainMenu = question_box(F("MEGA DRIVE Reader"), menuOptions, 7, 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 (mainMenu)
|
switch (mainMenu)
|
||||||
@ -143,7 +143,7 @@ void mdMenu() {
|
|||||||
// Change working dir to root
|
// Change working dir to root
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
// Launch file browser
|
// Launch file browser
|
||||||
fileBrowser("Select srm file");
|
fileBrowser(F("Select srm file"));
|
||||||
display_Clear();
|
display_Clear();
|
||||||
enableSram_MD(1);
|
enableSram_MD(1);
|
||||||
writeSram_MD();
|
writeSram_MD();
|
||||||
@ -178,7 +178,7 @@ void mdMenu() {
|
|||||||
display_Clear();
|
display_Clear();
|
||||||
if (saveType == 4) {
|
if (saveType == 4) {
|
||||||
// Launch file browser
|
// Launch file browser
|
||||||
fileBrowser("Select eep file");
|
fileBrowser(F("Select eep file"));
|
||||||
display_Clear();
|
display_Clear();
|
||||||
writeEEP_MD();
|
writeEEP_MD();
|
||||||
}
|
}
|
||||||
@ -191,7 +191,7 @@ void mdMenu() {
|
|||||||
// Change working dir to root
|
// Change working dir to root
|
||||||
filePath[0] = '\0';
|
filePath[0] = '\0';
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
fileBrowser("Select file");
|
fileBrowser(F("Select file"));
|
||||||
display_Clear();
|
display_Clear();
|
||||||
// Setting CS(PH3) LOW
|
// Setting CS(PH3) LOW
|
||||||
PORTH &= ~(1 << 3);
|
PORTH &= ~(1 << 3);
|
||||||
@ -200,10 +200,10 @@ void mdMenu() {
|
|||||||
resetFlash_MD();
|
resetFlash_MD();
|
||||||
idFlash_MD();
|
idFlash_MD();
|
||||||
resetFlash_MD();
|
resetFlash_MD();
|
||||||
print_Msg("Flash ID: ");
|
print_Msg(F("Flash ID: "));
|
||||||
println_Msg(flashid);
|
println_Msg(flashid);
|
||||||
if (strcmp(flashid, "C2F1") == 0) {
|
if (strcmp(flashid, "C2F1") == 0) {
|
||||||
println_Msg("MX29F1610 detected");
|
println_Msg(F("MX29F1610 detected"));
|
||||||
flashSize = 2097152;
|
flashSize = 2097152;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -97,7 +97,7 @@ void n64Menu() {
|
|||||||
unsigned char n64Dev;
|
unsigned char n64Dev;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(menuOptionsN64, 4);
|
convertPgm(menuOptionsN64, 4);
|
||||||
n64Dev = question_box("Select N64 device", menuOptions, 4, 0);
|
n64Dev = question_box(F("Select N64 device"), menuOptions, 4, 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 (n64Dev)
|
switch (n64Dev)
|
||||||
@ -143,7 +143,7 @@ void n64ControllerMenu() {
|
|||||||
unsigned char mainMenu;
|
unsigned char mainMenu;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(menuOptionsN64Controller, 4);
|
convertPgm(menuOptionsN64Controller, 4);
|
||||||
mainMenu = question_box("N64 Controller", menuOptions, 4, 0);
|
mainMenu = question_box(F("N64 Controller"), menuOptions, 4, 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 (mainMenu)
|
switch (mainMenu)
|
||||||
@ -171,7 +171,7 @@ void n64ControllerMenu() {
|
|||||||
filePath[0] = '\0';
|
filePath[0] = '\0';
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
// Launch file browser
|
// Launch file browser
|
||||||
fileBrowser("Select mpk file");
|
fileBrowser(F("Select mpk file"));
|
||||||
display_Clear();
|
display_Clear();
|
||||||
display_Update();
|
display_Update();
|
||||||
writeMPK();
|
writeMPK();
|
||||||
@ -194,7 +194,7 @@ void n64CartMenu() {
|
|||||||
unsigned char mainMenu;
|
unsigned char mainMenu;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(menuOptionsN64Cart, 5);
|
convertPgm(menuOptionsN64Cart, 5);
|
||||||
mainMenu = question_box("N64 Cart Reader", menuOptions, 5, 0);
|
mainMenu = question_box(F("N64 Cart Reader"), menuOptions, 5, 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 (mainMenu)
|
switch (mainMenu)
|
||||||
@ -238,7 +238,7 @@ void n64CartMenu() {
|
|||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
if (saveType == 1) {
|
if (saveType == 1) {
|
||||||
// Launch file browser
|
// Launch file browser
|
||||||
fileBrowser("Select sra file");
|
fileBrowser(F("Select sra file"));
|
||||||
display_Clear();
|
display_Clear();
|
||||||
|
|
||||||
writeSram(32768);
|
writeSram(32768);
|
||||||
@ -256,7 +256,7 @@ void n64CartMenu() {
|
|||||||
}
|
}
|
||||||
else if (saveType == 4) {
|
else if (saveType == 4) {
|
||||||
// Launch file browser
|
// Launch file browser
|
||||||
fileBrowser("Select fla file");
|
fileBrowser(F("Select fla file"));
|
||||||
display_Clear();
|
display_Clear();
|
||||||
getFramType();
|
getFramType();
|
||||||
writeFram(flashramType);
|
writeFram(flashramType);
|
||||||
@ -277,7 +277,7 @@ void n64CartMenu() {
|
|||||||
}
|
}
|
||||||
else if ((saveType == 5) || (saveType == 6)) {
|
else if ((saveType == 5) || (saveType == 6)) {
|
||||||
// Launch file browser
|
// Launch file browser
|
||||||
fileBrowser("Select eep file");
|
fileBrowser(F("Select eep file"));
|
||||||
display_Clear();
|
display_Clear();
|
||||||
|
|
||||||
writeEeprom();
|
writeEeprom();
|
||||||
@ -306,7 +306,7 @@ void n64CartMenu() {
|
|||||||
unsigned char N64SaveMenu;
|
unsigned char N64SaveMenu;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(saveOptionsN64, 5);
|
convertPgm(saveOptionsN64, 5);
|
||||||
N64SaveMenu = question_box("Select save type", menuOptions, 5, 0);
|
N64SaveMenu = question_box(F("Select save type"), menuOptions, 5, 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 (N64SaveMenu)
|
switch (N64SaveMenu)
|
||||||
@ -753,7 +753,7 @@ void get_button()
|
|||||||
// Buttons (A,B,Z,S,DU,DD,DL,DR,0,0,L,R,CU,CD,CL,CR)
|
// Buttons (A,B,Z,S,DU,DD,DL,DR,0,0,L,R,CU,CD,CL,CR)
|
||||||
if (rawStr.substring(0, 16) == "0000000000000000") {
|
if (rawStr.substring(0, 16) == "0000000000000000") {
|
||||||
lastbutton = button;
|
lastbutton = button;
|
||||||
button = "Press a button";
|
button = F("Press a button");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -765,59 +765,59 @@ void get_button()
|
|||||||
switch (i)
|
switch (i)
|
||||||
{
|
{
|
||||||
case 7:
|
case 7:
|
||||||
button = "D-Right";
|
button = F("D-Right");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
button = "D-Left";
|
button = F("D-Left");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
button = "D-Down";
|
button = F("D-Down");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
button = "D-Up";
|
button = F("D-Up");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
button = "START";
|
button = F("START");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
button = "Z";
|
button = F("Z");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
button = "B";
|
button = F("B");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
button = "A";
|
button = F("A");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 15:
|
case 15:
|
||||||
button = "C-Right";
|
button = F("C-Right");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 14:
|
case 14:
|
||||||
button = "C-Left";
|
button = F("C-Left");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 13:
|
case 13:
|
||||||
button = "C-Down";
|
button = F("C-Down");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 12:
|
case 12:
|
||||||
button = "C-Up";
|
button = F("C-Up");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 11:
|
case 11:
|
||||||
button = "R";
|
button = F("R");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 10:
|
case 10:
|
||||||
button = "L";
|
button = F("L");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -848,7 +848,7 @@ void readController() {
|
|||||||
display_Update();
|
display_Update();
|
||||||
delay(100);
|
delay(100);
|
||||||
|
|
||||||
if (button == "START") {
|
if (button == F("START")) {
|
||||||
quit = 0;
|
quit = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1098,7 +1098,7 @@ void printCartInfo_N64() {
|
|||||||
unsigned char N64RomMenu;
|
unsigned char N64RomMenu;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(romOptionsN64, 6);
|
convertPgm(romOptionsN64, 6);
|
||||||
N64RomMenu = question_box("Select ROM size", menuOptions, 6, 0);
|
N64RomMenu = question_box(F("Select ROM size"), 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 (N64RomMenu)
|
switch (N64RomMenu)
|
||||||
@ -2150,11 +2150,7 @@ calcn64crc:
|
|||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(menuOptionsN64CRC, 4);
|
convertPgm(menuOptionsN64CRC, 4);
|
||||||
|
|
||||||
char tempStr3[20];
|
CRCMenu = question_box(F("CRC ERROR "), menuOptions, 4, 1);
|
||||||
strcpy(tempStr3, "CRC ERROR ");
|
|
||||||
strcat(tempStr3, crcStr);
|
|
||||||
|
|
||||||
CRCMenu = question_box(tempStr3, menuOptions, 4, 1);
|
|
||||||
|
|
||||||
// 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 (CRCMenu)
|
switch (CRCMenu)
|
||||||
@ -2259,7 +2255,7 @@ void flashRepro_N64() {
|
|||||||
// Launch file browser
|
// Launch file browser
|
||||||
filePath[0] = '\0';
|
filePath[0] = '\0';
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
fileBrowser("Select z64 file");
|
fileBrowser(F("Select z64 file"));
|
||||||
display_Clear();
|
display_Clear();
|
||||||
display_Update();
|
display_Update();
|
||||||
|
|
||||||
@ -3055,7 +3051,7 @@ void flashGameshark_N64() {
|
|||||||
// Launch file browser
|
// Launch file browser
|
||||||
filePath[0] = '\0';
|
filePath[0] = '\0';
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
fileBrowser("Select z64 file");
|
fileBrowser(F("Select z64 file"));
|
||||||
display_Clear();
|
display_Clear();
|
||||||
display_Update();
|
display_Update();
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ void sfmMenu() {
|
|||||||
unsigned char mainMenu;
|
unsigned char mainMenu;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(menuOptionsSFM, 3);
|
convertPgm(menuOptionsSFM, 3);
|
||||||
mainMenu = question_box("SF Memory", menuOptions, 3, 0);
|
mainMenu = question_box(F("SF Memory"), 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 (mainMenu)
|
switch (mainMenu)
|
||||||
@ -101,7 +101,7 @@ void sfmGameMenu() {
|
|||||||
// Create menu with title and numGames options to choose from
|
// Create menu with title and numGames options to choose from
|
||||||
unsigned char gameSubMenu;
|
unsigned char gameSubMenu;
|
||||||
// wait for user choice to come back from the question box menu
|
// wait for user choice to come back from the question box menu
|
||||||
gameSubMenu = question_box("Select Game", menuOptionsSFMGames, numGames, 0);
|
gameSubMenu = question_box(F("Select Game"), menuOptionsSFMGames, numGames, 0);
|
||||||
|
|
||||||
// Switch to game
|
// Switch to game
|
||||||
send_SFM(gameSubMenu + 0x80);
|
send_SFM(gameSubMenu + 0x80);
|
||||||
@ -156,7 +156,7 @@ void sfmGameOptions() {
|
|||||||
unsigned char gameSubMenu;
|
unsigned char gameSubMenu;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(menuOptionsSFMGame, 5);
|
convertPgm(menuOptionsSFMGame, 5);
|
||||||
gameSubMenu = question_box("SFM Game Menu", menuOptions, 5, 0);
|
gameSubMenu = question_box(F("SFM Game Menu"), menuOptions, 5, 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 (gameSubMenu)
|
switch (gameSubMenu)
|
||||||
@ -221,7 +221,7 @@ void sfmFlashMenu() {
|
|||||||
unsigned char flashSubMenu;
|
unsigned char flashSubMenu;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(menuOptionsSFMFlash, 6);
|
convertPgm(menuOptionsSFMFlash, 6);
|
||||||
flashSubMenu = question_box("SFM Flash Menu", menuOptions, 6, 0);
|
flashSubMenu = question_box(F("SFM Flash Menu"), 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 (flashSubMenu)
|
switch (flashSubMenu)
|
||||||
@ -288,7 +288,7 @@ void sfmFlashMenu() {
|
|||||||
filePath[0] = '\0';
|
filePath[0] = '\0';
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
// Launch file browser
|
// Launch file browser
|
||||||
fileBrowser("Select 4MB file");
|
fileBrowser(F("Select 4MB file"));
|
||||||
display_Clear();
|
display_Clear();
|
||||||
sprintf(filePath, "%s/%s", filePath, fileName);
|
sprintf(filePath, "%s/%s", filePath, fileName);
|
||||||
flashSize = 2097152;
|
flashSize = 2097152;
|
||||||
@ -431,7 +431,7 @@ void sfmFlashMenu() {
|
|||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
|
|
||||||
// Launch file browser
|
// Launch file browser
|
||||||
fileBrowser("Select MAP file");
|
fileBrowser(F("Select MAP file"));
|
||||||
display_Clear();
|
display_Clear();
|
||||||
sprintf(filePath, "%s/%s", filePath, fileName);
|
sprintf(filePath, "%s/%s", filePath, fileName);
|
||||||
display_Update();
|
display_Update();
|
||||||
@ -1476,7 +1476,7 @@ void gbmMenu() {
|
|||||||
unsigned char mainMenu;
|
unsigned char mainMenu;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(menuOptionsGBM, 7);
|
convertPgm(menuOptionsGBM, 7);
|
||||||
mainMenu = question_box("GB Memory Menu", menuOptions, 7, 0);
|
mainMenu = question_box(F("GB Memory Menu"), menuOptions, 7, 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 (mainMenu)
|
switch (mainMenu)
|
||||||
@ -1559,7 +1559,7 @@ void gbmMenu() {
|
|||||||
filePath[0] = '\0';
|
filePath[0] = '\0';
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
// Launch file browser
|
// Launch file browser
|
||||||
fileBrowser("Select 1MB file");
|
fileBrowser(F("Select 1MB file"));
|
||||||
display_Clear();
|
display_Clear();
|
||||||
sprintf(filePath, "%s/%s", filePath, fileName);
|
sprintf(filePath, "%s/%s", filePath, fileName);
|
||||||
|
|
||||||
@ -1608,7 +1608,7 @@ void gbmMenu() {
|
|||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
|
|
||||||
// Launch file browser
|
// Launch file browser
|
||||||
fileBrowser("Select MAP file");
|
fileBrowser(F("Select MAP file"));
|
||||||
display_Clear();
|
display_Clear();
|
||||||
sprintf(filePath, "%s/%s", filePath, fileName);
|
sprintf(filePath, "%s/%s", filePath, fileName);
|
||||||
display_Update();
|
display_Update();
|
||||||
|
@ -115,7 +115,7 @@ void pcsMenu(void) {
|
|||||||
unsigned char pceDev;
|
unsigned char pceDev;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(menuOptionspce, 2);
|
convertPgm(menuOptionspce, 2);
|
||||||
pceDev = question_box("Select device", menuOptions, 2, 0);
|
pceDev = question_box(F("Select device"), menuOptions, 2, 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 (pceDev)
|
switch (pceDev)
|
||||||
@ -521,7 +521,7 @@ void crc_search(char *file_p, char *folder_p, uint32_t rom_size)
|
|||||||
flag = CHKSUM_ERROR;
|
flag = CHKSUM_ERROR;
|
||||||
crc = 0xFFFFFFFFUL; //Initialize CRC
|
crc = 0xFFFFFFFFUL; //Initialize CRC
|
||||||
display_Clear();
|
display_Clear();
|
||||||
println_Msg("Calculating chksum...");
|
println_Msg(F("Calculating chksum..."));
|
||||||
processedsize = 0;
|
processedsize = 0;
|
||||||
draw_progressbar(0, rom_size * 1024UL); //Initialize progress bar
|
draw_progressbar(0, rom_size * 1024UL); //Initialize progress bar
|
||||||
|
|
||||||
@ -549,7 +549,7 @@ void crc_search(char *file_p, char *folder_p, uint32_t rom_size)
|
|||||||
//if checksum search successful, rename the file and end search
|
//if checksum search successful, rename the file and end search
|
||||||
if (strcmp(crc_search, crc_file) == 0)
|
if (strcmp(crc_search, crc_file) == 0)
|
||||||
{
|
{
|
||||||
print_Msg("Chksum OK ");
|
print_Msg(F("Chksum OK "));
|
||||||
println_Msg(crc_file);
|
println_Msg(crc_file);
|
||||||
print_Msg(F("Saved to "));
|
print_Msg(F("Saved to "));
|
||||||
print_Msg(folder_p);
|
print_Msg(folder_p);
|
||||||
@ -576,7 +576,7 @@ void crc_search(char *file_p, char *folder_p, uint32_t rom_size)
|
|||||||
}
|
}
|
||||||
else if (flag == CHKSUM_ERROR)
|
else if (flag == CHKSUM_ERROR)
|
||||||
{
|
{
|
||||||
print_Msg("Chksum Error ");
|
print_Msg(F("Chksum Error "));
|
||||||
println_Msg(crc_file);
|
println_Msg(crc_file);
|
||||||
print_Msg(F("Saved to "));
|
print_Msg(F("Saved to "));
|
||||||
print_Msg(folder_p);
|
print_Msg(folder_p);
|
||||||
@ -598,8 +598,7 @@ void read_tennokoe_bank_PCE(void)
|
|||||||
//clear the screen
|
//clear the screen
|
||||||
display_Clear();
|
display_Clear();
|
||||||
|
|
||||||
sprintf(fileName, "RAM size: 8KB"); //using filename global variable as string. Initialzed in below anyways.
|
println_Msg(F("RAM size: 8KB"));
|
||||||
println_Msg(fileName);
|
|
||||||
|
|
||||||
// Get name, add extension and convert to char array for sd lib
|
// Get name, add extension and convert to char array for sd lib
|
||||||
strcpy(fileName, "BANKRAM");
|
strcpy(fileName, "BANKRAM");
|
||||||
@ -683,7 +682,7 @@ void write_tennokoe_bank_PCE(void)
|
|||||||
//Display file Browser and wait user to select a file. Size must be 8KB.
|
//Display file Browser and wait user to select a file. Size must be 8KB.
|
||||||
filePath[0] = '\0';
|
filePath[0] = '\0';
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
fileBrowser("Select RAM file");
|
fileBrowser(F("Select RAM file"));
|
||||||
// Create filepath
|
// Create filepath
|
||||||
sprintf(filePath, "%s/%s", filePath, fileName);
|
sprintf(filePath, "%s/%s", filePath, fileName);
|
||||||
display_Clear();
|
display_Clear();
|
||||||
@ -766,8 +765,9 @@ void read_rom_PCE(void)
|
|||||||
display_Clear();
|
display_Clear();
|
||||||
rom_size = detect_rom_size_PCE();
|
rom_size = detect_rom_size_PCE();
|
||||||
|
|
||||||
sprintf(fileName, "Detected size: %dKB", rom_size); //using filename global variable as string. Initialzed in below anyways.
|
print_Msg(F("Detected size: "));
|
||||||
println_Msg(fileName);
|
print_Msg(rom_size);
|
||||||
|
println_Msg(F("KB"));
|
||||||
|
|
||||||
// Get name, add extension and convert to char array for sd lib
|
// Get name, add extension and convert to char array for sd lib
|
||||||
strcpy(fileName, "PCEROM");
|
strcpy(fileName, "PCEROM");
|
||||||
@ -834,7 +834,7 @@ void read_rom_PCE(void)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// SNES Menu
|
// PC Engine Menu
|
||||||
void pceMenu() {
|
void pceMenu() {
|
||||||
// create menu with title and 7 options to choose from
|
// create menu with title and 7 options to choose from
|
||||||
unsigned char mainMenu;
|
unsigned char mainMenu;
|
||||||
@ -843,7 +843,7 @@ void pceMenu() {
|
|||||||
{
|
{
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(menuOptionspceCart, 4);
|
convertPgm(menuOptionspceCart, 4);
|
||||||
mainMenu = question_box("PCE HuCARD menu", menuOptions, 4, 0);
|
mainMenu = question_box(F("PCE HuCARD menu"), menuOptions, 4, 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 (mainMenu)
|
switch (mainMenu)
|
||||||
@ -871,7 +871,7 @@ void pceMenu() {
|
|||||||
{
|
{
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(menuOptionspceTC, 2);
|
convertPgm(menuOptionspceTC, 2);
|
||||||
mainMenu = question_box("TG TurboChip menu", menuOptions, 2, 0);
|
mainMenu = question_box(F("TG TurboChip menu"), menuOptions, 2, 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 (mainMenu)
|
switch (mainMenu)
|
||||||
|
@ -60,7 +60,7 @@ void snsMenu() {
|
|||||||
unsigned char snsCart;
|
unsigned char snsCart;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(menuOptionsSNS, 5);
|
convertPgm(menuOptionsSNS, 5);
|
||||||
snsCart = question_box("Select Cart Type", menuOptions, 5, 0);
|
snsCart = question_box(F("Select Cart Type"), menuOptions, 5, 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 (snsCart)
|
switch (snsCart)
|
||||||
@ -114,7 +114,7 @@ void snesMenu() {
|
|||||||
unsigned char mainMenu;
|
unsigned char mainMenu;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(menuOptionsSNES, 6);
|
convertPgm(menuOptionsSNES, 6);
|
||||||
mainMenu = question_box("SNES Cart Reader", menuOptions, 6, 0);
|
mainMenu = question_box(F("SNES Cart 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 (mainMenu)
|
switch (mainMenu)
|
||||||
@ -209,7 +209,7 @@ void snesMenu() {
|
|||||||
// Switch RST(PH0) to LOW
|
// Switch RST(PH0) to LOW
|
||||||
PORTH &= ~(1 << 0);
|
PORTH &= ~(1 << 0);
|
||||||
display_Clear();
|
display_Clear();
|
||||||
print_Msg("Resetting...");
|
print_Msg(F("Resetting..."));
|
||||||
display_Update();
|
display_Update();
|
||||||
delay(3000); // wait 3 secs to switch to next game
|
delay(3000); // wait 3 secs to switch to next game
|
||||||
resetArduino();
|
resetArduino();
|
||||||
@ -231,7 +231,7 @@ void confMenu() {
|
|||||||
unsigned char subMenu;
|
unsigned char subMenu;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(menuOptionsConf, 5);
|
convertPgm(menuOptionsConf, 5);
|
||||||
subMenu = question_box("Choose mapping", menuOptions, 5, 0);
|
subMenu = question_box(F("Choose mapping"), menuOptions, 5, 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 (subMenu)
|
switch (subMenu)
|
||||||
@ -1183,7 +1183,7 @@ void writeSRAM (boolean browseFile) {
|
|||||||
if (browseFile) {
|
if (browseFile) {
|
||||||
filePath[0] = '\0';
|
filePath[0] = '\0';
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
fileBrowser("Select srm file");
|
fileBrowser(F("Select srm file"));
|
||||||
// Create filepath
|
// Create filepath
|
||||||
sprintf(filePath, "%s/%s", filePath, fileName);
|
sprintf(filePath, "%s/%s", filePath, fileName);
|
||||||
display_Clear();
|
display_Clear();
|
||||||
@ -1672,7 +1672,7 @@ unsigned long verifySRAM() {
|
|||||||
// Switch RST(PH0) to LOW
|
// Switch RST(PH0) to LOW
|
||||||
PORTH &= ~(1 << 0);
|
PORTH &= ~(1 << 0);
|
||||||
display_Clear();
|
display_Clear();
|
||||||
print_Msg("Resetting...");
|
print_Msg(F("Resetting..."));
|
||||||
display_Update();
|
display_Update();
|
||||||
delay(3000); // wait 3 secs
|
delay(3000); // wait 3 secs
|
||||||
resetArduino();
|
resetArduino();
|
||||||
|
@ -42,7 +42,7 @@ void svMenu() {
|
|||||||
unsigned char mainMenu;
|
unsigned char mainMenu;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
convertPgm(menuOptionsSVFlash, 3);
|
convertPgm(menuOptionsSVFlash, 3);
|
||||||
mainMenu = question_box("Satellaview 8M Memory", menuOptions, 3, 0);
|
mainMenu = question_box(F("Satellaview 8M Memory"), 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 (mainMenu)
|
switch (mainMenu)
|
||||||
@ -214,7 +214,7 @@ void writeROM_SV (void) {
|
|||||||
//Display file Browser and wait user to select a file. Size must be 1MB.
|
//Display file Browser and wait user to select a file. Size must be 1MB.
|
||||||
filePath[0] = '\0';
|
filePath[0] = '\0';
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
fileBrowser("Select sfc file");
|
fileBrowser(F("Select sfc file"));
|
||||||
// Create filepath
|
// Create filepath
|
||||||
sprintf(filePath, "%s/%s", filePath, fileName);
|
sprintf(filePath, "%s/%s", filePath, fileName);
|
||||||
display_Clear();
|
display_Clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user