Files
Project_CTR/makerom/cardinfo.h
T
applestash 9c548197c1 big update
lots cleaned, added cia to cci conv, it
's called a block, separated reading from building, improved ncch keyx
stuff, and basic verbose for keys, elf checking and romfs
2014-08-26 00:34:28 +10:00

53 lines
1.1 KiB
C

#pragma once
typedef struct
{
u8 reserved0[0xf8];
u8 mediaSizeUsed[8];
u8 reserved1[0x8];
u8 unknown[0x4];
u8 reserved2[0xc];
u8 cverTitleId[8];
u8 cverTitleVersion[2];
u8 reserved3[0xcd6];
} cardinfo_notes; // reserved[0xDF8];
typedef struct
{
u8 writableAddress[4];
u8 cardInfoBitmask[4];
cardinfo_notes notes;
u8 ncch0TitleId[8];
u8 reserved0[8];
u8 initialData[0x30];
u8 reserved1[0xc0];
u8 ncch0Hdr[0x100];
} cardinfo_hdr;
typedef struct
{
u8 cardDeviceReserved1[0x200];
u8 titleKey[0x10];
u8 cardDeviceReserved2[0xf0];
} devcardinfo_hdr;
static const u8 stock_initial_data[0x30] =
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xAD, 0x88,
0xAC, 0x41, 0xA2, 0xB1, 0x5E, 0x8F,
0x66, 0x9C, 0x97, 0xE5, 0xE1, 0x5E,
0xA3, 0xEB, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
static const u8 stock_title_key[0x10] =
{
0x6E, 0xC7, 0x5F, 0xB2, 0xE2, 0xB4,
0x87, 0x46, 0x1E, 0xDD, 0xCB, 0xB8,
0x97, 0x11, 0x92, 0xBA
};
int GenCardInfoHdr(cci_settings *set);