N64FlashcartMenu
Loading...
Searching...
No Matches
rom_info.h
Go to the documentation of this file.
1
8#ifndef ROM_INFO_H__
9#define ROM_INFO_H__
10
11#include <stdbool.h>
12#include <stdint.h>
13
14#include "path.h"
15
23
30
39
63
82
95
104
113
115typedef struct {
118 uint32_t boot_address;
120 struct {
121 uint8_t version;
122 char revision;
123 } libultra;
124
125 uint64_t check_code;
126 char title[20];
128 union {
129 char game_code[4];
130 struct {
131 rom_category_type_t category_code : 8;
132 char unique_code[2];
133 rom_destination_type_t destination_code : 8;
134 };
135 };
136
137 uint8_t version;
142 struct {
143 bool cic;
144 rom_cic_type_t cic_type;
145 bool save;
146 rom_save_type_t save_type;
147 bool tv;
148 rom_tv_type_t tv_type;
149 } boot_override;
151 struct {
152 bool controller_pak;
153 bool rumble_pak;
154 bool transfer_pak;
155 bool voice_recognition_unit;
156 bool real_time_clock;
157 bool disk_conversion;
158 bool combo_rom_disk_game;
159 rom_expansion_pak_t expansion_pak;
160 } features;
162 struct {
163 bool cheats_enabled;
164 bool patches_enabled;
165 } settings;
167 struct {
168 char description[300];
169 } metadata;
170} rom_info_t;
171
179bool rom_info_get_cic_seed(rom_info_t *rom_info, uint8_t *seed);
180
188rom_err_t rom_info_load(path_t *path, rom_info_t *rom_info);
189
197
207
215
225
233
243
244#endif // ROM_INFO_H__
Menu Path.
Path Structure.
Definition path.h:16
rom_category_type_t
ROM media type enumeration.
Definition rom_info.h:32
@ N64_DISK_EXPANDABLE
Definition rom_info.h:36
@ N64_CART
Definition rom_info.h:33
@ N64_CART_EXPANDABLE
Definition rom_info.h:35
@ N64_DISK
Definition rom_info.h:34
@ N64_ALECK64
Definition rom_info.h:37
rom_err_t rom_info_override_tv_type(path_t *path, rom_info_t *rom_info, rom_tv_type_t tv_type)
Override the TV type for the ROM.
Definition rom_info.c:919
rom_endianness_t endianness
Definition rom_info.h:116
rom_save_type_t
ROM save type enumeration.
Definition rom_info.h:84
@ SAVE_TYPE_FLASHRAM_1MBIT
Definition rom_info.h:91
@ SAVE_TYPE_EEPROM_4KBIT
Definition rom_info.h:86
@ SAVE_TYPE_SRAM_256KBIT
Definition rom_info.h:88
@ SAVE_TYPE_FLASHRAM_PKST2
Definition rom_info.h:92
@ SAVE_TYPE_EEPROM_16KBIT
Definition rom_info.h:87
@ SAVE_TYPE_NONE
Definition rom_info.h:85
@ SAVE_TYPE_AUTOMATIC
Definition rom_info.h:93
@ SAVE_TYPE_SRAM_BANKED
Definition rom_info.h:89
@ SAVE_TYPE_SRAM_1MBIT
Definition rom_info.h:90
rom_cic_type_t
ROM CIC type enumeration.
Definition rom_info.h:65
@ ROM_CIC_TYPE_5101
Definition rom_info.h:67
@ ROM_CIC_TYPE_AUTOMATIC
Definition rom_info.h:80
@ ROM_CIC_TYPE_8302
Definition rom_info.h:76
@ ROM_CIC_TYPE_x103
Definition rom_info.h:72
@ ROM_CIC_TYPE_UNKNOWN
Definition rom_info.h:66
@ ROM_CIC_TYPE_5167
Definition rom_info.h:68
@ ROM_CIC_TYPE_8401
Definition rom_info.h:78
@ ROM_CIC_TYPE_x106
Definition rom_info.h:74
@ ROM_CIC_TYPE_6101
Definition rom_info.h:69
@ ROM_CIC_TYPE_x102
Definition rom_info.h:71
@ ROM_CIC_TYPE_8301
Definition rom_info.h:75
@ ROM_CIC_TYPE_x105
Definition rom_info.h:73
@ ROM_CIC_TYPE_8501
Definition rom_info.h:79
@ ROM_CIC_TYPE_7102
Definition rom_info.h:70
@ ROM_CIC_TYPE_8303
Definition rom_info.h:77
rom_expansion_pak_t
ROM memory requirements enumeration.
Definition rom_info.h:106
@ EXPANSION_PAK_SUGGESTED
Definition rom_info.h:110
@ EXPANSION_PAK_NONE
Definition rom_info.h:107
@ EXPANSION_PAK_RECOMMENDED
Definition rom_info.h:109
@ EXPANSION_PAK_REQUIRED
Definition rom_info.h:108
@ EXPANSION_PAK_FAULTY
Definition rom_info.h:111
rom_cic_type_t cic_type
Definition rom_info.h:138
rom_err_t rom_info_override_save_type(path_t *path, rom_info_t *rom_info, rom_save_type_t save_type)
Override the save type for the ROM.
Definition rom_info.c:904
rom_destination_type_t
ROM market region & language type enumeration.
Definition rom_info.h:41
@ MARKET_SPANISH
Definition rom_info.h:56
@ MARKET_OTHER_Z
Definition rom_info.h:61
@ MARKET_EUROPEAN_BASIC
Definition rom_info.h:55
@ MARKET_ITALIAN
Definition rom_info.h:50
@ MARKET_GERMAN
Definition rom_info.h:45
@ MARKET_KOREAN
Definition rom_info.h:52
@ MARKET_JAPANESE
Definition rom_info.h:51
@ MARKET_NORTH_AMERICA
Definition rom_info.h:46
@ MARKET_JAPANESE_MULTI
Definition rom_info.h:42
@ MARKET_OTHER_Y
Definition rom_info.h:60
@ MARKET_OTHER_X
Definition rom_info.h:59
@ MARKET_BRAZILIAN
Definition rom_info.h:43
@ MARKET_GATEWAY64_PAL
Definition rom_info.h:53
@ MARKET_GATEWAY64_NTSC
Definition rom_info.h:48
@ MARKET_DUTCH
Definition rom_info.h:49
@ MARKET_CANADIAN
Definition rom_info.h:54
@ MARKET_CHINESE
Definition rom_info.h:44
@ MARKET_AUSTRALIAN
Definition rom_info.h:57
@ MARKET_SCANDINAVIAN
Definition rom_info.h:58
@ MARKET_FRENCH
Definition rom_info.h:47
rom_err_t rom_info_override_cic_type(path_t *path, rom_info_t *rom_info, rom_cic_type_t cic_type)
Override the CIC type for the ROM.
Definition rom_info.c:889
rom_endianness_t
ROM endian enumeration.
Definition rom_info.h:25
@ ENDIANNESS_BYTE_SWAP
Definition rom_info.h:28
@ ENDIANNESS_LITTLE
Definition rom_info.h:27
@ ENDIANNESS_BIG
Definition rom_info.h:26
float clock_rate
Definition rom_info.h:117
rom_err_t rom_info_load(path_t *path, rom_info_t *rom_info)
Load ROM information from a file.
Definition rom_info.c:926
rom_save_type_t save_type
Definition rom_info.h:139
rom_cic_type_t rom_info_get_cic_type(rom_info_t *rom_info)
Get the CIC type for the ROM.
Definition rom_info.c:856
uint8_t version
Definition rom_info.h:137
rom_err_t
ROM error enumeration.
Definition rom_info.h:17
@ ROM_ERR_LOAD_IO
Definition rom_info.h:19
@ ROM_ERR_SAVE_IO
Definition rom_info.h:20
@ ROM_OK
Definition rom_info.h:18
@ ROM_ERR_NO_FILE
Definition rom_info.h:21
rom_tv_type_t
ROM TV type enumeration.
Definition rom_info.h:97
@ ROM_TV_TYPE_MPAL
Definition rom_info.h:100
@ ROM_TV_TYPE_AUTOMATIC
Definition rom_info.h:102
@ ROM_TV_TYPE_NTSC
Definition rom_info.h:99
@ ROM_TV_TYPE_PAL
Definition rom_info.h:98
@ ROM_TV_TYPE_UNKNOWN
Definition rom_info.h:101
rom_tv_type_t tv_type
Definition rom_info.h:140
uint64_t check_code
Definition rom_info.h:125
rom_save_type_t rom_info_get_save_type(rom_info_t *rom_info)
Get the save type for the ROM.
Definition rom_info.c:896
bool rom_info_get_cic_seed(rom_info_t *rom_info, uint8_t *seed)
Get the CIC seed for the ROM.
Definition rom_info.c:864
rom_tv_type_t rom_info_get_tv_type(rom_info_t *rom_info)
Get the TV type for the ROM.
Definition rom_info.c:911
uint32_t boot_address
Definition rom_info.h:118
ROM Information Structure.
Definition rom_info.h:115