mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-14 08:55:06 +01:00
Merge pull request #51 from jiyunomegami/master
modular compilation fixes
This commit is contained in:
commit
acd2d3397a
@ -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();
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user