Line 176:
Line 176:
Sections are stored in backup WAD files in the same order from their headers (TMD, content data). Each section is aligned to a 0x40-byte boundary.
Sections are stored in backup WAD files in the same order from their headers (TMD, content data). Each section is aligned to a 0x40-byte boundary.
−
The included contents bitfield serves to determine which contents from the TMD are part of the backup WAD. Up to 512 different contents (bits) can be toggled, separated in groups of 8 contents (byte), where the LSB represents the first content from the group and the MSB represents the last content. Shared contents are usually not included. For example, the bitfield for a backup WAD that holds a TMD with 10 content records, where indexes 4 and 8 are both shared contents, would be <code>EF 02</code> (<code>11101111 00000010</code>).
+
The included contents bitfield serves to determine which contents from the TMD are part of the backup WAD. Up to 512 different contents (bits) can be toggled, separated in groups of 8 contents (byte), where the LSB represents the first content from the group and the MSB represents the last content. Shared contents are usually not included. For example, the bitfield for a backup WAD that holds a TMD with 10 content records, where indexes 4 and 8 are both shared contents, would be <code>EF 02</code> (<code>11101111 00000010</code>), followed by 62 zeroes.
The encrypted content data section is composed of content files, which are stored following the same order from the TMD content records. These are encrypted using the console-specific PRNG key and the content index as the IV (first two bytes, followed by 14 zeroes). The SHA-1 checksum of the decrypted content must match the hash from its corresponding TMD content record. Each content is individually aligned to a 0x40-byte boundary.
The encrypted content data section is composed of content files, which are stored following the same order from the TMD content records. These are encrypted using the console-specific PRNG key and the content index as the IV (first two bytes, followed by 14 zeroes). The SHA-1 checksum of the decrypted content must match the hash from its corresponding TMD content record. Each content is individually aligned to a 0x40-byte boundary.
Line 182:
Line 182:
In a hex editor, the beginning of any backup WAD will be <code>00 00 00 70 42 6B 00 01</code>. This can be useful to extract an embedded backup WAD from a bigger file (such as [[content.bin]] files).
In a hex editor, the beginning of any backup WAD will be <code>00 00 00 70 42 6B 00 01</code>. This can be useful to extract an embedded backup WAD from a bigger file (such as [[content.bin]] files).
−
Please note that, unlike <code>content.bin</code> files from channels, each DLC <code><index>.bin</code> file only holds a single encrypted content. This also means that a single bit from the entire included contents bitfield is enabled.
+
Please note that, unlike <code>content.bin</code> files from channels, each <code><index>.bin</code> file from transferred DLCs only holds a single encrypted content. This also means that a single bit from the entire included contents bitfield is enabled.
−
{{stub}}
[[Category:Software]]
[[Category:Software]]
[[Category:File formats]]
[[Category:File formats]]