Remove more co-dependencies

This commit is contained in:
sanni 2024-08-16 19:54:57 +02:00
parent ac6e606f0d
commit 0d602720c2
7 changed files with 28 additions and 17 deletions

View File

@ -1249,7 +1249,7 @@ static const char* const modeOptions[] PROGMEM = {
#ifdef ENABLE_VSMILE #ifdef ENABLE_VSMILE
modeItem40, modeItem40,
#endif #endif
#ifdef ENABLE_FLASH #ifdef ENABLE_FLASH8
modeItem41, modeItem41,
#endif #endif
#ifdef ENABLE_SELFTEST #ifdef ENABLE_SELFTEST
@ -1564,7 +1564,7 @@ void mainMenu() {
break; break;
#endif #endif
#ifdef ENABLE_FLASH #ifdef ENABLE_FLASH8
case SYSTEM_MENU_FLASH: case SYSTEM_MENU_FLASH:
#ifdef ENABLE_VSELECT #ifdef ENABLE_VSELECT
setup_FlashVoltage(); setup_FlashVoltage();
@ -3708,7 +3708,7 @@ void loop() {
case CORE_GB_GBSMART_GAME: return gbSmartGameOptions(); case CORE_GB_GBSMART_GAME: return gbSmartGameOptions();
#endif #endif
#endif #endif
#ifdef ENABLE_FLASH #ifdef ENABLE_FLASH8
case CORE_FLASH8: return flashromMenu8(); case CORE_FLASH8: return flashromMenu8();
#ifdef ENABLE_FLASH16 #ifdef ENABLE_FLASH16
case CORE_FLASH16: return flashromMenu16(); case CORE_FLASH16: return flashromMenu16();

View File

@ -179,11 +179,18 @@
/****/ /****/
/* [ Flashrom Programmer for repro carts -------------------------- ] /* [ Flash Repros (all systems, SNES repro also needs FLASH8)------ ]
*/ */
//#define ENABLE_FLASH //#define ENABLE_FLASH
//#define ENABLE_FLASH16
/****/
/* [ Flashrom Programmer Menu & SNES Repros------------------------ ]
*/
//#define ENABLE_FLASH8
//#define ENABLE_FLASH16
/****/ /****/
@ -279,28 +286,28 @@
/****/ /****/
/* [ Super Famicom SF Memory Cassette ----------------------------- ] /* [ Super Famicom SF Memory Cassette (needs ENABLE_SNES)---------- ]
*/ */
//#define ENABLE_SFM //#define ENABLE_SFM
/****/ /****/
/* [ Super Famicom Satellaview ------------------------------------ ] /* [ Super Famicom Satellaview (needs ENABLE_SNES)----------------- ]
*/ */
//#define ENABLE_SV //#define ENABLE_SV
/****/ /****/
/* [ Super Famicom Sufami Turbo ----------------------------------- ] /* [ Super Famicom Sufami Turbo (needs ENABLE_SNES)---------------- ]
*/ */
//#define ENABLE_ST //#define ENABLE_ST
/****/ /****/
/* [ Super Famicom Game Processor RAM Cassette -------------------- ] /* [ Super Famicom Game Processor RAM Cassette (needs ENABLE_SNES)- ]
*/ */
//#define ENABLE_GPC //#define ENABLE_GPC

View File

@ -2,7 +2,7 @@
// FLASHROM MODULE // FLASHROM MODULE
// (also includes SNES repro functions) // (also includes SNES repro functions)
//****************************************** //******************************************
#ifdef ENABLE_FLASH #ifdef ENABLE_FLASH8
/****************************************** /******************************************
Variables Variables
@ -2842,7 +2842,7 @@ void identifyCFI_Flash() {
flashSwitchLastBits = true; flashSwitchLastBits = true;
} else { } else {
// Try x16 mode next // Try x16 mode next
startCFIMode(true); startCFIMode_Flash(true);
sprintf(cfiQRYx16, "%02X%02X%02X", readByte_Flash(0x10), readByte_Flash(0x11), readByte_Flash(0x12)); sprintf(cfiQRYx16, "%02X%02X%02X", readByte_Flash(0x10), readByte_Flash(0x11), readByte_Flash(0x12));
if (strcmp(cfiQRYx16, "515259") == 0) { // QRY in x16 mode if (strcmp(cfiQRYx16, "515259") == 0) { // QRY in x16 mode
println_Msg(F("Normal CFI x16 Mode")); println_Msg(F("Normal CFI x16 Mode"));

View File

@ -14,6 +14,10 @@ word addrlo;
word chksum; word chksum;
boolean is32x = 0; boolean is32x = 0;
boolean isSVP = 0; boolean isSVP = 0;
#if (!defined(ENABLE_FLASH8) && defined(ENABLE_FLASH))
unsigned long flashSize;
unsigned long blank;
#endif
//*********************************************** //***********************************************
// EEPROM SAVE TYPES // EEPROM SAVE TYPES

View File

@ -44,7 +44,7 @@ String CRC1 = "";
String CRC2 = ""; String CRC2 = "";
#endif #endif
#if !defined(ENABLE_FLASH) #if (!defined(ENABLE_FLASH8) && !(defined(ENABLE_MD) && defined(ENABLE_FLASH)))
unsigned long flashSize; unsigned long flashSize;
#endif #endif

View File

@ -141,7 +141,7 @@ enum CORES: uint8_t {
CORE_GB_GBSMART_GAME, CORE_GB_GBSMART_GAME,
# endif # endif
# endif # endif
# ifdef ENABLE_FLASH # ifdef ENABLE_FLASH8
CORE_FLASH8, CORE_FLASH8,
# ifdef ENABLE_FLASH16 # ifdef ENABLE_FLASH16
CORE_FLASH16, CORE_FLASH16,
@ -393,7 +393,7 @@ enum SYSTEM_MENU: uint8_t {
# if defined(ENABLE_VSMILE) # if defined(ENABLE_VSMILE)
SYSTEM_MENU_VSMILE, SYSTEM_MENU_VSMILE,
# endif # endif
# if defined(ENABLE_FLASH) # if defined(ENABLE_FLASH8)
SYSTEM_MENU_FLASH, SYSTEM_MENU_FLASH,
# endif # endif
# if defined(ENABLE_SELFTEST) # if defined(ENABLE_SELFTEST)

View File

@ -53,7 +53,7 @@ static const char confMenuItem3[] PROGMEM = "4MB HiROM 64K SRAM";
static const char confMenuItem4[] PROGMEM = "6MB ExROM 256K SRAM"; static const char confMenuItem4[] PROGMEM = "6MB ExROM 256K SRAM";
static const char* const menuOptionsConfManual[] PROGMEM = { confMenuItem1, confMenuItem2, confMenuItem3, confMenuItem4, FSTRING_RESET }; static const char* const menuOptionsConfManual[] PROGMEM = { confMenuItem1, confMenuItem2, confMenuItem3, confMenuItem4, FSTRING_RESET };
#if defined(ENABLE_FLASH) #if (defined(ENABLE_FLASH) && defined(ENABLE_FLASH8))
// Repro menu items // Repro menu items
static const char reproMenuItem1[] PROGMEM = "CFI LoROM"; static const char reproMenuItem1[] PROGMEM = "CFI LoROM";
static const char reproMenuItem2[] PROGMEM = "CFI HiROM"; static const char reproMenuItem2[] PROGMEM = "CFI HiROM";
@ -371,7 +371,7 @@ void snsMenu() {
break; break;
#endif #endif
#ifdef ENABLE_FLASH #if (defined(ENABLE_FLASH) && defined(ENABLE_FLASH8))
case 5: case 5:
setup_FlashVoltage(); setup_FlashVoltage();
reproMenu(); reproMenu();