Update Cart_Reader.ino

Added support for SD Card Add-on to use RTC for Creation/Modification Date/Time stamps.
Added code to support RTC such as startup, automatically updating time based on date compiled, and allowing for any script to add a Date/Time stamp.
This commit is contained in:
majorpbx 2021-10-02 01:29:37 -04:00 committed by GitHub
parent cc1668a2e3
commit 451daf1502

View File

@ -4,8 +4,8 @@
This project represents a community-driven effort to provide
an easy to build and easy to modify cartridge dumper.
Date: 02.08.2021
Version: 6.6
Date: 02.10.2021
Version: 6.7
SD lib: https://github.com/greiman/SdFat
LCD lib: https://github.com/adafruit/Adafruit_SSD1306
@ -34,13 +34,13 @@
And a special Thank You to all coders and contributors on Github and the Arduino forum:
jiyunomegami, splash5, Kreeblah, ramapcsx2, PsyK0p4T, Dakkaron, Pickle, sdhizumi,
sakman55, Uzlopak, scrap-a, majorpbx, borti4938, Modman, philenotfound, vogelfreiheit
Uzlopak, sakman55, majorpbx, borti4938, Modman, philenotfound, vogelfreiheit
And to nocash for figuring out the secrets of the SFC Nintendo Power cartridge.
**********************************************************************************/
char ver[5] = "6.6";
char ver[5] = "6.7";
/******************************************
Libraries
@ -111,6 +111,11 @@ typedef enum COLOR_T {
white_color,
} color_t;
// RTC Library
#ifdef RTC_installed
#include "RTC.h"
#endif
/******************************************
Defines
*****************************************/
@ -211,6 +216,8 @@ char checksumStr[5];
bool errorLvl = 0;
byte romVersion = 0;
char cartID[5];
String CRC1 = "";
String CRC2 = "";
unsigned long cartSize;
char flashid[5];
char vendorID[5];
@ -711,6 +718,14 @@ void setup() {
Serial.println(int(sd.vol()->fatType()));
#endif
#ifdef RTC_installed
// Start RTC
RTCStart();
// Set Date/Time Callback Funtion
SdFile::dateTimeCallback(dateTime);
#endif
startMenu();
}