diff options
author | smesgr9000 <smesgr9000> | 2024-06-29 11:48:32 +0200 |
---|---|---|
committer | smesgr9000 <smesgr9000> | 2024-06-29 11:48:32 +0200 |
commit | 4e7ef93cc65d8da81c160894d86635552b798a9d (patch) | |
tree | fa67ce48aeac5fe575513122d1467a5788ce76c5 | |
parent | 9e13964889d244dd9a9ba0a048af432db257e5d8 (diff) | |
download | cartreader-4e7ef93cc65d8da81c160894d86635552b798a9d.tar.gz cartreader-4e7ef93cc65d8da81c160894d86635552b798a9d.zip |
declare "Revision: " and "Serial: " as common string and reuse string
-rw-r--r-- | Cart_Reader/GB.ino | 4 | ||||
-rw-r--r-- | Cart_Reader/GBA.ino | 6 | ||||
-rw-r--r-- | Cart_Reader/N64.ino | 6 | ||||
-rw-r--r-- | Cart_Reader/OSCR.cpp | 4 | ||||
-rw-r--r-- | Cart_Reader/OSCR.h | 2 | ||||
-rw-r--r-- | Cart_Reader/SNES.ino | 2 |
6 files changed, 14 insertions, 10 deletions
diff --git a/Cart_Reader/GB.ino b/Cart_Reader/GB.ino index c459a0e..b9529e5 100644 --- a/Cart_Reader/GB.ino +++ b/Cart_Reader/GB.ino @@ -558,10 +558,10 @@ void showCartInfo_GB() { print_Msg(FS(FSTRING_NAME)); println_Msg(romName); if (cartID[0] != 0) { - print_Msg(F("Serial: ")); + print_Msg(FS(FSTRING_SERIAL)); println_Msg(cartID); } - print_Msg(F("Revision: ")); + print_Msg(FS(FSTRING_REVISION)); println_Msg(romVersion); print_Msg(FS(FSTRING_MAPPER)); diff --git a/Cart_Reader/GBA.ino b/Cart_Reader/GBA.ino index 37538ff..26e9f22 100644 --- a/Cart_Reader/GBA.ino +++ b/Cart_Reader/GBA.ino @@ -254,9 +254,9 @@ void setup_GBA() { // Print start page
print_Msg(FS(FSTRING_NAME));
println_Msg(romName);
- print_Msg(F("Serial: "));
+ print_Msg(FS(FSTRING_SERIAL));
println_Msg(cartID);
- print_Msg(F("Revision: "));
+ print_Msg(FS(FSTRING_REVISION));
println_Msg(romVersion);
print_Msg(FS(FSTRING_ROM_SIZE));
if (cartSize == 0)
@@ -681,7 +681,7 @@ void getCartInfo_GBA() { // Print current database entry
println_Msg(gamename);
- print_Msg(F("Serial: "));
+ print_Msg(FS(FSTRING_SERIAL));
println_Msg(tempStr);
print_Msg(FS(FSTRING_ROM_SIZE));
print_Msg(cartSize);
diff --git a/Cart_Reader/N64.ino b/Cart_Reader/N64.ino index 46a5a2a..bd0be51 100644 --- a/Cart_Reader/N64.ino +++ b/Cart_Reader/N64.ino @@ -1925,9 +1925,9 @@ void printCartInfo_N64() { display_Clear();
print_Msg(FS(FSTRING_NAME));
println_Msg(romName);
- print_Msg(F("Serial: "));
+ print_Msg(FS(FSTRING_SERIAL));
println_Msg(cartID);
- print_Msg(F("Revision: "));
+ print_Msg(FS(FSTRING_REVISION));
println_Msg(romVersion);
print_Msg(FS(FSTRING_ROM_SIZE));
print_Msg(cartSize);
@@ -1969,7 +1969,7 @@ void printCartInfo_N64() { println_Msg("");
print_Msg(FS(FSTRING_NAME));
println_Msg(romName);
- print_Msg(F("Serial: "));
+ print_Msg(FS(FSTRING_SERIAL));
println_Msg(cartID);
print_Msg(F("CRC1: "));
println_Msg(checksumStr);
diff --git a/Cart_Reader/OSCR.cpp b/Cart_Reader/OSCR.cpp index 918e623..8bfc882 100644 --- a/Cart_Reader/OSCR.cpp +++ b/Cart_Reader/OSCR.cpp @@ -77,7 +77,9 @@ constexpr char PROGMEM FSTRING_MAPPER[] = "Mapper: "; constexpr char PROGMEM FSTRING_SIZE[] = "Size: ";
constexpr char PROGMEM FSTRING_NAME[] = "Name: ";
constexpr char PROGMEM FSTRING_CHECKSUM[] = "Checksum: ";
-constexpr char PROGMEM FSTRING_ROM_SIZE[] ="ROM Size: ";
+constexpr char PROGMEM FSTRING_ROM_SIZE[] = "ROM Size: ";
+constexpr char PROGMEM FSTRING_REVISION[] = "Revision: ";
+constexpr char PROGMEM FSTRING_SERIAL[] = "Serial: ";
/*==== /CONSTANTS =================================================*/
diff --git a/Cart_Reader/OSCR.h b/Cart_Reader/OSCR.h index 6381d86..f8960a7 100644 --- a/Cart_Reader/OSCR.h +++ b/Cart_Reader/OSCR.h @@ -102,6 +102,8 @@ extern const char PROGMEM FSTRING_SIZE[]; extern const char PROGMEM FSTRING_ROM_SIZE[]; extern const char PROGMEM FSTRING_NAME[]; extern const char PROGMEM FSTRING_CHECKSUM[]; +extern const char PROGMEM FSTRING_REVISION[]; +extern const char PROGMEM FSTRING_SERIAL[]; #define FS(pmem_string) (reinterpret_cast<const __FlashStringHelper *>(pmem_string)) diff --git a/Cart_Reader/SNES.ino b/Cart_Reader/SNES.ino index b0b0e0b..d8e83c5 100644 --- a/Cart_Reader/SNES.ino +++ b/Cart_Reader/SNES.ino @@ -858,7 +858,7 @@ void getCartInfo_SNES() { print_Msg(FS(FSTRING_NAME));
println_Msg(romName);
- print_Msg(F("Revision: "));
+ print_Msg(FS(FSTRING_REVISION));
println_Msg(romVersion);
print_Msg(F("Type: "));
|