Fixed several cases of stray tabs

This commit is contained in:
d0k3 2017-10-03 01:46:52 +02:00
parent 641b2c3a1a
commit a18875ea35
9 changed files with 86 additions and 86 deletions

View File

@ -3,7 +3,7 @@
#include "common.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_size(fp) ((fp)->obj.objsize)

View File

@ -10,7 +10,7 @@
// see: https://www.3dbrew.org/wiki/CIA#Meta
typedef struct {
u8 dependencies[0x180]; // from ExtHeader
u8 dependencies[0x180]; // from ExtHeader
u8 reserved0[0x180];
u32 core_version; // 2 normally
u8 reserved1[0xFC];

View File

@ -15,25 +15,25 @@
#define EncryptNcsdSequential(data, offset, size, crypto) CryptNcsdSequential(data, offset, size, crypto)
typedef struct {
u32 offset;
u32 size;
u32 offset;
u32 size;
} __attribute__((packed)) NcchPartition;
// see: https://www.3dbrew.org/wiki/NCSD#NCSD_header
typedef struct {
u8 signature[0x100];
u8 magic[4];
u32 size;
u64 mediaId;
u8 partitions_fs_type[8];
u8 partitions_crypto_type[8];
NcchPartition partitions[8];
u8 hash_exthdr[0x20];
u8 size_addhdr[0x4];
u8 sector_zero_offset[0x4];
u8 partition_flags[8];
u8 partitionId_table[8][8];
u8 reserved[0x30];
u8 signature[0x100];
u8 magic[4];
u32 size;
u64 mediaId;
u8 partitions_fs_type[8];
u8 partitions_crypto_type[8];
NcchPartition partitions[8];
u8 hash_exthdr[0x20];
u8 size_addhdr[0x4];
u8 sector_zero_offset[0x4];
u8 partition_flags[8];
u8 partitionId_table[8][8];
u8 reserved[0x30];
} __attribute__((packed)) NcsdHeader;
u32 ValidateNcsdHeader(NcsdHeader* header);

View File

@ -62,26 +62,26 @@ typedef struct {
u8 rom_version;
u8 autostart; // bit2: skip "press button" after Health & Safety
u32 arm9_rom_offset;
u32 arm9_entry_address;
u32 arm9_ram_address;
u32 arm9_size;
u32 arm7_rom_offset;
u32 arm7_entry_address;
u32 arm7_ram_address;
u32 arm7_size;
u32 arm9_entry_address;
u32 arm9_ram_address;
u32 arm9_size;
u32 arm7_rom_offset;
u32 arm7_entry_address;
u32 arm7_ram_address;
u32 arm7_size;
u32 fnt_offset;
u32 fnt_size;
u32 fat_offset;
u32 fat_size;
u32 arm9_overlay_offset;
u32 arm9_overlay_size;
u32 arm7_overlay_offset;
u32 arm7_overlay_size;
u32 rom_control_normal; // 0x00416657 for OneTimePROM
u32 rom_control_key1; // 0x081808F8 for OneTimePROM
u32 icon_offset;
u16 secure_area_crc;
u16 secure_area_delay;
u32 arm9_overlay_size;
u32 arm7_overlay_offset;
u32 arm7_overlay_size;
u32 rom_control_normal; // 0x00416657 for OneTimePROM
u32 rom_control_key1; // 0x081808F8 for OneTimePROM
u32 icon_offset;
u16 secure_area_crc;
u16 secure_area_delay;
u32 arm9_auto_load;
u32 arm7_auto_load;
u64 secure_area_disable;

View File

@ -29,31 +29,31 @@
// from: https://github.com/profi200/Project_CTR/blob/02159e17ee225de3f7c46ca195ff0f9ba3b3d3e4/ctrtool/tik.h#L15-L39
typedef struct {
u8 sig_type[4];
u8 signature[0x100];
u8 padding1[0x3C];
u8 issuer[0x40];
u8 ecdsa[0x3C];
u8 signature[0x100];
u8 padding1[0x3C];
u8 issuer[0x40];
u8 ecdsa[0x3C];
u8 version;
u8 ca_crl_version;
u8 signer_crl_version;
u8 titlekey[0x10];
u8 reserved0;
u8 ticket_id[8];
u8 console_id[4];
u8 title_id[8];
u8 sys_access[2];
u8 ticket_version[2];
u8 time_mask[4];
u8 permit_mask[4];
u8 title_export;
u8 commonkey_idx;
u8 titlekey[0x10];
u8 reserved0;
u8 ticket_id[8];
u8 console_id[4];
u8 title_id[8];
u8 sys_access[2];
u8 ticket_version[2];
u8 time_mask[4];
u8 permit_mask[4];
u8 title_export;
u8 commonkey_idx;
u8 reserved1[0x2A];
u8 eshop_id[4];
u8 reserved2;
u8 audit;
u8 content_permissions[0x40];
u8 reserved3[2];
u8 timelimits[0x40];
u8 content_permissions[0x40];
u8 reserved3[2];
u8 timelimits[0x40];
u8 content_index[0xAC];
} __attribute__((packed)) Ticket;

View File

@ -17,44 +17,44 @@
// from: https://github.com/profi200/Project_CTR/blob/02159e17ee225de3f7c46ca195ff0f9ba3b3d3e4/ctrtool/tmd.h#L18-L59;
typedef struct {
u8 id[4];
u8 index[2];
u8 id[4];
u8 index[2];
u8 type[2];
u8 size[8];
u8 hash[0x20];
} __attribute__((packed)) TmdContentChunk;
typedef struct {
u8 index[2];
u8 cmd_count[2];
u8 hash[0x20];
u8 index[2];
u8 cmd_count[2];
u8 hash[0x20];
} __attribute__((packed)) TmdContentInfo;
typedef struct {
u8 sig_type[4];
u8 signature[0x100];
u8 padding[0x3C];
u8 issuer[0x40];
u8 padding[0x3C];
u8 issuer[0x40];
u8 version;
u8 ca_crl_version;
u8 signer_crl_version;
u8 reserved0;
u8 system_version[8];
u8 title_id[8];
u8 title_type[4];
u8 group_id[2];
u8 save_size[4];
u8 twl_privsave_size[4];
u8 reserved1[4];
u8 twl_flag;
u8 reserved2[0x31];
u8 access_rights[4];
u8 title_version[2];
u8 content_count[2];
u8 boot_content[2];
u8 reserved3[2];
u8 contentinfo_hash[0x20];
TmdContentInfo contentinfo[64];
u8 reserved0;
u8 system_version[8];
u8 title_id[8];
u8 title_type[4];
u8 group_id[2];
u8 save_size[4];
u8 twl_privsave_size[4];
u8 reserved1[4];
u8 twl_flag;
u8 reserved2[0x31];
u8 access_rights[4];
u8 title_version[2];
u8 content_count[2];
u8 boot_content[2];
u8 reserved3[2];
u8 contentinfo_hash[0x20];
TmdContentInfo contentinfo[64];
} __attribute__((packed)) TitleMetaData;
u32 ValidateTmd(TitleMetaData* tmd);

View File

@ -22,7 +22,7 @@
// see: http://3dbrew.org/wiki/3DS_Virtual_Console#NAND_Savegame
typedef struct {
u8 magic[4]; // ".SAV"
u8 magic[4]; // ".SAV"
u8 reserved0[0xC]; // always 0xFF
u8 cmac[0x10];
u8 reserved1[0x10]; // always 0xFF

View File

@ -43,20 +43,20 @@ typedef struct {
} __attribute__((packed)) NandPartitionInfo;
typedef struct {
u32 offset;
u32 size;
u32 offset;
u32 size;
} __attribute__((packed)) NandNcsdPartition;
// see: https://www.3dbrew.org/wiki/NCSD#NCSD_header
typedef struct {
u8 signature[0x100];
u8 magic[4];
u32 size;
u64 mediaId; // this is zero
u8 partitions_fs_type[8];
u8 partitions_crypto_type[8];
NandNcsdPartition partitions[8];
u8 unknown[0x5E];
u8 signature[0x100];
u8 magic[4];
u32 size;
u64 mediaId; // this is zero
u8 partitions_fs_type[8];
u8 partitions_crypto_type[8];
NandNcsdPartition partitions[8];
u8 unknown[0x5E];
u8 twl_mbr[0x42];
} __attribute__((packed)) NandNcsdHeader;

View File

@ -15,7 +15,7 @@ typedef struct {
u8 title_id[8];
u8 titlekey[16];
u8 ticket_id[8];
u8 console_id[4];
u8 console_id[4];
u8 eshop_id[4];
} __attribute__((packed)) TickDbEntry;