wiithon.disc.structs.tmd_content module
One content entry of a Title Metadata block
A TMD ends with a list of these, one per content the title is made of. This module exposes TMDContent,
which is read and written by TMD and is not meant to be built alone
On a disc the list holds a single entry, index 0, that stands for the whole encrypted partition data
Layout, 0x24 bytes:
Offset Size Field
0x00 0x04 Content ID
0x04 0x02 Index
0x06 0x02 Type (0x0001: Normal, 0x4001: DLC, 0x8001: Shared)
0x08 0x08 Size
0x10 0x14 SHA-1 hash
References
https://wiibrew.org/wiki/Title_metadata
- class wiithon.disc.structs.tmd_content.TMDContent[source]
Bases:
objectA single content descriptor of a TMD
The Wii uses this to know the size of a content and to check it against its hash before booting it
Note
Nothing is validated at read time.
- classmethod read(stream)[source]
Read and parse a content entry from a binary stream
- Parameters:
stream (
BinaryIO) – Binary IO stream- Return type:
- Returns:
The parsed entry
- write(stream)[source]
Write the content entry to a binary stream at the current position
Note
sizeandhashare written as they are, nothing is recomputed. When building a disc they are patched afterwards on the serialised TMD byfakesign_tmd()