mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-23 21:19:16 +01:00
V19A: Minor bugfixes
This commit is contained in:
parent
a8c03520c8
commit
b0e2d5b6c2
@ -2,8 +2,8 @@
|
|||||||
Cartridge Reader for Arduino Mega2560
|
Cartridge Reader for Arduino Mega2560
|
||||||
|
|
||||||
Author: sanni
|
Author: sanni
|
||||||
Date: 2016-09-12
|
Date: 2016-09-14
|
||||||
Version: V19
|
Version: V19A
|
||||||
|
|
||||||
SD lib: https://github.com/greiman/SdFat
|
SD lib: https://github.com/greiman/SdFat
|
||||||
LCD lib: https://github.com/adafruit/Adafruit_SSD1306
|
LCD lib: https://github.com/adafruit/Adafruit_SSD1306
|
||||||
@ -33,7 +33,7 @@
|
|||||||
lukeskaff - Nintendo DS GBA slot timing
|
lukeskaff - Nintendo DS GBA slot timing
|
||||||
|
|
||||||
**********************************************************************************/
|
**********************************************************************************/
|
||||||
char ver[5] = "V19";
|
char ver[5] = "V19A";
|
||||||
|
|
||||||
/******************************************
|
/******************************************
|
||||||
Define Output
|
Define Output
|
||||||
@ -47,7 +47,7 @@ char ver[5] = "V19";
|
|||||||
Define Input
|
Define Input
|
||||||
******************************************/
|
******************************************/
|
||||||
// If you have two buttons on your cart reader you can remove the //
|
// If you have two buttons on your cart reader you can remove the //
|
||||||
//#define enable_Button2
|
#define enable_Button2
|
||||||
|
|
||||||
/******************************************
|
/******************************************
|
||||||
Pinout
|
Pinout
|
||||||
@ -921,7 +921,7 @@ unsigned char questionBox_OLED(const char* question, char answers[7][20], int nu
|
|||||||
display.setCursor(0, 0);
|
display.setCursor(0, 0);
|
||||||
|
|
||||||
// change the rgb led to the start menu color
|
// change the rgb led to the start menu color
|
||||||
rgbLed(blue_color);
|
rgbLed(default_choice);
|
||||||
|
|
||||||
// print menu
|
// print menu
|
||||||
display.println(question);
|
display.println(question);
|
||||||
|
@ -64,8 +64,8 @@ const char N64CartMenuItem4[] PROGMEM = "Reset";
|
|||||||
const char* const menuOptionsN64Cart[] PROGMEM = {N64CartMenuItem1, N64CartMenuItem2, N64CartMenuItem3, N64CartMenuItem4};
|
const char* const menuOptionsN64Cart[] PROGMEM = {N64CartMenuItem1, N64CartMenuItem2, N64CartMenuItem3, N64CartMenuItem4};
|
||||||
|
|
||||||
// N64 CRC32 error menu items
|
// N64 CRC32 error menu items
|
||||||
const char N64CRCMenuItem1[] PROGMEM = "Redump";
|
const char N64CRCMenuItem1[] PROGMEM = "Recalc CRC";
|
||||||
const char N64CRCMenuItem2[] PROGMEM = "Recalc CRC";
|
const char N64CRCMenuItem2[] PROGMEM = "Redump";
|
||||||
const char N64CRCMenuItem3[] PROGMEM = "Ignore";
|
const char N64CRCMenuItem3[] PROGMEM = "Ignore";
|
||||||
const char N64CRCMenuItem4[] PROGMEM = "Reset";
|
const char N64CRCMenuItem4[] PROGMEM = "Reset";
|
||||||
const char* const menuOptionsN64CRC[] PROGMEM = {N64CRCMenuItem1, N64CRCMenuItem2, N64CRCMenuItem3, N64CRCMenuItem4};
|
const char* const menuOptionsN64CRC[] PROGMEM = {N64CRCMenuItem1, N64CRCMenuItem2, N64CRCMenuItem3, N64CRCMenuItem4};
|
||||||
@ -2015,12 +2015,21 @@ calcn64crc:
|
|||||||
strcpy(tempStr3, "CRC ERROR ");
|
strcpy(tempStr3, "CRC ERROR ");
|
||||||
strcat(tempStr3, crcStr);
|
strcat(tempStr3, crcStr);
|
||||||
|
|
||||||
CRCMenu = question_box(tempStr3, menuOptions, 4, 0);
|
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)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
// Change to last directory
|
||||||
|
sd.chdir(folder);
|
||||||
|
display_Clear();
|
||||||
|
// Calculate CRC again
|
||||||
|
rgb.setColor(0, 0, 0);
|
||||||
|
goto calcn64crc;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1:
|
||||||
// Change to last directory
|
// Change to last directory
|
||||||
sd.chdir(folder);
|
sd.chdir(folder);
|
||||||
// Delete old file
|
// Delete old file
|
||||||
@ -2038,15 +2047,6 @@ calcn64crc:
|
|||||||
goto readn64rom;
|
goto readn64rom;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
|
||||||
// Change to last directory
|
|
||||||
sd.chdir(folder);
|
|
||||||
display_Clear();
|
|
||||||
// Calculate CRC again
|
|
||||||
rgb.setColor(0, 0, 0);
|
|
||||||
goto calcn64crc;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
// Return to N64 menu
|
// Return to N64 menu
|
||||||
break;
|
break;
|
||||||
|
@ -62,13 +62,20 @@ void snesMenu() {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
|
if (sramSize > 0) {
|
||||||
display_Clear();
|
display_Clear();
|
||||||
// Change working dir to root
|
// Change working dir to root
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
readSRAM();
|
readSRAM();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
display_Clear();
|
||||||
|
print_Error(F("Does not have SRAM"), false);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
|
if (sramSize > 0) {
|
||||||
display_Clear();
|
display_Clear();
|
||||||
// Change working dir to root
|
// Change working dir to root
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
@ -85,9 +92,15 @@ void snesMenu() {
|
|||||||
println_Msg(F(" bytes "));
|
println_Msg(F(" bytes "));
|
||||||
print_Error(F("did not verify."), false);
|
print_Error(F("did not verify."), false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
display_Clear();
|
||||||
|
print_Error(F("Does not have SRAM"), false);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
|
if (sramSize > 0) {
|
||||||
display_Clear();
|
display_Clear();
|
||||||
// Change working dir to root
|
// Change working dir to root
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
@ -95,7 +108,7 @@ void snesMenu() {
|
|||||||
eraseSRAM(0x00);
|
eraseSRAM(0x00);
|
||||||
eraseSRAM(0xFF);
|
eraseSRAM(0xFF);
|
||||||
writeSRAM(0);
|
writeSRAM(0);
|
||||||
wrErrors = verifySRAM();
|
unsigned long wrErrors = verifySRAM();
|
||||||
if (wrErrors == 0) {
|
if (wrErrors == 0) {
|
||||||
println_Msg(F("Verified OK"));
|
println_Msg(F("Verified OK"));
|
||||||
display_Update();
|
display_Update();
|
||||||
@ -106,6 +119,11 @@ void snesMenu() {
|
|||||||
println_Msg(F(" bytes "));
|
println_Msg(F(" bytes "));
|
||||||
print_Error(F("did not verify."), false);
|
print_Error(F("did not verify."), false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
display_Clear();
|
||||||
|
print_Error(F("Does not have SRAM"), false);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
|
Loading…
Reference in New Issue
Block a user