diff --git a/source/filesys/vff.h b/source/filesys/vff.h index ffee4dd..406e100 100644 --- a/source/filesys/vff.h +++ b/source/filesys/vff.h @@ -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) diff --git a/source/game/cia.h b/source/game/cia.h index 2d56410..129be4a 100644 --- a/source/game/cia.h +++ b/source/game/cia.h @@ -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]; diff --git a/source/game/ncsd.h b/source/game/ncsd.h index 84b3ea5..74a3d0a 100644 --- a/source/game/ncsd.h +++ b/source/game/ncsd.h @@ -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); diff --git a/source/game/nds.h b/source/game/nds.h index d5c74c5..844cb7c 100644 --- a/source/game/nds.h +++ b/source/game/nds.h @@ -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; diff --git a/source/game/ticket.h b/source/game/ticket.h index 7ac4f6b..293f56e 100644 --- a/source/game/ticket.h +++ b/source/game/ticket.h @@ -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; diff --git a/source/game/tmd.h b/source/game/tmd.h index 8d44d05..6a75ec1 100644 --- a/source/game/tmd.h +++ b/source/game/tmd.h @@ -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); diff --git a/source/nand/agbsave.h b/source/nand/agbsave.h index 1ae2d6a..cbd4b4b 100644 --- a/source/nand/agbsave.h +++ b/source/nand/agbsave.h @@ -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 diff --git a/source/nand/nand.h b/source/nand/nand.h index 184e9da..d262c37 100644 --- a/source/nand/nand.h +++ b/source/nand/nand.h @@ -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; diff --git a/source/virtual/vtickdb.c b/source/virtual/vtickdb.c index e967bd3..e1156de 100644 --- a/source/virtual/vtickdb.c +++ b/source/virtual/vtickdb.c @@ -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;