mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-13 08:25:05 +01:00
Fix NES manual mapper selection
This commit is contained in:
parent
78aa7a3d34
commit
a3b1882e88
@ -971,6 +971,9 @@ void mainMenu() {
|
||||
display_Clear();
|
||||
display_Update();
|
||||
setup_NES();
|
||||
#ifdef nointro
|
||||
getMapping();
|
||||
#endif
|
||||
checkStatus_NES();
|
||||
nesMenu();
|
||||
break;
|
||||
@ -1227,6 +1230,9 @@ void consoleMenu() {
|
||||
display_Clear();
|
||||
display_Update();
|
||||
setup_NES();
|
||||
#ifdef nointro
|
||||
getMapping();
|
||||
#endif
|
||||
checkStatus_NES();
|
||||
nesMenu();
|
||||
break;
|
||||
|
@ -526,6 +526,7 @@ void getMapping() {
|
||||
}
|
||||
oldcrc32 = ~oldcrc32;
|
||||
oldcrc32MMC3 = ~oldcrc32MMC3;
|
||||
boolean browseDatabase;
|
||||
|
||||
// Filter out all 0xFF checksums at 0x8000 and 0xE000
|
||||
if (oldcrc32 == 0xBD7BC39F && oldcrc32MMC3 == 0xBD7BC39F) {
|
||||
@ -534,7 +535,7 @@ void getMapping() {
|
||||
display_Update();
|
||||
delay(1000);
|
||||
setDefaultRomName();
|
||||
selectMapping(database);
|
||||
browseDatabase = selectMapping(database);
|
||||
} else {
|
||||
println_Msg(F("Searching database"));
|
||||
print_Msg(F("for "));
|
||||
@ -573,9 +574,10 @@ void getMapping() {
|
||||
|
||||
// Change ROM name to CART
|
||||
setDefaultRomName();
|
||||
selectMapping(database);
|
||||
browseDatabase = selectMapping(database);
|
||||
}
|
||||
}
|
||||
if (browseDatabase) {
|
||||
byte fastScrolling = 1;
|
||||
|
||||
// Display database
|
||||
@ -715,6 +717,7 @@ void getMapping() {
|
||||
EEPROM_writeAnything(10, ramsize);
|
||||
break;
|
||||
}
|
||||
}
|
||||
database.close();
|
||||
}
|
||||
|
||||
@ -733,7 +736,7 @@ static void readDatabaseEntry(FsFile& database, struct database_entry* entry) {
|
||||
entry->crc512 = strtoul(entry->crc512_str, NULL, 16);
|
||||
}
|
||||
|
||||
static void selectMapping(FsFile& database) {
|
||||
boolean selectMapping(FsFile& database) {
|
||||
// Select starting letter
|
||||
byte myLetter = starting_letter();
|
||||
|
||||
@ -744,6 +747,7 @@ static void selectMapping(FsFile& database) {
|
||||
setPRGSize();
|
||||
setCHRSize();
|
||||
setRAMSize();
|
||||
return 0;
|
||||
} else {
|
||||
#ifdef global_log
|
||||
// Disable log to prevent unnecessary logging
|
||||
@ -766,6 +770,7 @@ static void selectMapping(FsFile& database) {
|
||||
dont_log = false;
|
||||
#endif
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
void readRom_NES() {
|
||||
@ -2334,9 +2339,6 @@ void checkMMC6() { // Detect MMC6 Carts - read PRG 0x3E00A ("START
|
||||
}
|
||||
|
||||
void checkStatus_NES() {
|
||||
#ifdef nointro
|
||||
getMapping();
|
||||
#endif
|
||||
EEPROM_readAnything(7, mapper);
|
||||
EEPROM_readAnything(8, prgsize);
|
||||
EEPROM_readAnything(9, chrsize);
|
||||
|
Loading…
Reference in New Issue
Block a user