mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-10 23:15:08 +01:00
add #ifdef enable_XXX check to each module
This commit is contained in:
parent
cb938a65bc
commit
29093b1bf3
@ -2,6 +2,9 @@
|
|||||||
// FLASHROM MODULE
|
// FLASHROM MODULE
|
||||||
//******************************************
|
//******************************************
|
||||||
|
|
||||||
|
#include "options.h"
|
||||||
|
#ifdef enable_FLASH
|
||||||
|
|
||||||
/******************************************
|
/******************************************
|
||||||
Variables
|
Variables
|
||||||
*****************************************/
|
*****************************************/
|
||||||
@ -2370,6 +2373,8 @@ void print_Eprom(int numBytes) {
|
|||||||
display_Update();
|
display_Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
//******************************************
|
//******************************************
|
||||||
// End of File
|
// End of File
|
||||||
//******************************************
|
//******************************************
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
// GAME BOY MODULE
|
// GAME BOY MODULE
|
||||||
//******************************************
|
//******************************************
|
||||||
|
|
||||||
|
#include "options.h"
|
||||||
|
#ifdef enable_GBX
|
||||||
|
|
||||||
/******************************************
|
/******************************************
|
||||||
Variables
|
Variables
|
||||||
*****************************************/
|
*****************************************/
|
||||||
@ -1062,6 +1065,8 @@ void writeFlash_GB(byte MBC) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
//******************************************
|
//******************************************
|
||||||
// End of File
|
// End of File
|
||||||
//******************************************
|
//******************************************
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
// GAME BOY ADVANCE MODULE
|
// GAME BOY ADVANCE MODULE
|
||||||
//******************************************
|
//******************************************
|
||||||
|
|
||||||
|
#include "options.h"
|
||||||
|
#ifdef enable_GBX
|
||||||
|
|
||||||
/******************************************
|
/******************************************
|
||||||
Variables
|
Variables
|
||||||
*****************************************/
|
*****************************************/
|
||||||
@ -2636,6 +2639,8 @@ void flashRepro_GBA() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
//******************************************
|
//******************************************
|
||||||
// End of File
|
// End of File
|
||||||
//******************************************
|
//******************************************
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
// GB SMART MODULE
|
// GB SMART MODULE
|
||||||
// Supports 32M cart with LH28F016SUT flash
|
// Supports 32M cart with LH28F016SUT flash
|
||||||
//******************************************
|
//******************************************
|
||||||
|
|
||||||
|
#include "options.h"
|
||||||
|
#ifdef enable_GBX
|
||||||
|
|
||||||
#define GB_SMART_GAMES_PER_PAGE 6
|
#define GB_SMART_GAMES_PER_PAGE 6
|
||||||
|
|
||||||
/******************************************
|
/******************************************
|
||||||
@ -771,3 +775,5 @@ uint8_t gbSmartGetResizeParam(uint8_t rom_size, uint8_t sram_size)
|
|||||||
|
|
||||||
return (sram_size | rom_size);
|
return (sram_size | rom_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -4,6 +4,7 @@
|
|||||||
// Writes to Sega CD Backup RAM Cart require an extra wire from MRES (B02) to VRES (B27)
|
// Writes to Sega CD Backup RAM Cart require an extra wire from MRES (B02) to VRES (B27)
|
||||||
|
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
|
#ifdef enable_MD
|
||||||
|
|
||||||
/******************************************
|
/******************************************
|
||||||
Variables
|
Variables
|
||||||
@ -2041,6 +2042,8 @@ void readRealtec_MD() {
|
|||||||
myFile.close();
|
myFile.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
//******************************************
|
//******************************************
|
||||||
// End of File
|
// End of File
|
||||||
//******************************************
|
//******************************************
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
// NINTENDO 64 MODULE
|
// NINTENDO 64 MODULE
|
||||||
//******************************************
|
//******************************************
|
||||||
|
|
||||||
|
#include "options.h"
|
||||||
|
#ifdef enable_N64
|
||||||
|
|
||||||
/******************************************
|
/******************************************
|
||||||
Defines
|
Defines
|
||||||
*****************************************/
|
*****************************************/
|
||||||
@ -3799,6 +3802,8 @@ unsigned long verifyGameshark_N64() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
//******************************************
|
//******************************************
|
||||||
// End of File
|
// End of File
|
||||||
//******************************************
|
//******************************************
|
||||||
|
@ -5,6 +5,9 @@
|
|||||||
// also based on "CoolArduino" by HardWareMan
|
// also based on "CoolArduino" by HardWareMan
|
||||||
// Pinout changes: LED and CIRAM_A10
|
// Pinout changes: LED and CIRAM_A10
|
||||||
|
|
||||||
|
#include "options.h"
|
||||||
|
#ifdef enable_NES
|
||||||
|
|
||||||
//Line Content
|
//Line Content
|
||||||
//26 Supported Mappers
|
//26 Supported Mappers
|
||||||
//101 Defines
|
//101 Defines
|
||||||
@ -3280,6 +3283,8 @@ void writeFLASH() {
|
|||||||
filePath[0] = '\0'; // Reset filePath
|
filePath[0] = '\0'; // Reset filePath
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
//******************************************
|
//******************************************
|
||||||
// End of File
|
// End of File
|
||||||
//******************************************
|
//******************************************
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
// NGP MODULE
|
// NGP MODULE
|
||||||
//******************************************
|
//******************************************
|
||||||
|
|
||||||
|
#include "options.h"
|
||||||
|
#ifdef enable_NGP
|
||||||
|
|
||||||
static const char ngpMenuItem1[] PROGMEM = "Read Rom";
|
static const char ngpMenuItem1[] PROGMEM = "Read Rom";
|
||||||
static const char ngpMenuItemReset[] PROGMEM = "Reset";
|
static const char ngpMenuItemReset[] PROGMEM = "Reset";
|
||||||
static const char* const menuOptionsNGP[] PROGMEM = {ngpMenuItem1, ngpMenuItemReset};
|
static const char* const menuOptionsNGP[] PROGMEM = {ngpMenuItem1, ngpMenuItemReset};
|
||||||
@ -236,3 +239,5 @@ uint8_t readByte_NGP(uint32_t addr) {
|
|||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -4,6 +4,7 @@
|
|||||||
// (GB Memory starts at around line 1740)
|
// (GB Memory starts at around line 1740)
|
||||||
|
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
|
#ifdef enable_NP
|
||||||
|
|
||||||
/******************************************
|
/******************************************
|
||||||
SF Memory Cassette
|
SF Memory Cassette
|
||||||
@ -2619,6 +2620,8 @@ void writeMapping_GBM() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
//******************************************
|
//******************************************
|
||||||
// End of File
|
// End of File
|
||||||
//******************************************
|
//******************************************
|
||||||
|
@ -11,6 +11,9 @@
|
|||||||
//
|
//
|
||||||
//******************************************
|
//******************************************
|
||||||
|
|
||||||
|
#include "options.h"
|
||||||
|
#ifdef enable_PCE
|
||||||
|
|
||||||
/******************************************
|
/******************************************
|
||||||
Defines
|
Defines
|
||||||
*****************************************/
|
*****************************************/
|
||||||
@ -844,6 +847,7 @@ void pceMenu() {
|
|||||||
wait();
|
wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
//******************************************
|
//******************************************
|
||||||
// End of File
|
// End of File
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
// SEGA MASTER SYSTEM MODULE
|
// SEGA MASTER SYSTEM MODULE
|
||||||
//******************************************
|
//******************************************
|
||||||
|
|
||||||
|
#include "options.h"
|
||||||
|
#ifdef enable_MD
|
||||||
|
|
||||||
/******************************************
|
/******************************************
|
||||||
Variables
|
Variables
|
||||||
*****************************************/
|
*****************************************/
|
||||||
@ -424,6 +427,8 @@ void readSRAM_SMS() {
|
|||||||
myFile.close();
|
myFile.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
//******************************************
|
//******************************************
|
||||||
// End of File
|
// End of File
|
||||||
//******************************************
|
//******************************************
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
//******************************************
|
//******************************************
|
||||||
|
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
|
#ifdef enable_SNES
|
||||||
|
|
||||||
/******************************************
|
/******************************************
|
||||||
Defines
|
Defines
|
||||||
@ -2100,6 +2101,8 @@ boolean eraseSRAM (byte b) {
|
|||||||
display_Update();
|
display_Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
//******************************************
|
//******************************************
|
||||||
// End of File
|
// End of File
|
||||||
//******************************************
|
//******************************************
|
||||||
|
@ -4,6 +4,9 @@
|
|||||||
// Added BSX Sram, copied from skamans enhanced sketch //sanni
|
// Added BSX Sram, copied from skamans enhanced sketch //sanni
|
||||||
//******************************************
|
//******************************************
|
||||||
|
|
||||||
|
#include "options.h"
|
||||||
|
#ifdef enable_SV
|
||||||
|
|
||||||
/******************************************
|
/******************************************
|
||||||
Satellaview 8M Memory Pack
|
Satellaview 8M Memory Pack
|
||||||
******************************************/
|
******************************************/
|
||||||
@ -665,6 +668,8 @@ void eraseAll_SV(void)
|
|||||||
writeBank_SV(0xC0, 0x0000, 0xFF); //Teriminate
|
writeBank_SV(0xC0, 0x0000, 0xFF); //Teriminate
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
//******************************************
|
//******************************************
|
||||||
// End of File
|
// End of File
|
||||||
//******************************************
|
//******************************************
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
// C46 : INT (for RTC alarm interrupt)
|
// C46 : INT (for RTC alarm interrupt)
|
||||||
// C47 : CLK (384KHz on WS)
|
// C47 : CLK (384KHz on WS)
|
||||||
|
|
||||||
|
#include "options.h"
|
||||||
|
#ifdef enable_WS
|
||||||
|
|
||||||
/******************************************
|
/******************************************
|
||||||
Menu
|
Menu
|
||||||
*****************************************/
|
*****************************************/
|
||||||
@ -1261,3 +1264,5 @@ void dataOut_WS()
|
|||||||
DDRC = 0xff;
|
DDRC = 0xff;
|
||||||
DDRA = 0xff;
|
DDRA = 0xff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user