diff --git a/Cart_Reader/Cart_Reader.ino b/Cart_Reader/Cart_Reader.ino index c7ab43a..65e8b2a 100644 --- a/Cart_Reader/Cart_Reader.ino +++ b/Cart_Reader/Cart_Reader.ino @@ -1249,7 +1249,7 @@ static const char* const modeOptions[] PROGMEM = { #ifdef ENABLE_VSMILE modeItem40, #endif -#ifdef ENABLE_FLASH +#ifdef ENABLE_FLASH8 modeItem41, #endif #ifdef ENABLE_SELFTEST @@ -1564,7 +1564,7 @@ void mainMenu() { break; #endif -#ifdef ENABLE_FLASH +#ifdef ENABLE_FLASH8 case SYSTEM_MENU_FLASH: #ifdef ENABLE_VSELECT setup_FlashVoltage(); @@ -3708,7 +3708,7 @@ void loop() { case CORE_GB_GBSMART_GAME: return gbSmartGameOptions(); #endif #endif -#ifdef ENABLE_FLASH +#ifdef ENABLE_FLASH8 case CORE_FLASH8: return flashromMenu8(); #ifdef ENABLE_FLASH16 case CORE_FLASH16: return flashromMenu16(); diff --git a/Cart_Reader/Config.h b/Cart_Reader/Config.h index ae5ac08..e9ab1d8 100644 --- a/Cart_Reader/Config.h +++ b/Cart_Reader/Config.h @@ -179,11 +179,18 @@ /****/ -/* [ Flashrom Programmer for repro carts -------------------------- ] +/* [ Flash Repros (all systems, SNES repro also needs FLASH8)------ ] */ -//#define ENABLE_FLASH -//#define ENABLE_FLASH16 +//#define ENABLE_FLASH + +/****/ + +/* [ 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 /****/ -/* [ Super Famicom Satellaview ------------------------------------ ] +/* [ Super Famicom Satellaview (needs ENABLE_SNES)----------------- ] */ //#define ENABLE_SV /****/ -/* [ Super Famicom Sufami Turbo ----------------------------------- ] +/* [ Super Famicom Sufami Turbo (needs ENABLE_SNES)---------------- ] */ //#define ENABLE_ST /****/ -/* [ Super Famicom Game Processor RAM Cassette -------------------- ] +/* [ Super Famicom Game Processor RAM Cassette (needs ENABLE_SNES)- ] */ //#define ENABLE_GPC diff --git a/Cart_Reader/FLASH.ino b/Cart_Reader/FLASH.ino index 8328fbb..e2d5e64 100644 --- a/Cart_Reader/FLASH.ino +++ b/Cart_Reader/FLASH.ino @@ -2,7 +2,7 @@ // FLASHROM MODULE // (also includes SNES repro functions) //****************************************** -#ifdef ENABLE_FLASH +#ifdef ENABLE_FLASH8 /****************************************** Variables @@ -2842,7 +2842,7 @@ void identifyCFI_Flash() { flashSwitchLastBits = true; } else { // Try x16 mode next - startCFIMode(true); + startCFIMode_Flash(true); sprintf(cfiQRYx16, "%02X%02X%02X", readByte_Flash(0x10), readByte_Flash(0x11), readByte_Flash(0x12)); if (strcmp(cfiQRYx16, "515259") == 0) { // QRY in x16 mode println_Msg(F("Normal CFI x16 Mode")); diff --git a/Cart_Reader/MD.ino b/Cart_Reader/MD.ino index bf959a6..3791072 100644 --- a/Cart_Reader/MD.ino +++ b/Cart_Reader/MD.ino @@ -14,6 +14,10 @@ word addrlo; word chksum; boolean is32x = 0; boolean isSVP = 0; +#if (!defined(ENABLE_FLASH8) && defined(ENABLE_FLASH)) +unsigned long flashSize; +unsigned long blank; +#endif //*********************************************** // EEPROM SAVE TYPES diff --git a/Cart_Reader/N64.ino b/Cart_Reader/N64.ino index 40ff88c..02d31ef 100644 --- a/Cart_Reader/N64.ino +++ b/Cart_Reader/N64.ino @@ -44,7 +44,7 @@ String CRC1 = ""; String CRC2 = ""; #endif -#if !defined(ENABLE_FLASH) +#if (!defined(ENABLE_FLASH8) && !(defined(ENABLE_MD) && defined(ENABLE_FLASH))) unsigned long flashSize; #endif diff --git a/Cart_Reader/OSCR.h b/Cart_Reader/OSCR.h index f32d8bd..bbd2eba 100644 --- a/Cart_Reader/OSCR.h +++ b/Cart_Reader/OSCR.h @@ -141,7 +141,7 @@ enum CORES: uint8_t { CORE_GB_GBSMART_GAME, # endif # endif -# ifdef ENABLE_FLASH +# ifdef ENABLE_FLASH8 CORE_FLASH8, # ifdef ENABLE_FLASH16 CORE_FLASH16, @@ -393,7 +393,7 @@ enum SYSTEM_MENU: uint8_t { # if defined(ENABLE_VSMILE) SYSTEM_MENU_VSMILE, # endif -# if defined(ENABLE_FLASH) +# if defined(ENABLE_FLASH8) SYSTEM_MENU_FLASH, # endif # if defined(ENABLE_SELFTEST) diff --git a/Cart_Reader/SNES.ino b/Cart_Reader/SNES.ino index 2147217..9122469 100644 --- a/Cart_Reader/SNES.ino +++ b/Cart_Reader/SNES.ino @@ -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* const menuOptionsConfManual[] PROGMEM = { confMenuItem1, confMenuItem2, confMenuItem3, confMenuItem4, FSTRING_RESET }; -#if defined(ENABLE_FLASH) +#if (defined(ENABLE_FLASH) && defined(ENABLE_FLASH8)) // Repro menu items static const char reproMenuItem1[] PROGMEM = "CFI LoROM"; static const char reproMenuItem2[] PROGMEM = "CFI HiROM"; @@ -371,7 +371,7 @@ void snsMenu() { break; #endif -#ifdef ENABLE_FLASH +#if (defined(ENABLE_FLASH) && defined(ENABLE_FLASH8)) case 5: setup_FlashVoltage(); reproMenu();