AnimaEngine  1.0.0
Nintendo DS Pokemon Black, White, Black 2, and White 2 sprite extraction and preview toolchain
nds_header.h
Go to the documentation of this file.
1 
6 #ifndef NDS_HEADER_H
7 #define NDS_HEADER_H
8 
9 #include "common.h"
10 
14 typedef struct NdsHeader {
15  char game_title[13];
16  char game_code[5];
24 
32 int NdsHeader_Parse(const u8 *rom, size_t rom_size, NdsHeader *out_header);
33 
39 void NdsHeader_Print(const NdsHeader *header, size_t rom_size);
40 
46 int NdsHeader_IsValidGame(const NdsHeader *header);
47 
53 int NdsHeader_IsSequel(const NdsHeader *header);
54 
55 #endif
Common types, macros, and standard library includes used throughout AnimaEngine.
unsigned int u32
Definition: common.h:16
unsigned char u8
Definition: common.h:14
int NdsHeader_IsSequel(const NdsHeader *header)
Checks if the target ROM is Black 2 or White 2.
Definition: nds_header.c:69
void NdsHeader_Print(const NdsHeader *header, size_t rom_size)
Debug prints ROM header values to stdout.
Definition: nds_header.c:39
int NdsHeader_IsValidGame(const NdsHeader *header)
Validates if the ROM matches known Gen 5 Pokemon game serial codes.
Definition: nds_header.c:56
int NdsHeader_Parse(const u8 *rom, size_t rom_size, NdsHeader *out_header)
Parses essential header entries from a raw ROM buffer.
Definition: nds_header.c:4
struct NdsHeader NdsHeader
Representation of subset of core metadata field descriptors inside an NDS ROM header block.
Representation of subset of core metadata field descriptors inside an NDS ROM header block.
Definition: nds_header.h:14
u32 fat_size
Definition: nds_header.h:22
char game_title[13]
Definition: nds_header.h:15
u32 fnt_size
Definition: nds_header.h:19
char game_code[5]
Definition: nds_header.h:16
u32 fat_offset
Definition: nds_header.h:21
u32 fnt_offset
Definition: nds_header.h:18