mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-15 01:15:06 +01:00
define more commonly used string in OSCR and reuse them
This commit is contained in:
parent
0d9596eb70
commit
d039c590cc
@ -598,7 +598,7 @@ void checkStatus_2600() {
|
||||
println_Msg(FS(FSTRING_EMPTY));
|
||||
print_Msg(F("MAPPER: "));
|
||||
println_Mapper2600(a2600mapper);
|
||||
print_Msg(F("ROM SIZE: "));
|
||||
print_Msg(FS(FSTRING_ROM_SIZE));
|
||||
if (a2600mapper == 0xD0)
|
||||
print_Msg(F("10"));
|
||||
else
|
||||
@ -610,7 +610,7 @@ void checkStatus_2600() {
|
||||
Serial.print(F("MAPPER: "));
|
||||
println_Mapper2600(a2600mapper);
|
||||
|
||||
Serial.print(F("ROM SIZE: "));
|
||||
Serial.print(FS(FSTRING_ROM_SIZE));
|
||||
if (a2600mapper == 0xD0)
|
||||
Serial.print(F("10"));
|
||||
else
|
||||
@ -627,7 +627,7 @@ void checkStatus_2600() {
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
void printMapperSelection_2600(int index) {
|
||||
display_Clear();
|
||||
print_Msg(F("Mapper: "));
|
||||
print_Msg(FS(FSTRING_MAPPER));
|
||||
a2600index = index * 2;
|
||||
a2600mapselect = pgm_read_byte(a2600mapsize + a2600index);
|
||||
println_Mapper2600(a2600mapselect);
|
||||
|
@ -365,7 +365,7 @@ void setROMSize_5200() {
|
||||
|
||||
display.setCursor(0, 56); // Display selection at bottom
|
||||
}
|
||||
print_Msg(F("ROM SIZE "));
|
||||
print_Msg(FS(FSTRING_ROM_SIZE));
|
||||
print_Msg(a5200[new5200size]);
|
||||
println_Msg(F("K"));
|
||||
display_Update();
|
||||
@ -422,7 +422,7 @@ void checkStatus_5200() {
|
||||
print_Msg(F("MAPPER: "));
|
||||
println_Msg(a5200mapper);
|
||||
println_Mapper5200(a5200mapper);
|
||||
print_Msg(F("ROM SIZE: "));
|
||||
print_Msg(FS(FSTRING_ROM_SIZE));
|
||||
print_Msg(a5200[a5200size]);
|
||||
println_Msg(F("K"));
|
||||
display_Update();
|
||||
@ -431,7 +431,7 @@ void checkStatus_5200() {
|
||||
Serial.print(F("MAPPER: "));
|
||||
Serial.println(a5200mapper);
|
||||
println_Mapper5200(a5200mapper);
|
||||
Serial.print(F("ROM SIZE: "));
|
||||
Serial.print(FS(FSTRING_ROM_SIZE));
|
||||
Serial.print(a5200[a5200size]);
|
||||
Serial.println(F("K"));
|
||||
Serial.println(FS(FSTRING_EMPTY));
|
||||
@ -445,7 +445,7 @@ void checkStatus_5200() {
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
void printMapperSelection_5200(int index) {
|
||||
display_Clear();
|
||||
print_Msg(F("Mapper: "));
|
||||
print_Msg(FS(FSTRING_MAPPER));
|
||||
a5200index = index * 3;
|
||||
a5200mapselect = pgm_read_byte(a5200mapsize + a5200index);
|
||||
println_Msg(a5200mapselect);
|
||||
|
@ -495,7 +495,7 @@ void setROMSize_7800() {
|
||||
new7800size = navigateMenu(a7800lo, a7800hi, &printRomSize_7800);
|
||||
display.setCursor(0, 56); // Display selection at bottom
|
||||
}
|
||||
print_Msg(F("ROM SIZE "));
|
||||
print_Msg(FS(FSTRING_ROM_SIZE));
|
||||
print_Msg(a7800[new7800size]);
|
||||
println_Msg(F("K"));
|
||||
display_Update();
|
||||
@ -552,7 +552,7 @@ void checkStatus_7800() {
|
||||
print_Msg(F("MAPPER: "));
|
||||
println_Msg(a7800mapper);
|
||||
println_Mapper7800(a7800mapper);
|
||||
print_Msg(F("ROM SIZE: "));
|
||||
print_Msg(FS(FSTRING_ROM_SIZE));
|
||||
print_Msg(a7800[a7800size]);
|
||||
println_Msg(F("K"));
|
||||
display_Update();
|
||||
@ -576,7 +576,7 @@ void checkStatus_7800() {
|
||||
Serial.println(F("Karateka (PAL) [78S4 Variant]"));
|
||||
else if (a7800mapper == 7)
|
||||
Serial.println(F("Bankset"));
|
||||
Serial.print(F("ROM SIZE: "));
|
||||
Serial.print(FS(FSTRING_ROM_SIZE));
|
||||
Serial.print(A7800[a7800size]);
|
||||
Serial.println(F("K"));
|
||||
Serial.println(FS(FSTRING_EMPTY));
|
||||
@ -590,7 +590,7 @@ void checkStatus_7800() {
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
void printMapperSelection_7800(int index) {
|
||||
display_Clear();
|
||||
print_Msg(F("Mapper: "));
|
||||
print_Msg(FS(FSTRING_MAPPER));
|
||||
a7800index = index * 3;
|
||||
a7800mapselect = pgm_read_byte(a7800mapsize + a7800index);
|
||||
println_Msg(a7800mapselect);
|
||||
|
@ -195,7 +195,7 @@ void setROMSize_ARC() {
|
||||
|
||||
display.setCursor(0, 56); // Display selection at bottom
|
||||
}
|
||||
print_Msg(F("ROM SIZE "));
|
||||
print_Msg(FS(FSTRING_ROM_SIZE));
|
||||
print_Msg(ARC[newarcsize]);
|
||||
println_Msg(F("K"));
|
||||
display_Update();
|
||||
@ -244,7 +244,7 @@ void checkStatus_ARC() {
|
||||
println_Msg(F("ARCADIA 2001 READER"));
|
||||
println_Msg(FS(FSTRING_CURRENT_SETTINGS));
|
||||
println_Msg(FS(FSTRING_EMPTY));
|
||||
print_Msg(F("ROM SIZE: "));
|
||||
print_Msg(FS(FSTRING_ROM_SIZE));
|
||||
print_Msg(ARC[arcsize]);
|
||||
println_Msg(F("K"));
|
||||
display_Update();
|
||||
|
@ -562,7 +562,7 @@ void readROM_C64() {
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
void printMapperSelection_C64(int index) {
|
||||
display_Clear();
|
||||
print_Msg(F("Mapper: "));
|
||||
print_Msg(FS(FSTRING_MAPPER));
|
||||
c64index = index * 3;
|
||||
c64mapselect = pgm_read_byte(c64mapsize + c64index);
|
||||
println_Msg(c64mapselect);
|
||||
@ -645,7 +645,7 @@ void setROMSize_C64() {
|
||||
|
||||
display.setCursor(0, 56); // Display selection at bottom
|
||||
}
|
||||
print_Msg(F("ROM SIZE "));
|
||||
print_Msg(FS(FSTRING_ROM_SIZE));
|
||||
print_Msg(C64[newc64size]);
|
||||
println_Msg(F("K"));
|
||||
display_Update();
|
||||
|
@ -222,7 +222,7 @@ void setROMSize_COL() {
|
||||
display.setCursor(0, 56); // Display selection at bottom
|
||||
}
|
||||
|
||||
print_Msg(F("ROM SIZE "));
|
||||
print_Msg(FS(FSTRING_ROM_SIZE));
|
||||
print_Msg(pgm_read_byte(&(COL[newcolsize])));
|
||||
println_Msg(F("K"));
|
||||
display_Update();
|
||||
@ -271,7 +271,7 @@ void checkStatus_COL() {
|
||||
println_Msg(F("COLECOVISION READER"));
|
||||
println_Msg(FS(FSTRING_CURRENT_SETTINGS));
|
||||
println_Msg(FS(FSTRING_EMPTY));
|
||||
print_Msg(F("ROM SIZE: "));
|
||||
print_Msg(FS(FSTRING_ROM_SIZE));
|
||||
print_Msg(pgm_read_byte(&(COL[colsize])));
|
||||
println_Msg(F("K"));
|
||||
println_Msg(FS(FSTRING_EMPTY));
|
||||
@ -325,7 +325,7 @@ void readDataLine_COL(FsFile& database, void* entry) {
|
||||
void printDataLine_COL(void* entry) {
|
||||
struct database_entry_COL* castEntry = (database_entry_COL*)entry;
|
||||
|
||||
print_Msg(F("Size: "));
|
||||
print_Msg(FS(FSTRING_SIZE));
|
||||
print_Msg(castEntry->gameSize);
|
||||
println_Msg(F("KB"));
|
||||
}
|
||||
|
@ -527,7 +527,7 @@ void setROMSize_FAIRCHILD() {
|
||||
|
||||
display.setCursor(0, 56); // Display selection at bottom
|
||||
}
|
||||
print_Msg(F("ROM SIZE "));
|
||||
print_Msg(FS(FSTRING_ROM_SIZE));
|
||||
print_Msg(FAIRCHILD[newfairchildsize]);
|
||||
println_Msg(F("K"));
|
||||
display_Update();
|
||||
@ -576,7 +576,7 @@ void checkStatus_FAIRCHILD() {
|
||||
println_Msg(F("CHANNEL F READER"));
|
||||
println_Msg(FS(FSTRING_CURRENT_SETTINGS));
|
||||
println_Msg(FS(FSTRING_EMPTY));
|
||||
print_Msg(F("ROM SIZE: "));
|
||||
print_Msg(FS(FSTRING_ROM_SIZE));
|
||||
print_Msg(FAIRCHILD[fairchildsize]);
|
||||
println_Msg(F("K"));
|
||||
display_Update();
|
||||
|
@ -605,7 +605,7 @@ void showCartInfo_GB() {
|
||||
print_Msg(F("Revision: "));
|
||||
println_Msg(romVersion);
|
||||
|
||||
print_Msg(F("Mapper: "));
|
||||
print_Msg(FS(FSTRING_MAPPER));
|
||||
if ((romType == 0) || (romType == 8) || (romType == 9))
|
||||
print_Msg(F("none"));
|
||||
else if ((romType == 1) || (romType == 2) || (romType == 3))
|
||||
|
@ -464,7 +464,7 @@ void ecsBank(uint32_t addr, uint8_t bank) {
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
void printMapperSelection_INTV(int index) {
|
||||
display_Clear();
|
||||
print_Msg(F("Mapper: "));
|
||||
print_Msg(FS(FSTRING_MAPPER));
|
||||
intvindex = index * 4;
|
||||
intvmapselect = pgm_read_byte(intvmapsize + intvindex);
|
||||
println_Msg(intvmapselect);
|
||||
@ -540,7 +540,7 @@ void setROMSize_INTV() {
|
||||
|
||||
display.setCursor(0, 56); // Display selection at bottom
|
||||
}
|
||||
print_Msg(F("ROM SIZE "));
|
||||
print_Msg(FS(FSTRING_ROM_SIZE));
|
||||
print_Msg(pgm_read_byte(&(INTV[newintvsize])));
|
||||
println_Msg(F("K"));
|
||||
display_Update();
|
||||
@ -596,7 +596,7 @@ void checkStatus_INTV() {
|
||||
println_Msg(FS(FSTRING_EMPTY));
|
||||
print_Msg(F("MAPPER: "));
|
||||
println_Msg(intvmapper);
|
||||
print_Msg(F("ROM SIZE: "));
|
||||
print_Msg(FS(FSTRING_ROM_SIZE));
|
||||
print_Msg(pgm_read_byte(&(INTV[intvsize])));
|
||||
println_Msg(F("K"));
|
||||
display_Update();
|
||||
@ -660,10 +660,10 @@ void readDataLine_INTV(FsFile& database, void* entry) {
|
||||
|
||||
void printDataLine_INTV(void* entry) {
|
||||
struct database_entry_INTV* castEntry = (database_entry_INTV*)entry;
|
||||
print_Msg(F("Size: "));
|
||||
print_Msg(FS(FSTRING_SIZE));
|
||||
print_Msg(castEntry->gameSize);
|
||||
println_Msg(F("KB"));
|
||||
print_Msg(F("Mapper: "));
|
||||
print_Msg(FS(FSTRING_MAPPER));
|
||||
println_Msg(castEntry->gameMapper);
|
||||
}
|
||||
|
||||
|
@ -498,7 +498,7 @@ void getCartInfo_LOOPY() {
|
||||
println_Msg(loopyRomNameLong);
|
||||
print_Msg(F("Checksum: "));
|
||||
println_Msg(checksumStr);
|
||||
print_Msg(F("Size: "));
|
||||
print_Msg(FS(FSTRING_SIZE));
|
||||
print_Msg(cartSize * 8 / 1024 / 1024);
|
||||
println_Msg(F(" MBit"));
|
||||
print_Msg(F("Sram: "));
|
||||
|
@ -1306,7 +1306,7 @@ void getCartInfo_MD() {
|
||||
print_Msg(F("bramSize(KB): "));
|
||||
println_Msg(bramSize >> 10);
|
||||
}
|
||||
print_Msg(F("Size: "));
|
||||
print_Msg(FS(FSTRING_SIZE));
|
||||
print_Msg(cartSize * 8 / 1024 / 1024);
|
||||
switch (SnKmode) {
|
||||
case 2:
|
||||
|
@ -821,7 +821,7 @@ void writeRAM_MSX() {
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
void printMapperSelection_MSX(int index) {
|
||||
display_Clear();
|
||||
print_Msg(F("Mapper: "));
|
||||
print_Msg(FS(FSTRING_MAPPER));
|
||||
msxindex = index * 5;
|
||||
msxmapselect = pgm_read_byte(msxmapsize + msxindex);
|
||||
println_Msg(msxmapselect);
|
||||
@ -950,7 +950,7 @@ void setROMSize_MSX() {
|
||||
}
|
||||
display.setCursor(0, 56); // Display selection at bottom
|
||||
}
|
||||
print_Msg(F("ROM SIZE "));
|
||||
print_Msg(FS(FSTRING_ROM_SIZE));
|
||||
if (msxmapper == 12) // R-Type
|
||||
print_Msg(F("384"));
|
||||
else
|
||||
@ -1143,7 +1143,7 @@ void checkStatus_MSX() {
|
||||
print_Msg(F("MAPPER: "));
|
||||
println_Msg(msxmapper);
|
||||
printMapper(msxmapper);
|
||||
print_Msg(F("ROM SIZE: "));
|
||||
print_Msg(FS(FSTRING_ROM_SIZE));
|
||||
if (msxmapper == 12) // R-Type
|
||||
print_Msg(F("384"));
|
||||
else
|
||||
|
@ -996,7 +996,7 @@ void CreateRAMFileInSD() {
|
||||
void printMapperSelection_NES(int index) {
|
||||
display_Clear();
|
||||
mapselect = pgm_read_word(mapsize + index);
|
||||
print_Msg(F("Mapper: "));
|
||||
print_Msg(FS(FSTRING_MAPPER));
|
||||
println_Msg(mapselect);
|
||||
}
|
||||
#endif
|
||||
|
@ -273,7 +273,7 @@ void setROMSize_ODY2() {
|
||||
|
||||
display.setCursor(0, 56); // Display selection at bottom
|
||||
}
|
||||
print_Msg(F("ROM SIZE "));
|
||||
print_Msg(FS(FSTRING_ROM_SIZE));
|
||||
print_Msg(ODY2[newody2size]);
|
||||
println_Msg(F("K"));
|
||||
display_Update();
|
||||
@ -329,7 +329,7 @@ void checkStatus_ODY2() {
|
||||
println_Msg(FS(FSTRING_EMPTY));
|
||||
print_Msg(F("MAPPER: "));
|
||||
println_Msg(ody2mapper);
|
||||
print_Msg(F("ROM SIZE: "));
|
||||
print_Msg(FS(FSTRING_ROM_SIZE));
|
||||
print_Msg(ODY2[ody2size]);
|
||||
println_Msg(F("K"));
|
||||
display_Update();
|
||||
|
@ -72,6 +72,9 @@ constexpr char PROGMEM FSTRING_SELECT_CART[] = "Select Cart";
|
||||
constexpr char PROGMEM FSTRING_SELECT_CART_TYPE[] = "Select Cart Type";
|
||||
constexpr char PROGMEM FSTRING_SET_SIZE[] = "Set Size";
|
||||
constexpr char PROGMEM FSTRING_REFRESH_CART[] = "Refresh Cart";
|
||||
constexpr char PROGMEM FSTRING_MAPPER[] = "Mapper: ";
|
||||
constexpr char PROGMEM FSTRING_SIZE[] = "Size: ";
|
||||
constexpr char PROGMEM FSTRING_ROM_SIZE[] ="ROM SIZE: ";
|
||||
|
||||
/*==== /CONSTANTS =================================================*/
|
||||
|
||||
|
@ -52,6 +52,9 @@ extern const char PROGMEM FSTRING_SELECT_CART[];
|
||||
extern const char PROGMEM FSTRING_SELECT_CART_TYPE[];
|
||||
extern const char PROGMEM FSTRING_SET_SIZE[];
|
||||
extern const char PROGMEM FSTRING_REFRESH_CART[];
|
||||
extern const char PROGMEM FSTRING_MAPPER[];
|
||||
extern const char PROGMEM FSTRING_SIZE[];
|
||||
extern const char PROGMEM FSTRING_ROM_SIZE[];
|
||||
|
||||
#define FS(pmem_string) (reinterpret_cast<const __FlashStringHelper *>(pmem_string))
|
||||
|
||||
|
@ -745,7 +745,7 @@ void getCartInfo_SFM() {
|
||||
print_Msg(F("Checksum: "));
|
||||
println_Msg(checksumStr);
|
||||
|
||||
print_Msg(F("Size: "));
|
||||
print_Msg(FS(FSTRING_SIZE));
|
||||
print_Msg(romSize);
|
||||
println_Msg(F("Mbit "));
|
||||
|
||||
|
@ -527,7 +527,7 @@ void getCartInfo_SMS() {
|
||||
println_Msg(FS(FSTRING_SPACE));
|
||||
print_Msg(F("Name: "));
|
||||
println_Msg(romName);
|
||||
print_Msg(F("Size: "));
|
||||
print_Msg(FS(FSTRING_SIZE));
|
||||
print_Msg(cartSize / 1024);
|
||||
println_Msg(F("KB"));
|
||||
println_Msg(FS(FSTRING_SPACE));
|
||||
|
@ -933,7 +933,7 @@ void checkAltConf(char crcStr[9]) {
|
||||
if (((romSize != romSize2) || (numBanks != numBanks2)) && ((romSize2 == 10) || (romSize2 == 12) || (romSize2 == 20) || (romSize2 == 24) || (romSize2 == 40) || (romSize2 == 48))) {
|
||||
// Correct size
|
||||
println_Msg(F("Correcting size"));
|
||||
print_Msg(F("Size: "));
|
||||
print_Msg(FS(FSTRING_SIZE));
|
||||
print_Msg(romSize);
|
||||
print_Msg(F(" -> "));
|
||||
print_Msg(romSize2);
|
||||
|
@ -383,7 +383,7 @@ void getCartInfo_VB() {
|
||||
println_Msg(FS(FSTRING_SPACE));
|
||||
print_Msg(F("Name: "));
|
||||
println_Msg(romName);
|
||||
print_Msg(F("Size: "));
|
||||
print_Msg(FS(FSTRING_SIZE));
|
||||
print_Msg(cartSize * 8 / 1024 / 1024);
|
||||
println_Msg(F(" MBit"));
|
||||
print_Msg(F("Sram: "));
|
||||
|
@ -254,7 +254,7 @@ void setROMSize_VECTREX() {
|
||||
|
||||
display.setCursor(0, 56); // Display selection at bottom
|
||||
}
|
||||
print_Msg(F("ROM SIZE "));
|
||||
print_Msg(FS(FSTRING_ROM_SIZE));
|
||||
print_Msg(VECTREX[newvectrexsize]);
|
||||
println_Msg(F("KB"));
|
||||
display_Update();
|
||||
@ -303,13 +303,13 @@ void checkStatus_VECTREX() {
|
||||
println_Msg(F("VECTREX READER"));
|
||||
println_Msg(FS(FSTRING_CURRENT_SETTINGS));
|
||||
println_Msg(FS(FSTRING_EMPTY));
|
||||
print_Msg(F("ROM SIZE: "));
|
||||
print_Msg(FS(FSTRING_ROM_SIZE));
|
||||
print_Msg(VECTREX[vectrexsize]);
|
||||
println_Msg(F("KB"));
|
||||
display_Update();
|
||||
wait();
|
||||
#else
|
||||
Serial.print(F("ROM SIZE: "));
|
||||
Serial.print(FS(FSTRING_ROM_SIZE));
|
||||
Serial.print(VECTREX[vectrexsize]);
|
||||
Serial.println(F("KB"));
|
||||
Serial.println(FS(FSTRING_EMPTY));
|
||||
|
@ -238,7 +238,7 @@ void setROMSize_WSV() {
|
||||
|
||||
display.setCursor(0, 56); // Display selection at bottom
|
||||
}
|
||||
print_Msg(F("ROM SIZE "));
|
||||
print_Msg(FS(FSTRING_ROM_SIZE));
|
||||
print_Msg(pgm_read_word(&(WSV[newwsvsize])));
|
||||
println_Msg(F("K"));
|
||||
display_Update();
|
||||
@ -287,7 +287,7 @@ void checkStatus_WSV() {
|
||||
println_Msg(F("WATARA SUPERVISION"));
|
||||
println_Msg(FS(FSTRING_CURRENT_SETTINGS));
|
||||
println_Msg(FS(FSTRING_EMPTY));
|
||||
print_Msg(F("ROM SIZE: "));
|
||||
print_Msg(FS(FSTRING_ROM_SIZE));
|
||||
print_Msg(pgm_read_word(&(WSV[wsvsize])));
|
||||
println_Msg(F("K"));
|
||||
display_Update();
|
||||
@ -336,7 +336,7 @@ void readDataLine_WSV(FsFile& database, void* entry) {
|
||||
|
||||
void printDataLine_WSV(void* entry) {
|
||||
struct database_entry_WSV* castEntry = (database_entry_WSV*)entry;
|
||||
print_Msg(F("Size: "));
|
||||
print_Msg(FS(FSTRING_SIZE));
|
||||
if (castEntry->gameSize == 51)
|
||||
print_Msg(F("512"));
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user