mirror of
https://github.com/Polprzewodnikowy/N64FlashcartMenu.git
synced 2024-11-21 18:19:19 +01:00
ROM DB additions (#12)
<!--- Provide a general summary of your changes in the Title above --> ## Description <!--- Describe your changes in detail --> Add some missing cart ID's to the database ## Motivation and Context <!--- What does this sample do? What problem does it solve? --> <!--- If it fixes/closes/resolves an open issue, please link to the issue here --> Some were missing. ## How Has This Been Tested? <!-- (if applicable) --> <!--- Please describe in detail how you tested your sample/changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## Screenshots <!-- (if appropriate): --> ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [x] Improvement (non-breaking change that adds a new feature) - [ ] Bug fix (fixes an issue) - [ ] Breaking change (breaking change) - [ ] Config and build (change in the configuration and build system, has no impact on code or features) ## Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. <!--- It would be nice if you could sign off your contribution by replacing the name with your GitHub user name and GitHub email contact. --> Signed-off-by: GITHUB_USER <GITHUB_USER_EMAIL> --------- Co-authored-by: Mateusz Faderewski <sc@mateuszfaderewski.pl>
This commit is contained in:
parent
a4414e3b79
commit
f8fb8b617e
@ -79,7 +79,7 @@ rom_header_t file_read_rom_header(char *path) {
|
||||
|
||||
uint8_t rom_db_match_save_type(rom_header_t rom_header) {
|
||||
|
||||
// These are ordered to ensure they are handled correctly...
|
||||
// These are ordered to ensure they are handled correctly... (presumes big endian)
|
||||
|
||||
// First: Match by the `ED` or `HB` Developer ID
|
||||
if (rom_header.metadata.unique_identifier == *(uint16_t *)"ED" || rom_header.metadata.unique_identifier == *(uint16_t *)"HB") {
|
||||
@ -96,11 +96,9 @@ uint8_t rom_db_match_save_type(rom_header_t rom_header) {
|
||||
|
||||
// Second: Match the default entries for crc.
|
||||
// DOUBUTSU BANCHOU (ANIMAL LEADER, Cubivore) - Contains no game ID
|
||||
if (rom_header.checksum == 16971230020836426415U) return DB_SAVE_TYPE_FLASHRAM;
|
||||
if (rom_header.checksum == 0xEB85EBC9596682AF) return DB_SAVE_TYPE_FLASHRAM;
|
||||
// DK Retail kiosk demo (shares ID with Dinosaur planet, but hacks are unlikely)!
|
||||
if (rom_header.checksum == 996610171530815774U) return DB_SAVE_TYPE_EEPROM_16K;
|
||||
// donkey kong f2
|
||||
// if (rom_header.checksum == 0xce84793d) return DB_SAVE_TYPE_SRAM;
|
||||
if (rom_header.checksum == 0x0DD4ABABB5A2A91E) return DB_SAVE_TYPE_EEPROM_16K;
|
||||
// DMTJ 64DD game
|
||||
// if (rom_header.checksum == 0x4cbc3b56) return DB_SAVE_TYPE_SRAM;
|
||||
|
||||
@ -116,26 +114,56 @@ uint8_t rom_db_match_save_type(rom_header_t rom_header) {
|
||||
"GF", "GU", "GV", "HA", "HF", "HP", "IC", "IJ", "IR", "JM", "K2", "KA", "KI", "KT", "LB", "LR",
|
||||
"MG", "MI", "ML", "MO", "MR", "MS", "MU", "MW", "N6", "NA", "OH", "PG", "PW", "PY", "RC", "RS",
|
||||
"S6", "SA", "SC", "SM", "SU", "SV", "SW", "TB", "TC", "TJ", "TM", "TN", "TP", "TR", "TX", "T6",
|
||||
"VL", "VY", "WC", "WL", "WQ", "WR", "WU", "XO", "4W",
|
||||
"VL", "VY", "WC", "WL", "WQ", "WR", "WU", "XO", "4W", "GL", "O2", "OS", "PM", "PT", "SN", "SB",
|
||||
"SS",
|
||||
// EEP16K
|
||||
"B7", "CW", "CZ", "DO", "D2", "D6", "EP", "EV", "FU", "F2", "IM", "M8", "MV", "MX", "NB", "NX",
|
||||
"PD", "RZ", "UB", "X7", "YS", "3D",
|
||||
"PD", "RZ", "UB", "X7", "YS", "3D", "R7",
|
||||
// SRAM
|
||||
"AL", "AY", "A2", "DA", "FZ", "GP", "G6", "K4", "KG", "MF", "OB", "RE", "RI", "TE", "VB", "VP",
|
||||
"WI", "W2", "WX", "WZ", "YW", "ZL",
|
||||
"WI", "W2", "WX", "WZ", "YW", "ZL", "B5", "IB", "JG", "UT", "UM", "T3",
|
||||
// SRAM_BANKED
|
||||
"DZ",
|
||||
// SRAM_128K
|
||||
|
||||
// FLASHRAM
|
||||
"AF", "CC", "CK", "DL", "DP", "JD", "JF", "KJ", "M6", "MQ", "P2", "P3", "PF", "PH", "PN", "PO",
|
||||
"PS", "RH", "SI", "SQ", "T9", "W4", "ZS",
|
||||
"PS", "RH", "SI", "SQ", "T9", "W4", "ZS", "DA",
|
||||
// Controller Pak required
|
||||
"2V", "32", "3P", "3T", "8W", "AC", "AM", "AR", "B4", "BF", "BL", "BO", "BP", "BQ", "BR", "BX",
|
||||
"BY", "CD", "CE", "CL", "CO", "CS", "DE", "DH", "DM", "DN", "DT", "EG", "ET", "F9", "FD", "FF",
|
||||
"FO", "FQ", "G2", "G5", "GA", "GM", "GN", "GR", "GX", "HC", "HT", "HX", "HW", "HV", "IV", "KK",
|
||||
"L2", "LG", "M4", "MB", "MY", "NC", "NS", "O7", "OF", "2P", "PR", "PU", "PX", "R2", "R3", "R6",
|
||||
"RK", "RO", "RP", "RR", "RT", "RU", "RV", "RX", "SD", "SF", "SG", "SK", "SL", "SP", "SX", "SY",
|
||||
"T4", "TA", "TF", "TH", "TQ", "WB", "X2", "X3", "Y2", "V3", "V8", "VC", "VG", "VR", "WD", "WO",
|
||||
"WP", "WT", "XF", "YP", "ZO",
|
||||
|
||||
// Controller Pak only
|
||||
"BX", "BQ", "NS",
|
||||
// Definitely none
|
||||
// "JQ", // Batman Beyond: Return of the Joker
|
||||
// "CB", // Charlie Blast's Territory (Password)
|
||||
// "CF", // Clayfighter 63 1/3
|
||||
// "C2", // Clayfighter: Sculptor's Cut
|
||||
// "DK", // Dark Rift
|
||||
// "EL", // Elmo's Letter Adventure
|
||||
// Elmo's Number Journey
|
||||
// "JO", // Jeopardy!
|
||||
// "KE", // Knife Edge: Nosegunner
|
||||
// "ME", // Mace: The Dark Age
|
||||
// "MT", //Magical Tetris Challenge
|
||||
// "M3", //Monster Truck Madness (Password)
|
||||
// "MK", //Mortal Kombat Trilogy
|
||||
// Powerpuff Girls: Chemical X Traction (Password)
|
||||
// "RG", //Rugrats: Scavenger Hunt
|
||||
// "CY", //South Park: Chef's Luv Shack
|
||||
// "OH", //Transformers Beast Wars: Transmetals
|
||||
// "WA", //War Gods
|
||||
// "WF", //Wheel of Fortune
|
||||
|
||||
// To work out
|
||||
// "AH", "BW", "GB", "LC", "2V", "DW", "M3", "MK", "NC", "WA",
|
||||
|
||||
// Last entry
|
||||
"!!"
|
||||
"\0\0"
|
||||
|
||||
};
|
||||
static int save_types[] = {
|
||||
@ -145,23 +173,29 @@ uint8_t rom_db_match_save_type(rom_header_t rom_header) {
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01,
|
||||
// EEP16K
|
||||
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
||||
0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
||||
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
||||
// SRAM
|
||||
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
||||
0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
||||
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
||||
// SRAM_BANKED
|
||||
0x04,
|
||||
// SRAM_128K
|
||||
|
||||
// FLASHRAM
|
||||
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
|
||||
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
|
||||
|
||||
// Controller Pak only
|
||||
0x10, 0x10, 0x10,
|
||||
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
|
||||
// Controller Pak required
|
||||
0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
|
||||
0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
|
||||
0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
|
||||
0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
|
||||
0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
|
||||
0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
|
||||
0x10, 0x10, 0x10, 0x10, 0x10,
|
||||
|
||||
// Last entry.
|
||||
0xff
|
||||
@ -180,22 +214,30 @@ uint8_t rom_db_match_save_type(rom_header_t rom_header) {
|
||||
|
||||
uint8_t rom_db_match_expansion_pak(rom_header_t rom_header) {
|
||||
|
||||
// Space Station Silicon Valley has known issues on NTSC.
|
||||
// We only check for the known working market here.
|
||||
if ( (rom_header.metadata.unique_identifier == *(uint16_t *) "SV") && (rom_header.metadata.destination_market != MARKET_PAL_GENERIC)) {
|
||||
return DB_MEMORY_EXPANSION_FAULTY;
|
||||
}
|
||||
|
||||
static char *cart_ids[] = {
|
||||
|
||||
// See: https://nintendo.fandom.com/wiki/Nintendo_64_Expansion_Pak
|
||||
|
||||
// Expansion Pak Required
|
||||
"DO", "DP", "ZS", // Donkey Kong, Dino Planet, Majoras Mask
|
||||
|
||||
// Expansion Pak Suggested
|
||||
// Expansion Pak Recommended (games are pretty broken without it)
|
||||
"IJ", "PD", "SQ", // Indiana Jones, Perfect Dark, Starcraft
|
||||
|
||||
// Expansion Pak Enhanced
|
||||
"32", "F2", "MX", "NA", "Q2", "RE", "SD", "P3", "Y2", "TQ", // F-1 World Grand Prix II, Shadow Man, Excitebike 64, Rogue Squadron, Battle for Naboo, Quake 2, Resident Evil 2, etc.
|
||||
|
||||
// Expansion Pak Known Faulty ( NTSC only )
|
||||
"SV",
|
||||
// Expansion Pak Enhanced (box art suggest improvements in some form)
|
||||
"3T", "2M", "32", "4W", "9F", "AC", "AM", "AR", "AS", "AY", "BE", "CC", "CE", "CO", "D4", "DT",
|
||||
"DQ", "DZ", "F2", "FL", "GB", "GX", "HT", "HV", "IC", "IS", "JA", "L2", "MD", "MX", "NA", "O7",
|
||||
"Q2", "Q9", "QB", "RC", "RE", "RO", "RU", "RS", "RV", "RW", "SD", "SL", "P3", "T2", "T4", "TF",
|
||||
"TK", "Y2", "TQ", "V8", "VG", "XF", "ZO",
|
||||
|
||||
// Last entry
|
||||
"!!"
|
||||
"\0\0"
|
||||
|
||||
};
|
||||
static int exp_types[] = {
|
||||
@ -203,14 +245,14 @@ uint8_t rom_db_match_expansion_pak(rom_header_t rom_header) {
|
||||
// Expansion Pak Required
|
||||
0x01, 0x01, 0x01,
|
||||
|
||||
// Expansion Pak Suggested
|
||||
// Expansion Pak Recommended
|
||||
0x02, 0x02, 0x02,
|
||||
|
||||
// Expansion Pak Enhanced
|
||||
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
||||
|
||||
// Expansion Pak Known Faulty ( NTSC only )
|
||||
0x04,
|
||||
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
||||
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
||||
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
||||
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
||||
|
||||
// Last entry.
|
||||
0xff
|
||||
|
@ -12,27 +12,29 @@
|
||||
|
||||
// NOTE: these values are independent of flashcart / OS
|
||||
// But by default align to SC64.
|
||||
#define DB_SAVE_TYPE_NONE 0x00
|
||||
#define DB_SAVE_TYPE_EEPROM_4K 0x01
|
||||
#define DB_SAVE_TYPE_EEPROM_16K 0x02
|
||||
#define DB_SAVE_TYPE_SRAM 0x03
|
||||
#define DB_SAVE_TYPE_SRAM_BANKED 0x04
|
||||
#define DB_SAVE_TYPE_SRAM_128K 0x05
|
||||
#define DB_SAVE_TYPE_FLASHRAM 0x06
|
||||
#define DB_SAVE_TYPE_CPAK 0x10
|
||||
#define DB_SAVE_TYPE_DD 0x20
|
||||
#define DB_SAVE_TYPE_INVALID 0xff
|
||||
typedef enum {
|
||||
DB_SAVE_TYPE_NONE = 0x00,
|
||||
DB_SAVE_TYPE_EEPROM_4K = 0x01,
|
||||
DB_SAVE_TYPE_EEPROM_16K = 0x02,
|
||||
DB_SAVE_TYPE_SRAM = 0x03,
|
||||
DB_SAVE_TYPE_SRAM_BANKED = 0x04,
|
||||
DB_SAVE_TYPE_SRAM_128K = 0x05,
|
||||
DB_SAVE_TYPE_FLASHRAM = 0x06,
|
||||
DB_SAVE_TYPE_CPAK = 0x10,
|
||||
DB_SAVE_TYPE_DD = 0x20,
|
||||
DB_SAVE_TYPE_INVALID = 0xff,
|
||||
} db_savetype_t;
|
||||
|
||||
/** @brief ROM System Memory requirements enumeration */
|
||||
typedef enum {
|
||||
/** @brief The ROM is happy with 4K of memory */
|
||||
DB_MEMORY_EXPANSION_NONE = 0x00,
|
||||
/** @brief The ROM requires 8K of memory */
|
||||
DB_MEMORY_EXPANSION_REQUIRED = 0x01,
|
||||
DB_MEMORY_EXPANSION_SUGGESTED = 0x02,
|
||||
DB_MEMORY_EXPANSION_ENHANCED = 0x03,
|
||||
/** @brief The ROM is faulty when using 8K of memory */
|
||||
DB_MEMORY_EXPANSION_FAULTY = 0x04,
|
||||
/** @brief The ROM is happy with 4MB of memory */
|
||||
DB_MEMORY_EXPANSION_NONE = 0x00,
|
||||
/** @brief The ROM requires 8MB of memory */
|
||||
DB_MEMORY_EXPANSION_REQUIRED = 0x01,
|
||||
DB_MEMORY_EXPANSION_RECOMMENDED = 0x02,
|
||||
DB_MEMORY_EXPANSION_SUGGESTED = 0x03,
|
||||
/** @brief The ROM is faulty when using 8MB of memory */
|
||||
DB_MEMORY_EXPANSION_FAULTY = 0x04,
|
||||
} rom_memorytype_t;
|
||||
|
||||
|
||||
@ -83,7 +85,7 @@ typedef enum {
|
||||
// MARKET_UNKNOWN_M = 'M',
|
||||
MARKET_CANADA = 'N',
|
||||
// MARKET_UNKNOWN_O = 'O',
|
||||
MARKET_EUROPE_P = 'P',
|
||||
MARKET_PAL_GENERIC = 'P',
|
||||
// MARKET_UNKNOWN_Q = 'Q',
|
||||
// MARKET_UNKNOWN_R = 'R',
|
||||
MARKET_SPAIN = 'S',
|
||||
@ -91,9 +93,9 @@ typedef enum {
|
||||
MARKET_AUSTRAILA = 'U',
|
||||
// MARKET_UNKNOWN_V = 'V',
|
||||
MARKET_SCANDINAVAIA = 'W',
|
||||
MARKET_EUROPE_X = 'X',
|
||||
MARKET_EUROPE_Y = 'Y',
|
||||
MARKET_EUROPE_Z = 'Z'
|
||||
MARKET_PAL_X = 'X',
|
||||
MARKET_PAL_Y = 'Y',
|
||||
MARKET_PAL_Z = 'Z'
|
||||
} rom_destination_market_t;
|
||||
|
||||
|
||||
|
@ -36,19 +36,19 @@ static char *get_rom_mediatype_s (uint8_t type) {
|
||||
switch (type)
|
||||
{
|
||||
case N64_CART:
|
||||
return "N - Cartridge";
|
||||
return "Cartridge";
|
||||
break;
|
||||
case N64_DISK:
|
||||
return "D - Disk";
|
||||
return "Disk";
|
||||
break;
|
||||
case N64_CART_EXPANDABLE:
|
||||
return "C - Cart Expandable";
|
||||
return "Cart Expandable";
|
||||
break;
|
||||
case N64_DISK_EXPANDABLE:
|
||||
return "E - Disk Expandable";
|
||||
return "Disk Expandable";
|
||||
break;
|
||||
case N64_ALECK64:
|
||||
return "Z - Aleck64";
|
||||
return "Aleck64";
|
||||
break;
|
||||
default:
|
||||
return "Unknown";
|
||||
@ -56,6 +56,53 @@ static char *get_rom_mediatype_s (uint8_t type) {
|
||||
}
|
||||
}
|
||||
|
||||
static char *get_rom_destination_market_s (uint8_t market_type) {
|
||||
// TODO: These are all assumptions and should be corrected if required.
|
||||
switch (market_type) {
|
||||
case MARKET_ALL:
|
||||
return "All";
|
||||
case MARKET_BRAZIL:
|
||||
return "BRA (MPAL)";
|
||||
case MARKET_CHINA:
|
||||
return "CHN";
|
||||
case MARKET_GERMANY:
|
||||
return "DEU (PAL)";
|
||||
case MARKET_USA:
|
||||
return "USA (NTSC)";
|
||||
case MARKET_FRANCE:
|
||||
return "FRA (PAL)";
|
||||
case MARKET_NETHERLANDS:
|
||||
return "NLD (PAL)";
|
||||
case MARKET_ITALY:
|
||||
return "ITA (PAL)";
|
||||
case MARKET_JAPAN:
|
||||
return "JPN (NTSC)";
|
||||
case MARKET_KOREA:
|
||||
return "KOR";
|
||||
case MARKET_CANADA:
|
||||
return "CAN";
|
||||
case MARKET_SPAIN:
|
||||
return "ESP (PAL)";
|
||||
case MARKET_AUSTRAILA:
|
||||
return "AUS (PAL)";
|
||||
case MARKET_SCANDINAVAIA:
|
||||
return "Scandinavaia";
|
||||
case MARKET_GATEWAY64_NTSC:
|
||||
return "GW64 (NTSC)";
|
||||
case MARKET_GATEWAY64_PAL:
|
||||
return "GW64 (PAL)";
|
||||
case MARKET_PAL_GENERIC:
|
||||
return "Generic (PAL)";
|
||||
case MARKET_PAL_X: //FIXME: some AUS ROM's use this so not only EUR
|
||||
case MARKET_PAL_Y:
|
||||
case MARKET_PAL_Z:
|
||||
return "??? (PAL)";
|
||||
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
static char *get_rom_savetype_s (uint8_t type) {
|
||||
switch (type)
|
||||
{
|
||||
@ -92,14 +139,14 @@ static char *get_rom_memorytype_s (uint8_t type) {
|
||||
case DB_MEMORY_EXPANSION_REQUIRED:
|
||||
return "Required";
|
||||
break;
|
||||
case DB_MEMORY_EXPANSION_RECOMMENDED:
|
||||
return "Recommended";
|
||||
break;
|
||||
case DB_MEMORY_EXPANSION_SUGGESTED:
|
||||
return "Suggested";
|
||||
break;
|
||||
case DB_MEMORY_EXPANSION_ENHANCED:
|
||||
return "Enhanced";
|
||||
break;
|
||||
case DB_MEMORY_EXPANSION_FAULTY:
|
||||
return "May have issues";
|
||||
return "Ensure Patched";
|
||||
break;
|
||||
default:
|
||||
return "Not Required";
|
||||
@ -220,15 +267,15 @@ static void draw (menu_t *menu, surface_t *d) {
|
||||
y_position += (font_vertical_pixels * 2);
|
||||
sprintf(str_buffer,"Title: %s\n", temp_header.title);
|
||||
graphics_draw_text(d, x_start_position, y_position += font_vertical_pixels, str_buffer);
|
||||
sprintf(str_buffer,"Media Type: %s\n", get_rom_mediatype_s(temp_header.metadata.media_type));
|
||||
sprintf(str_buffer,"Media Type: %c - %s\n", temp_header.metadata.media_type, get_rom_mediatype_s(temp_header.metadata.media_type));
|
||||
graphics_draw_text(d, x_start_position, y_position += font_vertical_pixels, str_buffer);
|
||||
sprintf(str_buffer,"Unique ID: %.2s\n", (char*)&(temp_header.metadata.unique_identifier));
|
||||
graphics_draw_text(d, x_start_position, y_position += font_vertical_pixels, str_buffer);
|
||||
sprintf(str_buffer,"Destination Market: %c\n", temp_header.metadata.destination_market);
|
||||
sprintf(str_buffer,"Destination Market: %c - %s\n", temp_header.metadata.destination_market, get_rom_destination_market_s(temp_header.metadata.destination_market));
|
||||
graphics_draw_text(d, x_start_position, y_position += font_vertical_pixels, str_buffer);
|
||||
sprintf(str_buffer,"Version: %hhu\n", temp_header.version);
|
||||
graphics_draw_text(d, x_start_position, y_position += font_vertical_pixels, str_buffer);
|
||||
sprintf(str_buffer,"Checksum: %llu\n", temp_header.checksum);
|
||||
sprintf(str_buffer,"Checksum: 0x%016llX\n", temp_header.checksum);
|
||||
graphics_draw_text(d, x_start_position, y_position += font_vertical_pixels, str_buffer);
|
||||
y_position += (font_vertical_pixels * 2);
|
||||
uint8_t save_type = rom_db_match_save_type(temp_header);
|
||||
|
@ -28,15 +28,62 @@ static char *format_rom_endian (uint32_t endian) {
|
||||
static char *format_rom_media_type (uint8_t media_type) {
|
||||
switch (media_type) {
|
||||
case N64_CART:
|
||||
return "N - Cartridge";
|
||||
return "Cartridge";
|
||||
case N64_DISK:
|
||||
return "D - Disk";
|
||||
return "Disk";
|
||||
case N64_CART_EXPANDABLE:
|
||||
return "C - Cartridge (Expandable)";
|
||||
return "Cartridge (Expandable)";
|
||||
case N64_DISK_EXPANDABLE:
|
||||
return "E - Disk (Expandable)";
|
||||
return "Disk (Expandable)";
|
||||
case N64_ALECK64:
|
||||
return "Z - Aleck64";
|
||||
return "Aleck64";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
static char *format_rom_destination_market (uint8_t market_type) {
|
||||
// TODO: These are all assumptions and should be corrected if required.
|
||||
switch (market_type) {
|
||||
case MARKET_ALL:
|
||||
return "All";
|
||||
case MARKET_BRAZIL:
|
||||
return "Brazil (MPAL)";
|
||||
case MARKET_CHINA:
|
||||
return "China";
|
||||
case MARKET_GERMANY:
|
||||
return "Germany (PAL)";
|
||||
case MARKET_USA:
|
||||
return "USA (NTSC)";
|
||||
case MARKET_FRANCE:
|
||||
return "France (PAL)";
|
||||
case MARKET_NETHERLANDS:
|
||||
return "Netherlands (PAL)";
|
||||
case MARKET_ITALY:
|
||||
return "Italy (PAL)";
|
||||
case MARKET_JAPAN:
|
||||
return "Japan (NTSC)";
|
||||
case MARKET_KOREA:
|
||||
return "Korea";
|
||||
case MARKET_CANADA:
|
||||
return "Canada";
|
||||
case MARKET_SPAIN:
|
||||
return "Spain (PAL)";
|
||||
case MARKET_AUSTRAILA:
|
||||
return "Austraila (PAL)";
|
||||
case MARKET_SCANDINAVAIA:
|
||||
return "Scandinavaia";
|
||||
case MARKET_GATEWAY64_NTSC:
|
||||
return "Gateway (NTSC)";
|
||||
case MARKET_GATEWAY64_PAL:
|
||||
return "Gateway (PAL)";
|
||||
case MARKET_PAL_GENERIC:
|
||||
return "Generic (PAL)";
|
||||
case MARKET_PAL_X: //FIXME: some AUS ROM's use this so not only EUR
|
||||
case MARKET_PAL_Y:
|
||||
case MARKET_PAL_Z:
|
||||
return "Unknown (PAL)";
|
||||
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
@ -71,14 +118,14 @@ static char *format_rom_memory_type (uint8_t memory_type) {
|
||||
case DB_MEMORY_EXPANSION_REQUIRED:
|
||||
return "Required";
|
||||
break;
|
||||
case DB_MEMORY_EXPANSION_RECOMMENDED:
|
||||
return "Recommended";
|
||||
break;
|
||||
case DB_MEMORY_EXPANSION_SUGGESTED:
|
||||
return "Suggested";
|
||||
break;
|
||||
case DB_MEMORY_EXPANSION_ENHANCED:
|
||||
return "Enhanced";
|
||||
break;
|
||||
case DB_MEMORY_EXPANSION_FAULTY:
|
||||
return "May have issues";
|
||||
return "May require ROM patch";
|
||||
break;
|
||||
default:
|
||||
return "Not required";
|
||||
@ -178,9 +225,9 @@ static void draw (menu_t *menu, surface_t *d) {
|
||||
// Main screen
|
||||
text_y += fragment_textf(text_x, text_y, "Title: %.20s", rom_header.title);
|
||||
text_y += fragment_textf(text_x, text_y, "Save type: %s", format_rom_save_type(rom_db_match_save_type(rom_header)));
|
||||
text_y += fragment_textf(text_x, text_y, "Media type: %s", format_rom_media_type(rom_header.metadata.media_type));
|
||||
text_y += fragment_textf(text_x, text_y, "Media type: %c - %s", rom_header.metadata.media_type, format_rom_media_type(rom_header.metadata.media_type));
|
||||
text_y += fragment_textf(text_x, text_y, "Unique ID: %.2s", (char*)&(rom_header.metadata.unique_identifier));
|
||||
text_y += fragment_textf(text_x, text_y, "Destination market: %c", rom_header.metadata.destination_market);
|
||||
text_y += fragment_textf(text_x, text_y, "Destination market: %c - %s", rom_header.metadata.destination_market, format_rom_destination_market(rom_header.metadata.destination_market));
|
||||
text_y += fragment_textf(text_x, text_y, "Version: %hhu", rom_header.version);
|
||||
text_y += fragment_textf(text_x, text_y, "Checksum: 0x%016llX", rom_header.checksum);
|
||||
text_y += fragment_textf(text_x, text_y, "ROM endian: %s", format_rom_endian(rom_header.endian));
|
||||
|
@ -9,4 +9,4 @@ See root directory.
|
||||
Removes unnecessary null bytes from the end of ROM file to cut on menu load time from SD card.
|
||||
|
||||
# Notes
|
||||
The deployer `sc64deployer` needs to be downloaded from https://github.com/Polprzewodnikowy/SummerCart64/releases/tag/v2.15.1 and placed in this folder.
|
||||
The deployer `sc64deployer` needs to be downloaded from https://github.com/Polprzewodnikowy/SummerCart64/releases/tag/v2.16.0 and placed in this folder.
|
||||
|
Loading…
Reference in New Issue
Block a user