mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
Fixed several cases of stray tabs
This commit is contained in:
parent
641b2c3a1a
commit
a18875ea35
@ -3,7 +3,7 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "ff.h"
|
#include "ff.h"
|
||||||
|
|
||||||
#define AM_VRT 0x40 // Virtual (FILINFO FAT attribute)
|
#define AM_VRT 0x40 // Virtual (FILINFO FAT attribute)
|
||||||
|
|
||||||
#define fvx_tell(fp) ((fp)->fptr)
|
#define fvx_tell(fp) ((fp)->fptr)
|
||||||
#define fvx_size(fp) ((fp)->obj.objsize)
|
#define fvx_size(fp) ((fp)->obj.objsize)
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
// see: https://www.3dbrew.org/wiki/CIA#Meta
|
// see: https://www.3dbrew.org/wiki/CIA#Meta
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u8 dependencies[0x180]; // from ExtHeader
|
u8 dependencies[0x180]; // from ExtHeader
|
||||||
u8 reserved0[0x180];
|
u8 reserved0[0x180];
|
||||||
u32 core_version; // 2 normally
|
u32 core_version; // 2 normally
|
||||||
u8 reserved1[0xFC];
|
u8 reserved1[0xFC];
|
||||||
|
@ -15,25 +15,25 @@
|
|||||||
#define EncryptNcsdSequential(data, offset, size, crypto) CryptNcsdSequential(data, offset, size, crypto)
|
#define EncryptNcsdSequential(data, offset, size, crypto) CryptNcsdSequential(data, offset, size, crypto)
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u32 offset;
|
u32 offset;
|
||||||
u32 size;
|
u32 size;
|
||||||
} __attribute__((packed)) NcchPartition;
|
} __attribute__((packed)) NcchPartition;
|
||||||
|
|
||||||
// see: https://www.3dbrew.org/wiki/NCSD#NCSD_header
|
// see: https://www.3dbrew.org/wiki/NCSD#NCSD_header
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u8 signature[0x100];
|
u8 signature[0x100];
|
||||||
u8 magic[4];
|
u8 magic[4];
|
||||||
u32 size;
|
u32 size;
|
||||||
u64 mediaId;
|
u64 mediaId;
|
||||||
u8 partitions_fs_type[8];
|
u8 partitions_fs_type[8];
|
||||||
u8 partitions_crypto_type[8];
|
u8 partitions_crypto_type[8];
|
||||||
NcchPartition partitions[8];
|
NcchPartition partitions[8];
|
||||||
u8 hash_exthdr[0x20];
|
u8 hash_exthdr[0x20];
|
||||||
u8 size_addhdr[0x4];
|
u8 size_addhdr[0x4];
|
||||||
u8 sector_zero_offset[0x4];
|
u8 sector_zero_offset[0x4];
|
||||||
u8 partition_flags[8];
|
u8 partition_flags[8];
|
||||||
u8 partitionId_table[8][8];
|
u8 partitionId_table[8][8];
|
||||||
u8 reserved[0x30];
|
u8 reserved[0x30];
|
||||||
} __attribute__((packed)) NcsdHeader;
|
} __attribute__((packed)) NcsdHeader;
|
||||||
|
|
||||||
u32 ValidateNcsdHeader(NcsdHeader* header);
|
u32 ValidateNcsdHeader(NcsdHeader* header);
|
||||||
|
@ -62,26 +62,26 @@ typedef struct {
|
|||||||
u8 rom_version;
|
u8 rom_version;
|
||||||
u8 autostart; // bit2: skip "press button" after Health & Safety
|
u8 autostart; // bit2: skip "press button" after Health & Safety
|
||||||
u32 arm9_rom_offset;
|
u32 arm9_rom_offset;
|
||||||
u32 arm9_entry_address;
|
u32 arm9_entry_address;
|
||||||
u32 arm9_ram_address;
|
u32 arm9_ram_address;
|
||||||
u32 arm9_size;
|
u32 arm9_size;
|
||||||
u32 arm7_rom_offset;
|
u32 arm7_rom_offset;
|
||||||
u32 arm7_entry_address;
|
u32 arm7_entry_address;
|
||||||
u32 arm7_ram_address;
|
u32 arm7_ram_address;
|
||||||
u32 arm7_size;
|
u32 arm7_size;
|
||||||
u32 fnt_offset;
|
u32 fnt_offset;
|
||||||
u32 fnt_size;
|
u32 fnt_size;
|
||||||
u32 fat_offset;
|
u32 fat_offset;
|
||||||
u32 fat_size;
|
u32 fat_size;
|
||||||
u32 arm9_overlay_offset;
|
u32 arm9_overlay_offset;
|
||||||
u32 arm9_overlay_size;
|
u32 arm9_overlay_size;
|
||||||
u32 arm7_overlay_offset;
|
u32 arm7_overlay_offset;
|
||||||
u32 arm7_overlay_size;
|
u32 arm7_overlay_size;
|
||||||
u32 rom_control_normal; // 0x00416657 for OneTimePROM
|
u32 rom_control_normal; // 0x00416657 for OneTimePROM
|
||||||
u32 rom_control_key1; // 0x081808F8 for OneTimePROM
|
u32 rom_control_key1; // 0x081808F8 for OneTimePROM
|
||||||
u32 icon_offset;
|
u32 icon_offset;
|
||||||
u16 secure_area_crc;
|
u16 secure_area_crc;
|
||||||
u16 secure_area_delay;
|
u16 secure_area_delay;
|
||||||
u32 arm9_auto_load;
|
u32 arm9_auto_load;
|
||||||
u32 arm7_auto_load;
|
u32 arm7_auto_load;
|
||||||
u64 secure_area_disable;
|
u64 secure_area_disable;
|
||||||
|
@ -29,31 +29,31 @@
|
|||||||
// from: https://github.com/profi200/Project_CTR/blob/02159e17ee225de3f7c46ca195ff0f9ba3b3d3e4/ctrtool/tik.h#L15-L39
|
// from: https://github.com/profi200/Project_CTR/blob/02159e17ee225de3f7c46ca195ff0f9ba3b3d3e4/ctrtool/tik.h#L15-L39
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u8 sig_type[4];
|
u8 sig_type[4];
|
||||||
u8 signature[0x100];
|
u8 signature[0x100];
|
||||||
u8 padding1[0x3C];
|
u8 padding1[0x3C];
|
||||||
u8 issuer[0x40];
|
u8 issuer[0x40];
|
||||||
u8 ecdsa[0x3C];
|
u8 ecdsa[0x3C];
|
||||||
u8 version;
|
u8 version;
|
||||||
u8 ca_crl_version;
|
u8 ca_crl_version;
|
||||||
u8 signer_crl_version;
|
u8 signer_crl_version;
|
||||||
u8 titlekey[0x10];
|
u8 titlekey[0x10];
|
||||||
u8 reserved0;
|
u8 reserved0;
|
||||||
u8 ticket_id[8];
|
u8 ticket_id[8];
|
||||||
u8 console_id[4];
|
u8 console_id[4];
|
||||||
u8 title_id[8];
|
u8 title_id[8];
|
||||||
u8 sys_access[2];
|
u8 sys_access[2];
|
||||||
u8 ticket_version[2];
|
u8 ticket_version[2];
|
||||||
u8 time_mask[4];
|
u8 time_mask[4];
|
||||||
u8 permit_mask[4];
|
u8 permit_mask[4];
|
||||||
u8 title_export;
|
u8 title_export;
|
||||||
u8 commonkey_idx;
|
u8 commonkey_idx;
|
||||||
u8 reserved1[0x2A];
|
u8 reserved1[0x2A];
|
||||||
u8 eshop_id[4];
|
u8 eshop_id[4];
|
||||||
u8 reserved2;
|
u8 reserved2;
|
||||||
u8 audit;
|
u8 audit;
|
||||||
u8 content_permissions[0x40];
|
u8 content_permissions[0x40];
|
||||||
u8 reserved3[2];
|
u8 reserved3[2];
|
||||||
u8 timelimits[0x40];
|
u8 timelimits[0x40];
|
||||||
u8 content_index[0xAC];
|
u8 content_index[0xAC];
|
||||||
} __attribute__((packed)) Ticket;
|
} __attribute__((packed)) Ticket;
|
||||||
|
|
||||||
|
@ -17,44 +17,44 @@
|
|||||||
|
|
||||||
// from: https://github.com/profi200/Project_CTR/blob/02159e17ee225de3f7c46ca195ff0f9ba3b3d3e4/ctrtool/tmd.h#L18-L59;
|
// from: https://github.com/profi200/Project_CTR/blob/02159e17ee225de3f7c46ca195ff0f9ba3b3d3e4/ctrtool/tmd.h#L18-L59;
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u8 id[4];
|
u8 id[4];
|
||||||
u8 index[2];
|
u8 index[2];
|
||||||
u8 type[2];
|
u8 type[2];
|
||||||
u8 size[8];
|
u8 size[8];
|
||||||
u8 hash[0x20];
|
u8 hash[0x20];
|
||||||
} __attribute__((packed)) TmdContentChunk;
|
} __attribute__((packed)) TmdContentChunk;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u8 index[2];
|
u8 index[2];
|
||||||
u8 cmd_count[2];
|
u8 cmd_count[2];
|
||||||
u8 hash[0x20];
|
u8 hash[0x20];
|
||||||
} __attribute__((packed)) TmdContentInfo;
|
} __attribute__((packed)) TmdContentInfo;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u8 sig_type[4];
|
u8 sig_type[4];
|
||||||
u8 signature[0x100];
|
u8 signature[0x100];
|
||||||
u8 padding[0x3C];
|
u8 padding[0x3C];
|
||||||
u8 issuer[0x40];
|
u8 issuer[0x40];
|
||||||
u8 version;
|
u8 version;
|
||||||
u8 ca_crl_version;
|
u8 ca_crl_version;
|
||||||
u8 signer_crl_version;
|
u8 signer_crl_version;
|
||||||
u8 reserved0;
|
u8 reserved0;
|
||||||
u8 system_version[8];
|
u8 system_version[8];
|
||||||
u8 title_id[8];
|
u8 title_id[8];
|
||||||
u8 title_type[4];
|
u8 title_type[4];
|
||||||
u8 group_id[2];
|
u8 group_id[2];
|
||||||
u8 save_size[4];
|
u8 save_size[4];
|
||||||
u8 twl_privsave_size[4];
|
u8 twl_privsave_size[4];
|
||||||
u8 reserved1[4];
|
u8 reserved1[4];
|
||||||
u8 twl_flag;
|
u8 twl_flag;
|
||||||
u8 reserved2[0x31];
|
u8 reserved2[0x31];
|
||||||
u8 access_rights[4];
|
u8 access_rights[4];
|
||||||
u8 title_version[2];
|
u8 title_version[2];
|
||||||
u8 content_count[2];
|
u8 content_count[2];
|
||||||
u8 boot_content[2];
|
u8 boot_content[2];
|
||||||
u8 reserved3[2];
|
u8 reserved3[2];
|
||||||
u8 contentinfo_hash[0x20];
|
u8 contentinfo_hash[0x20];
|
||||||
TmdContentInfo contentinfo[64];
|
TmdContentInfo contentinfo[64];
|
||||||
} __attribute__((packed)) TitleMetaData;
|
} __attribute__((packed)) TitleMetaData;
|
||||||
|
|
||||||
u32 ValidateTmd(TitleMetaData* tmd);
|
u32 ValidateTmd(TitleMetaData* tmd);
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
// see: http://3dbrew.org/wiki/3DS_Virtual_Console#NAND_Savegame
|
// see: http://3dbrew.org/wiki/3DS_Virtual_Console#NAND_Savegame
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u8 magic[4]; // ".SAV"
|
u8 magic[4]; // ".SAV"
|
||||||
u8 reserved0[0xC]; // always 0xFF
|
u8 reserved0[0xC]; // always 0xFF
|
||||||
u8 cmac[0x10];
|
u8 cmac[0x10];
|
||||||
u8 reserved1[0x10]; // always 0xFF
|
u8 reserved1[0x10]; // always 0xFF
|
||||||
|
@ -43,20 +43,20 @@ typedef struct {
|
|||||||
} __attribute__((packed)) NandPartitionInfo;
|
} __attribute__((packed)) NandPartitionInfo;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u32 offset;
|
u32 offset;
|
||||||
u32 size;
|
u32 size;
|
||||||
} __attribute__((packed)) NandNcsdPartition;
|
} __attribute__((packed)) NandNcsdPartition;
|
||||||
|
|
||||||
// see: https://www.3dbrew.org/wiki/NCSD#NCSD_header
|
// see: https://www.3dbrew.org/wiki/NCSD#NCSD_header
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u8 signature[0x100];
|
u8 signature[0x100];
|
||||||
u8 magic[4];
|
u8 magic[4];
|
||||||
u32 size;
|
u32 size;
|
||||||
u64 mediaId; // this is zero
|
u64 mediaId; // this is zero
|
||||||
u8 partitions_fs_type[8];
|
u8 partitions_fs_type[8];
|
||||||
u8 partitions_crypto_type[8];
|
u8 partitions_crypto_type[8];
|
||||||
NandNcsdPartition partitions[8];
|
NandNcsdPartition partitions[8];
|
||||||
u8 unknown[0x5E];
|
u8 unknown[0x5E];
|
||||||
u8 twl_mbr[0x42];
|
u8 twl_mbr[0x42];
|
||||||
} __attribute__((packed)) NandNcsdHeader;
|
} __attribute__((packed)) NandNcsdHeader;
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ typedef struct {
|
|||||||
u8 title_id[8];
|
u8 title_id[8];
|
||||||
u8 titlekey[16];
|
u8 titlekey[16];
|
||||||
u8 ticket_id[8];
|
u8 ticket_id[8];
|
||||||
u8 console_id[4];
|
u8 console_id[4];
|
||||||
u8 eshop_id[4];
|
u8 eshop_id[4];
|
||||||
} __attribute__((packed)) TickDbEntry;
|
} __attribute__((packed)) TickDbEntry;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user