mirror of
https://github.com/sanni/cartreader.git
synced 2024-12-02 17:24:18 +01:00
Merge pull request #435 from PsyK0p4T/master
Game Gear crc file usage added
This commit is contained in:
commit
02a7b42052
@ -66,7 +66,12 @@ void _smsMenu() {
|
|||||||
// Change working dir to root
|
// Change working dir to root
|
||||||
sd.chdir("/");
|
sd.chdir("/");
|
||||||
readROM_SMS();
|
readROM_SMS();
|
||||||
|
if (retrode_mode && !retrode_mode_sms) {
|
||||||
|
compareCRC("gg.txt", 0, 0);
|
||||||
|
}
|
||||||
|
else {
|
||||||
compareCRC("sms.txt", 0, 0);
|
compareCRC("sms.txt", 0, 0);
|
||||||
|
}
|
||||||
#ifdef global_log
|
#ifdef global_log
|
||||||
save_log();
|
save_log();
|
||||||
#endif
|
#endif
|
||||||
@ -487,7 +492,7 @@ void getCartInfo_SMS() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
display_Clear();
|
display_Clear();
|
||||||
println_Msg(F("SMS Header not found"));
|
println_Msg(F("SMS/GG Header not found"));
|
||||||
println_Msg(F(" "));
|
println_Msg(F(" "));
|
||||||
print_Msg(F("Name: "));
|
print_Msg(F("Name: "));
|
||||||
println_Msg(romName);
|
println_Msg(romName);
|
||||||
@ -501,7 +506,12 @@ void getCartInfo_SMS() {
|
|||||||
// Header found
|
// Header found
|
||||||
else {
|
else {
|
||||||
display_Clear();
|
display_Clear();
|
||||||
|
if (retrode_mode && !retrode_mode_sms) {
|
||||||
|
println_Msg(F("GG Header Info"));
|
||||||
|
}
|
||||||
|
else {
|
||||||
println_Msg(F("SMS Header Info"));
|
println_Msg(F("SMS Header Info"));
|
||||||
|
}
|
||||||
println_Msg(F(" "));
|
println_Msg(F(" "));
|
||||||
print_Msg(F("Name: "));
|
print_Msg(F("Name: "));
|
||||||
println_Msg(romName);
|
println_Msg(romName);
|
||||||
@ -525,11 +535,21 @@ void getCartInfo_SMS() {
|
|||||||
void readROM_SMS() {
|
void readROM_SMS() {
|
||||||
// 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, romName);
|
strcpy(fileName, romName);
|
||||||
strcat(fileName, ".SMS");
|
if (retrode_mode && !retrode_mode_sms) {
|
||||||
|
strcat(fileName, ".gg");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
strcat(fileName, ".sms");
|
||||||
|
}
|
||||||
|
|
||||||
// create a new folder
|
// create a new folder
|
||||||
EEPROM_readAnything(0, foldern);
|
EEPROM_readAnything(0, foldern);
|
||||||
|
if (retrode_mode && !retrode_mode_sms) {
|
||||||
|
sprintf(folder, "GG/ROM/%s/%d", romName, foldern);
|
||||||
|
}
|
||||||
|
else {
|
||||||
sprintf(folder, "SMS/ROM/%s/%d", romName, foldern);
|
sprintf(folder, "SMS/ROM/%s/%d", romName, foldern);
|
||||||
|
}
|
||||||
sd.mkdir(folder, true);
|
sd.mkdir(folder, true);
|
||||||
sd.chdir(folder);
|
sd.chdir(folder);
|
||||||
|
|
||||||
@ -604,11 +624,16 @@ void readROM_SMS() {
|
|||||||
void readSRAM_SMS() {
|
void readSRAM_SMS() {
|
||||||
// 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, romName);
|
strcpy(fileName, romName);
|
||||||
strcat(fileName, ".SAV");
|
strcat(fileName, ".sav");
|
||||||
|
|
||||||
// create a new folder
|
// create a new folder
|
||||||
EEPROM_readAnything(0, foldern);
|
EEPROM_readAnything(0, foldern);
|
||||||
|
if (retrode_mode && !retrode_mode_sms) {
|
||||||
|
sprintf(folder, "GG/SAVE/%s/%d", romName, foldern);
|
||||||
|
}
|
||||||
|
else {
|
||||||
sprintf(folder, "SMS/SAVE/%s/%d", romName, foldern);
|
sprintf(folder, "SMS/SAVE/%s/%d", romName, foldern);
|
||||||
|
}
|
||||||
sd.mkdir(folder, true);
|
sd.mkdir(folder, true);
|
||||||
sd.chdir(folder);
|
sd.chdir(folder);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user