mirror of
https://github.com/DarkStore-3DS/Project_CTR.git
synced 2026-07-03 00:39:14 +00:00
makerom v0.5
This commit is contained in:
@@ -53,18 +53,32 @@ typedef struct
|
||||
typedef struct
|
||||
{
|
||||
u8 magic[4];
|
||||
u8 media_size[4];
|
||||
u8 title_id[8];
|
||||
u8 partitions_fs_type[8];
|
||||
u8 partitions_crypto_type[8];
|
||||
partition_offsetsize offsetsize_table[8];
|
||||
u8 exheader_hash[0x20];
|
||||
u8 additional_header_size[0x4];
|
||||
u8 sector_zero_offset[0x4];
|
||||
u8 partition_flags[8];
|
||||
u8 partition_id_table[8][8];
|
||||
u8 reserved[0x30];
|
||||
} NCSD_Header;
|
||||
u8 mediaSize[4];
|
||||
u8 titleId[8];
|
||||
u8 partitionsFsType[8];
|
||||
u8 partitionsCryptoType[8];
|
||||
partition_offsetsize offset_sizeTable[8];
|
||||
u8 exhdrHash[0x20];
|
||||
u8 additionalHdrSize[0x4];
|
||||
u8 sectorZeroOffset[0x4];
|
||||
u8 partitionFlags[8];
|
||||
u8 partitionIdTable[8][8];
|
||||
u8 padding[0x30];
|
||||
} ncsd_hdr;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u8 magic[4];
|
||||
u8 mediaSize[4];
|
||||
u8 titleId[8];
|
||||
u8 partitionsFsType[8];
|
||||
u8 partitionsCryptoType[8];
|
||||
partition_offsetsize offset_sizeTable[8];
|
||||
u8 padding0[0x28];
|
||||
u8 partitionFlags[8];
|
||||
u8 partitionIdTable[8][8];
|
||||
u8 padding1[0x30];
|
||||
} cci_hdr;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -75,7 +89,7 @@ typedef struct
|
||||
u8 media_size_used[8];
|
||||
u8 reserved_1[0x18];
|
||||
u8 cver_title_id[8];
|
||||
u8 cver_title_version[2];
|
||||
u8 cver_title_titleVersion[2];
|
||||
u8 reserved_2[0xcd6];
|
||||
//
|
||||
u8 ncch_0_title_id[8];
|
||||
@@ -83,53 +97,53 @@ typedef struct
|
||||
u8 initial_data[0x30];
|
||||
u8 reserved_4[0xc0];
|
||||
u8 ncch_0_header[0x100];
|
||||
} CardInfo_Header;
|
||||
} cardinfo_hdr;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u8 CardDeviceReserved1[0x200];
|
||||
u8 TitleKey[0x10];
|
||||
u8 CardDeviceReserved2[0xf0];
|
||||
} Dev_CardInfo_Header;
|
||||
} devcardinfo_hdr;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u8 Signature[0x100];
|
||||
NCSD_Header commonHDR;
|
||||
CardInfo_Header CardInfoHDR;
|
||||
Dev_CardInfo_Header DevCardInfoHDR;
|
||||
u8 *ContentImportBuffer;
|
||||
u8 signature[0x100];
|
||||
cci_hdr cciHdr;
|
||||
cardinfo_hdr cardinfo;
|
||||
devcardinfo_hdr devcardinfo;
|
||||
u8 *ncchImportBuffer;
|
||||
keys_struct *keys;
|
||||
} InternalCCI_Context;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u64 MediaSize;
|
||||
u8 MediaID[8];
|
||||
u8 NCSD_Flags[8];
|
||||
u64 SaveDataSize;
|
||||
u64 WritableAddress;
|
||||
u32 CardInfoBitmask;
|
||||
u64 mediaSize;
|
||||
u8 mediaId[8];
|
||||
u8 flags[8];
|
||||
u64 savedataSize;
|
||||
u64 writableAddress;
|
||||
u32 cardInfoBitmask;
|
||||
|
||||
u8 InitialData[0x30];
|
||||
NCCH_Header *NCCH_HDR;
|
||||
u8 TitleKey[0x10];
|
||||
u8 initialData[0x30];
|
||||
ncch_hdr *ncchHdr;
|
||||
u8 titleKey[0x10];
|
||||
|
||||
u8 *ncch0;
|
||||
u64 ncch0_FileLen;
|
||||
FILE **content;
|
||||
u64 ContentSize[CCI_MAX_CONTENT];
|
||||
u64 ContentOffset[CCI_MAX_CONTENT];
|
||||
u8 ContentTitleID[CCI_MAX_CONTENT][8];
|
||||
u64 TotalContentSize;
|
||||
u64 contentSize[CCI_MAX_CONTENT];
|
||||
u64 contentOffset[CCI_MAX_CONTENT];
|
||||
u8 contentTitleId[CCI_MAX_CONTENT][8];
|
||||
u64 cciTotalSize;
|
||||
|
||||
bool MediaFootPadding;
|
||||
u32 MediaUnitSize;
|
||||
bool fillOutCci;
|
||||
u32 mediaUnit;
|
||||
|
||||
FILE *out;
|
||||
} cci_settings;
|
||||
|
||||
static const u8 Stock_InitialData[0x30] =
|
||||
static const u8 stock_initial_data[0x30] =
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
@@ -141,7 +155,7 @@ static const u8 Stock_InitialData[0x30] =
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
static const u8 Stock_TitleKey[0x10] =
|
||||
static const u8 stock_title_key[0x10] =
|
||||
{
|
||||
0x6E, 0xC7, 0x5F, 0xB2, 0xE2, 0xB4,
|
||||
0x87, 0x46, 0x1E, 0xDD, 0xCB, 0xB8,
|
||||
|
||||
Reference in New Issue
Block a user