mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-15 01:15:06 +01:00
declare "Revision: " and "Serial: " as common string and reuse string
This commit is contained in:
parent
9e13964889
commit
4e7ef93cc6
@ -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));
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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 =================================================*/
|
||||
|
||||
|
@ -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))
|
||||
|
||||
|
@ -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: "));
|
||||
|
Loading…
Reference in New Issue
Block a user