Update NES.ino

This commit is contained in:
sanni 2022-10-04 21:11:13 +02:00
parent bef9d0f5f9
commit 3d7c424344

View File

@ -2021,6 +2021,11 @@ unsigned char* getNES20HeaderBytesFromDatabaseRow(const char* crctest) {
Config Functions Config Functions
*****************************************/ *****************************************/
void setMapper() { void setMapper() {
#ifdef global_log
// Disable log to prevent unnecessary logging
dont_log = true;
#endif
// OLED // OLED
#if defined(enable_OLED) #if defined(enable_OLED)
chooseMapper: chooseMapper:
@ -2256,6 +2261,11 @@ setmapper:
#endif #endif
EEPROM_writeAnything(7, newmapper); EEPROM_writeAnything(7, newmapper);
mapper = newmapper; mapper = newmapper;
#ifdef global_log
// Enable log again
dont_log = false;
#endif
} }
void checkMapperSize() { void checkMapperSize() {
@ -2275,6 +2285,11 @@ void checkMapperSize() {
} }
void setPRGSize() { void setPRGSize() {
#ifdef global_log
// Disable log to prevent unnecessary logging
dont_log = true;
#endif
#if (defined(enable_LCD) || defined(enable_OLED)) #if (defined(enable_LCD) || defined(enable_OLED))
display_Clear(); display_Clear();
if (prglo == prghi) if (prglo == prghi)
@ -2381,9 +2396,19 @@ setprg:
#endif #endif
EEPROM_writeAnything(8, newprgsize); EEPROM_writeAnything(8, newprgsize);
prgsize = newprgsize; prgsize = newprgsize;
#ifdef global_log
// Enable log again
dont_log = false;
#endif
} }
void setCHRSize() { void setCHRSize() {
#ifdef global_log
// Disable log to prevent unnecessary logging
dont_log = true;
#endif
#if (defined(enable_LCD) || defined(enable_OLED)) #if (defined(enable_LCD) || defined(enable_OLED))
display_Clear(); display_Clear();
if (chrlo == chrhi) if (chrlo == chrhi)
@ -2491,9 +2516,19 @@ setchr:
#endif #endif
EEPROM_writeAnything(9, newchrsize); EEPROM_writeAnything(9, newchrsize);
chrsize = newchrsize; chrsize = newchrsize;
#ifdef global_log
// Enable log again
dont_log = false;
#endif
} }
void setRAMSize() { void setRAMSize() {
#ifdef global_log
// Disable log to prevent unnecessary logging
dont_log = true;
#endif
#if (defined(enable_LCD) || defined(enable_OLED)) #if (defined(enable_LCD) || defined(enable_OLED))
display_Clear(); display_Clear();
if (ramlo == ramhi) if (ramlo == ramhi)
@ -2734,6 +2769,11 @@ setram:
#endif #endif
EEPROM_writeAnything(10, newramsize); EEPROM_writeAnything(10, newramsize);
ramsize = newramsize; ramsize = newramsize;
#ifdef global_log
// Enable log again
dont_log = false;
#endif
} }
// MMC6 Detection // MMC6 Detection