aboutsummaryrefslogtreecommitdiffhomepage
path: root/Cart_Reader/SMS.ino
diff options
context:
space:
mode:
authorPsyK0p4T <[email protected]>2022-10-27 22:25:34 +0200
committerGitHub <[email protected]>2022-10-27 22:25:34 +0200
commitce436e8a77d530361145fa32ac17a9a0d1c4463b (patch)
tree5345e426df826cc3790502318f38f3e24bca3186 /Cart_Reader/SMS.ino
parent91523269f4eecb1e592a1780b9d348f8a19bc404 (diff)
downloadcartreader-ce436e8a77d530361145fa32ac17a9a0d1c4463b.tar.gz
cartreader-ce436e8a77d530361145fa32ac17a9a0d1c4463b.zip
Use sg1000.txt database
Use sg1000.txt database to verify/rename SG-1000 dumps
Diffstat (limited to 'Cart_Reader/SMS.ino')
-rw-r--r--Cart_Reader/SMS.ino28
1 files changed, 17 insertions, 11 deletions
diff --git a/Cart_Reader/SMS.ino b/Cart_Reader/SMS.ino
index 51a5b7f..bdf9bc4 100644
--- a/Cart_Reader/SMS.ino
+++ b/Cart_Reader/SMS.ino
@@ -69,7 +69,11 @@ void _smsMenu() {
readROM_SMS();
if ((retrode_mode && !retrode_mode_sms) || retron_mode) {
compareCRC("gg.txt", 0, 1, 0);
- } else {
+ }
+ else if (raphnet_mode_sg1000) {
+ compareCRC("sg1000.txt", 0, 1, 0);
+ }
+ else {
compareCRC("sms.txt", 0, 1, 0);
}
#ifdef global_log
@@ -558,21 +562,23 @@ void getCartInfo_SMS() {
// Read rom and save to the SD card
void readROM_SMS() {
- // Get name, add extension and convert to char array for sd lib
+ // Get name, add extension depending on the system and convert to char array for sd lib
+ EEPROM_readAnything(0, foldern);
strcpy(fileName, romName);
if ((retrode_mode && !retrode_mode_sms) || retron_mode) {
strcat(fileName, ".gg");
- } else {
- strcat(fileName, ".sms");
- }
-
- // create a new folder
- EEPROM_readAnything(0, foldern);
- if ((retrode_mode && !retrode_mode_sms) || retron_mode) {
sprintf(folder, "GG/ROM/%s/%d", romName, foldern);
- } else {
+ }
+ else if (raphnet_mode_sg1000) {
+ strcat(fileName, ".sg");
+ sprintf(folder, "SG1000/ROM/%s/%d", romName, foldern);
+ }
+ else {
+ strcat(fileName, ".sms");
sprintf(folder, "SMS/ROM/%s/%d", romName, foldern);
}
+
+ // Create a new folder
sd.mkdir(folder, true);
sd.chdir(folder);
@@ -756,4 +762,4 @@ void writeSRAM_SMS() {
//******************************************
// End of File
-//****************************************** \ No newline at end of file
+//******************************************