mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
19 lines
669 B
C
19 lines
669 B
C
|
#pragma once
|
||
|
|
||
|
#include "common.h"
|
||
|
|
||
|
|
||
|
// from: http://3dbrew.org/wiki/Titles#Data_Structure
|
||
|
typedef struct {
|
||
|
u32 cmd_id; // same as filename id, <cmd_id>.cmd
|
||
|
u32 n_entries; // matches highest content index
|
||
|
u32 n_cmacs; // number of cmacs in file (excluding the one @0x10)
|
||
|
u32 unknown; // usually 1
|
||
|
u8 cmac[0x10]; // calculated from first 0x10 byte of data, no hashing
|
||
|
// followed by u32 list of content ids (sorted by index, 0xFFFFFFFF for unavailable)
|
||
|
// followed by u32 list of content ids (sorted by id?)
|
||
|
// followed by <n_entries> CMACs (may contain garbage)
|
||
|
} __attribute__((packed, aligned(4))) CmdHeader;
|
||
|
|
||
|
u32 CheckCmdSize(CmdHeader* cmd, u64 fsize);
|