mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-23 21:19:16 +01:00
Improve SD logfile
This commit is contained in:
parent
c760a32c10
commit
f0639e20ad
@ -4,7 +4,7 @@
|
|||||||
This project represents a community-driven effort to provide
|
This project represents a community-driven effort to provide
|
||||||
an easy to build and easy to modify cartridge dumper.
|
an easy to build and easy to modify cartridge dumper.
|
||||||
|
|
||||||
Date: 12.06.2022
|
Date: 14.06.2022
|
||||||
Version: 8.5 BETA
|
Version: 8.5 BETA
|
||||||
|
|
||||||
SD lib: https://github.com/greiman/SdFat
|
SD lib: https://github.com/greiman/SdFat
|
||||||
@ -643,7 +643,7 @@ void aboutScreen() {
|
|||||||
println_Msg(F(""));
|
println_Msg(F(""));
|
||||||
println_Msg(F(""));
|
println_Msg(F(""));
|
||||||
println_Msg(F(""));
|
println_Msg(F(""));
|
||||||
println_Msg(F("Press Button"));
|
println_Msg(F("Press Button..."));
|
||||||
display_Update();
|
display_Update();
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
@ -792,6 +792,22 @@ void setup() {
|
|||||||
if (!myLog.open("OSCR_LOG.txt", O_RDWR | O_CREAT | O_APPEND)) {
|
if (!myLog.open("OSCR_LOG.txt", O_RDWR | O_CREAT | O_APPEND)) {
|
||||||
print_Error(F("SD Error"), true);
|
print_Error(F("SD Error"), true);
|
||||||
}
|
}
|
||||||
|
println_Msg(F(""));
|
||||||
|
#if defined(HW1)
|
||||||
|
print_Msg(F("OSCR HW1"));
|
||||||
|
#elif defined(HW2)
|
||||||
|
print_Msg(F("OSCR HW2"));
|
||||||
|
#elif defined(HW3)
|
||||||
|
print_Msg(F("OSCR HW3"));
|
||||||
|
#elif defined(HW4)
|
||||||
|
print_Msg(F("OSCR HW4"));
|
||||||
|
#elif defined(HW5)
|
||||||
|
print_Msg(F("OSCR HW5"));
|
||||||
|
#elif defined(SERIAL_MONITOR)
|
||||||
|
print_Msg(F("OSCR Serial"));
|
||||||
|
#endif
|
||||||
|
print_Msg(F(" V"));
|
||||||
|
println_Msg(ver);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef RTC_installed
|
#ifdef RTC_installed
|
||||||
@ -1078,7 +1094,11 @@ void println_Msg(const __FlashStringHelper *string) {
|
|||||||
Serial.println(string);
|
Serial.println(string);
|
||||||
#endif
|
#endif
|
||||||
#ifdef global_log
|
#ifdef global_log
|
||||||
|
char myBuffer[15];
|
||||||
|
strlcpy_P(myBuffer, (char *)string, 15);
|
||||||
|
if ((strncmp(myBuffer, "Press Button...", 14) != 0) && (strncmp(myBuffer, "Select file", 10) != 0)) {
|
||||||
myLog.println(string);
|
myLog.println(string);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1585,6 +1605,13 @@ unsigned char questionBox_LCD(const __FlashStringHelper * question, char answers
|
|||||||
|
|
||||||
// pass on user choice
|
// pass on user choice
|
||||||
setColor_RGB(0, 0, 0);
|
setColor_RGB(0, 0, 0);
|
||||||
|
|
||||||
|
#ifdef global_log
|
||||||
|
println_Msg("");
|
||||||
|
print_Msg("[+] ");
|
||||||
|
println_Msg(answers[choice]);
|
||||||
|
#endif
|
||||||
|
|
||||||
return choice;
|
return choice;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -171,7 +171,7 @@ void gbxMenu() {
|
|||||||
if (!writeCFI_GB()) {
|
if (!writeCFI_GB()) {
|
||||||
display_Clear();
|
display_Clear();
|
||||||
println_Msg(F("Flashing failed, time out!"));
|
println_Msg(F("Flashing failed, time out!"));
|
||||||
println_Msg(F("Press button..."));
|
println_Msg(F("Press Button..."));
|
||||||
display_Update();
|
display_Update();
|
||||||
wait();
|
wait();
|
||||||
}
|
}
|
||||||
@ -198,7 +198,7 @@ void gbxMenu() {
|
|||||||
if (!writeCFI_GB()) {
|
if (!writeCFI_GB()) {
|
||||||
display_Clear();
|
display_Clear();
|
||||||
println_Msg(F("Flashing failed, time out!"));
|
println_Msg(F("Flashing failed, time out!"));
|
||||||
println_Msg(F("Press button..."));
|
println_Msg(F("Press Button..."));
|
||||||
display_Update();
|
display_Update();
|
||||||
wait();
|
wait();
|
||||||
resetArduino();
|
resetArduino();
|
||||||
@ -1695,7 +1695,7 @@ bool writeCFI_GB() {
|
|||||||
print_Msg(F("but needs "));
|
print_Msg(F("but needs "));
|
||||||
print_Msg(romBanks);
|
print_Msg(romBanks);
|
||||||
println_Msg(F("."));
|
println_Msg(F("."));
|
||||||
println_Msg(F("Press button..."));
|
println_Msg(F("Press Button..."));
|
||||||
display_Update();
|
display_Update();
|
||||||
wait();
|
wait();
|
||||||
resetArduino();
|
resetArduino();
|
||||||
|
@ -45,8 +45,7 @@ void gbmMenu() {
|
|||||||
println_Msg(F("cartreader directly"));
|
println_Msg(F("cartreader directly"));
|
||||||
println_Msg(F("before reading"));
|
println_Msg(F("before reading"));
|
||||||
println_Msg("");
|
println_Msg("");
|
||||||
println_Msg(F("Press Button"));
|
println_Msg(F("Press Button..."));
|
||||||
println_Msg(F("to continue"));
|
|
||||||
display_Update();
|
display_Update();
|
||||||
wait();
|
wait();
|
||||||
// Clear screen
|
// Clear screen
|
||||||
@ -75,8 +74,7 @@ void gbmMenu() {
|
|||||||
println_Msg(F("NP Cartridge."));
|
println_Msg(F("NP Cartridge."));
|
||||||
println_Msg("");
|
println_Msg("");
|
||||||
println_Msg("");
|
println_Msg("");
|
||||||
println_Msg(F("Press Button"));
|
println_Msg(F("Press Button..."));
|
||||||
println_Msg(F("to continue"));
|
|
||||||
display_Update();
|
display_Update();
|
||||||
wait();
|
wait();
|
||||||
// Clear screen
|
// Clear screen
|
||||||
@ -137,8 +135,7 @@ void gbmMenu() {
|
|||||||
println_Msg(F("NP Cartridge's"));
|
println_Msg(F("NP Cartridge's"));
|
||||||
println_Msg(F("mapping data"));
|
println_Msg(F("mapping data"));
|
||||||
println_Msg("");
|
println_Msg("");
|
||||||
println_Msg(F("Press Button"));
|
println_Msg(F("Press Button..."));
|
||||||
println_Msg(F("to continue"));
|
|
||||||
display_Update();
|
display_Update();
|
||||||
wait();
|
wait();
|
||||||
|
|
||||||
|
@ -320,8 +320,7 @@ void gbSmartFlashMenu()
|
|||||||
println_Msg(F("This will erase your"));
|
println_Msg(F("This will erase your"));
|
||||||
println_Msg(F("GB Smart Cartridge."));
|
println_Msg(F("GB Smart Cartridge."));
|
||||||
println_Msg(F(""));
|
println_Msg(F(""));
|
||||||
println_Msg(F("Press Button"));
|
println_Msg(F("Press Button..."));
|
||||||
println_Msg(F("to continue"));
|
|
||||||
display_Update();
|
display_Update();
|
||||||
wait();
|
wait();
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ void n64ControllerMenu() {
|
|||||||
display_Update();
|
display_Update();
|
||||||
readMPK();
|
readMPK();
|
||||||
println_Msg(F(""));
|
println_Msg(F(""));
|
||||||
println_Msg(F("Press Button."));
|
println_Msg(F("Press Button..."));
|
||||||
display_Update();
|
display_Update();
|
||||||
wait();
|
wait();
|
||||||
break;
|
break;
|
||||||
@ -215,7 +215,7 @@ void n64ControllerMenu() {
|
|||||||
writeMPK();
|
writeMPK();
|
||||||
verifyMPK();
|
verifyMPK();
|
||||||
println_Msg(F(""));
|
println_Msg(F(""));
|
||||||
println_Msg(F("Press Button."));
|
println_Msg(F("Press Button..."));
|
||||||
display_Update();
|
display_Update();
|
||||||
wait();
|
wait();
|
||||||
break;
|
break;
|
||||||
@ -3771,7 +3771,7 @@ void flashRepro_N64() {
|
|||||||
println_Msg(F("Repro Cartridge."));
|
println_Msg(F("Repro Cartridge."));
|
||||||
println_Msg(F("Attention: Use 3.3V!"));
|
println_Msg(F("Attention: Use 3.3V!"));
|
||||||
println_Msg("");
|
println_Msg("");
|
||||||
println_Msg(F("Press Button"));
|
println_Msg(F("Press Button..."));
|
||||||
display_Update();
|
display_Update();
|
||||||
wait();
|
wait();
|
||||||
}
|
}
|
||||||
@ -4742,7 +4742,7 @@ void flashGameshark_N64() {
|
|||||||
println_Msg(F("Gameshark cartridge"));
|
println_Msg(F("Gameshark cartridge"));
|
||||||
println_Msg(F("Attention: Use 3.3V!"));
|
println_Msg(F("Attention: Use 3.3V!"));
|
||||||
println_Msg(F("Power OFF if Unsure!"));
|
println_Msg(F("Power OFF if Unsure!"));
|
||||||
println_Msg(F("Press Button"));
|
println_Msg(F("Press Button..."));
|
||||||
display_Update();
|
display_Update();
|
||||||
wait();
|
wait();
|
||||||
|
|
||||||
|
@ -278,7 +278,7 @@ void nesChipMenu() {
|
|||||||
readPRG();
|
readPRG();
|
||||||
resetROM();
|
resetROM();
|
||||||
println_Msg(F(""));
|
println_Msg(F(""));
|
||||||
println_Msg(F("Press button"));
|
println_Msg(F("Press Button..."));
|
||||||
display_Update();
|
display_Update();
|
||||||
wait();
|
wait();
|
||||||
break;
|
break;
|
||||||
@ -289,7 +289,7 @@ void nesChipMenu() {
|
|||||||
readCHR();
|
readCHR();
|
||||||
resetROM();
|
resetROM();
|
||||||
println_Msg(F(""));
|
println_Msg(F(""));
|
||||||
println_Msg(F("Press button"));
|
println_Msg(F("Press Button..."));
|
||||||
display_Update();
|
display_Update();
|
||||||
wait();
|
wait();
|
||||||
break;
|
break;
|
||||||
@ -300,7 +300,7 @@ void nesChipMenu() {
|
|||||||
readRAM();
|
readRAM();
|
||||||
resetROM();
|
resetROM();
|
||||||
println_Msg(F(""));
|
println_Msg(F(""));
|
||||||
println_Msg(F("Press button"));
|
println_Msg(F("Press Button..."));
|
||||||
display_Update();
|
display_Update();
|
||||||
wait();
|
wait();
|
||||||
break;
|
break;
|
||||||
@ -325,7 +325,7 @@ void nesWriteMenu() {
|
|||||||
writeRAM();
|
writeRAM();
|
||||||
resetROM();
|
resetROM();
|
||||||
println_Msg(F(""));
|
println_Msg(F(""));
|
||||||
println_Msg(F("Press button"));
|
println_Msg(F("Press Button..."));
|
||||||
display_Update();
|
display_Update();
|
||||||
wait();
|
wait();
|
||||||
break;
|
break;
|
||||||
@ -341,7 +341,7 @@ void nesWriteMenu() {
|
|||||||
println_Msg(F("Error:"));
|
println_Msg(F("Error:"));
|
||||||
println_Msg(F("Can't write to this cartridge"));
|
println_Msg(F("Can't write to this cartridge"));
|
||||||
println_Msg(F(""));
|
println_Msg(F(""));
|
||||||
println_Msg(F("Press button"));
|
println_Msg(F("Press Button..."));
|
||||||
display_Update();
|
display_Update();
|
||||||
}
|
}
|
||||||
wait();
|
wait();
|
||||||
|
@ -277,8 +277,7 @@ void sfmFlashMenu() {
|
|||||||
println_Msg(F("This will erase your"));
|
println_Msg(F("This will erase your"));
|
||||||
println_Msg(F("NP Cartridge."));
|
println_Msg(F("NP Cartridge."));
|
||||||
println_Msg("");
|
println_Msg("");
|
||||||
println_Msg(F("Press Button"));
|
println_Msg(F("Press Button..."));
|
||||||
println_Msg(F("to continue"));
|
|
||||||
display_Update();
|
display_Update();
|
||||||
wait();
|
wait();
|
||||||
|
|
||||||
@ -396,8 +395,7 @@ void sfmFlashMenu() {
|
|||||||
println_Msg(F("This will erase your"));
|
println_Msg(F("This will erase your"));
|
||||||
println_Msg(F("NP Cartridge."));
|
println_Msg(F("NP Cartridge."));
|
||||||
println_Msg("");
|
println_Msg("");
|
||||||
println_Msg(F("Press Button"));
|
println_Msg(F("Press Button..."));
|
||||||
println_Msg(F("to continue"));
|
|
||||||
display_Update();
|
display_Update();
|
||||||
wait();
|
wait();
|
||||||
|
|
||||||
@ -756,7 +754,7 @@ void getCartInfo_SFM() {
|
|||||||
print_Msg(F("Sram: "));
|
print_Msg(F("Sram: "));
|
||||||
print_Msg(sramSize);
|
print_Msg(sramSize);
|
||||||
println_Msg(F("Kbit"));
|
println_Msg(F("Kbit"));
|
||||||
println_Msg(F("Press Button"));
|
println_Msg(F("Press Button..."));
|
||||||
display_Update();
|
display_Update();
|
||||||
// Wait for user input
|
// Wait for user input
|
||||||
wait();
|
wait();
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
// Use calibration data from snes_clk.txt
|
// Use calibration data from snes_clk.txt
|
||||||
// #define clockgen_calibration
|
// #define clockgen_calibration
|
||||||
|
|
||||||
// Write all info to log.txt in root dir
|
// Write all info to OSCR_LOG.txt in root dir
|
||||||
// #define global_log
|
// #define global_log
|
||||||
|
|
||||||
// Use Adafruit Clock Generator
|
// Use Adafruit Clock Generator
|
||||||
|
Loading…
Reference in New Issue
Block a user