modular compilation fixes

This commit is contained in:
jiyunomegami 2020-07-11 20:39:12 +09:00
parent 4eaac930ed
commit e73ee4b171
4 changed files with 12 additions and 7 deletions

View File

@ -399,6 +399,10 @@ static const uint32_t crc_32_tab[] PROGMEM = { /* CRC polynomial 0xedb88320 */
0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
}; };
// used by MD and NES modules
byte eepbit[8];
byte eeptemp;
/****************************************** /******************************************
Menu Menu
*****************************************/ *****************************************/
@ -1577,9 +1581,11 @@ void loop() {
gbmMenu(); gbmMenu();
} }
#endif #endif
#ifdef enable_MD
else if (mode == mode_MD_Cart) { else if (mode == mode_MD_Cart) {
mdCartMenu(); mdCartMenu();
} }
#endif
#ifdef enable_PCE #ifdef enable_PCE
else if (mode == mode_PCE) { else if (mode == mode_PCE) {
pceMenu(); pceMenu();

View File

@ -10,9 +10,7 @@
Variables Variables
*****************************************/ *****************************************/
unsigned long sramEnd; unsigned long sramEnd;
byte eepbit[8];
int eepSize; int eepSize;
byte eeptemp;
word addrhi; word addrhi;
word addrlo; word addrlo;
word chksum; word chksum;
@ -80,7 +78,6 @@ static const word PROGMEM eepid [] = {
}; };
byte eepcount = (sizeof(eepid) / sizeof(eepid[0])) / 2; byte eepcount = (sizeof(eepid) / sizeof(eepid[0])) / 2;
int index;
word eepdata; word eepdata;
// CD BACKUP RAM // CD BACKUP RAM
@ -542,7 +539,7 @@ void getCartInfo_MD() {
// Serial EEPROM Check // Serial EEPROM Check
for (int i = 0; i < eepcount; i++) { for (int i = 0; i < eepcount; i++) {
index = i * 2; int index = i * 2;
word eepcheck = pgm_read_word(eepid + index); word eepcheck = pgm_read_word(eepid + index);
if (eepcheck == chksum) { if (eepcheck == chksum) {
eepdata = pgm_read_word(eepid + index + 1); eepdata = pgm_read_word(eepid + index + 1);

View File

@ -938,7 +938,7 @@ setmapper:
mapfound = false; mapfound = false;
Serial.println(F("SUPPORTED MAPPERS:")); Serial.println(F("SUPPORTED MAPPERS:"));
for (int i = 0; i < mapcount; i++) { for (int i = 0; i < mapcount; i++) {
index = i * 7; int index = i * 7;
mapselect = pgm_read_byte(mapsize + index); mapselect = pgm_read_byte(mapsize + index);
Serial.print("["); Serial.print("[");
Serial.print(mapselect); Serial.print(mapselect);
@ -958,7 +958,7 @@ setmapper:
Serial.println(newmap); Serial.println(newmap);
newmapper = newmap.toInt(); newmapper = newmap.toInt();
for (int i = 0; i < mapcount; i++) { for (int i = 0; i < mapcount; i++) {
index = i * 7; int index = i * 7;
mapselect = pgm_read_byte(mapsize + index); mapselect = pgm_read_byte(mapsize + index);
if (newmapper == mapselect) if (newmapper == mapselect)
mapfound = true; mapfound = true;
@ -976,7 +976,7 @@ setmapper:
void checkMapperSize() { void checkMapperSize() {
for (int i = 0; i < mapcount; i++) { for (int i = 0; i < mapcount; i++) {
index = i * 7; int index = i * 7;
byte mapcheck = pgm_read_byte(mapsize + index); byte mapcheck = pgm_read_byte(mapsize + index);
if (mapcheck == mapper) { if (mapcheck == mapper) {
prglo = pgm_read_byte(mapsize + index + 1); prglo = pgm_read_byte(mapsize + index + 1);

View File

@ -75,12 +75,14 @@ void snsMenu() {
mode = mode_SNES; mode = mode_SNES;
break; break;
#ifdef enable_NP
case 1: case 1:
display_Clear(); display_Clear();
display_Update(); display_Update();
setup_SFM(); setup_SFM();
mode = mode_SFM; mode = mode_SFM;
break; break;
#endif
case 2: case 2:
display_Clear(); display_Clear();