LibT2FS 0.1
C API for accessing TEngine data in memory.
Loading...
Searching...
No Matches
n64rom.h
Go to the documentation of this file.
1/* This file is part of LibT2FS.
2 *
3 * LibT2FS is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * LibT2FS is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <https://www.gnu.org/licenses/>.
15 */
16
17#ifndef H_T2FS_N64ROM
18#define H_T2FS_N64ROM
19
20#include <stdint.h>
21
22// Buffer size for converting libultra version to string
23// 255/10 = 25.5 (4 chars)
24// 1 char for the revision ASCII character
25// 7 chars for adding the potential patch version in hex "-0x0000"
26// 1 char to the zero terminator
27#define T2FS_N64_ULTRA_VERSION_STR_SIZE 13
28
29
34
35
36typedef struct __attribute__((__packed__)) s_T2FSN64LibUltraVersion {
37 uint16_t patch;
38 uint8_t version;
39 uint8_t revision;
41
42
43typedef struct __attribute__((__packed__)) s_T2FSN64Header {
44 uint32_t configFlags;
45 uint32_t clockRate;
46 uint32_t bootAddress;
48 uint64_t checksum;
49 uint64_t reserved;
50 char title[20];
51 char unused[7];
52 char id[4];
53 uint8_t version;
55
56
57#endif
struct s_T2FSN64LibUltraVersion T2FSN64LibUltraVersion
Parsing .z64 file headers to match configurations.
struct s_T2FSN64Header T2FSN64Header
Definition n64rom.h:43
char title[20]
Definition n64rom.h:50
T2FSN64LibUltraVersion libVersion
Definition n64rom.h:47
uint8_t version
Definition n64rom.h:53
uint64_t reserved
Definition n64rom.h:49
uint32_t clockRate
Definition n64rom.h:45
uint32_t bootAddress
Definition n64rom.h:46
uint32_t configFlags
Definition n64rom.h:44
char unused[7]
Definition n64rom.h:51
uint64_t checksum
Definition n64rom.h:48
Parsing .z64 file headers to match configurations.
Definition n64rom.h:36
uint8_t revision
ASCII character.
Definition n64rom.h:39
uint16_t patch
reserved (but might be used..)
Definition n64rom.h:37
uint8_t version
divide by 10
Definition n64rom.h:38