Title

From WiiBrew
(Redirected from Title ID)
Jump to navigation Jump to search

A title is an executable installed on the Wii, installed to /title. Titles include the System Menu, IOS, and channels. Each title has a TMD and a ticket that are used for installation and launching. Titles have their contents stored as separate files in a common directory.

While boot2 is stored in WAD format, it is not installed to /title, instead being installed to the first few blocks of the NAND.

Discs are also treated as titles, as they have their own title ID used for save data, as well as an installable channel if they have one.

Title IDs

A Title-ID is a 64-bit number that uniquely identifies a title. The high 32 bits are used to indicate the type of title, and the low 32 bits are used to identify the particular title. The title is installed to /title/HIGHBITS/LOWBITS/.

By convention, a Title-ID may either be written as 16 hex digits (e.g. 0000000100000002 or 00010000525a4445) or in two hexadecimal or ASCII parts (e.g. 1-2 or 10000-RZDE). The ASCII part is often written alone, due to there being no ambiguity with the other high 32 bits.

Types of titles

The upper half of each title ID identifies the type of the title.

  • 00000001 indicates that this is a system title. This is given to boot2, the System Menu, every IOS, BC, MIOS, BC-NAND, and BC-WFS.
  • 00010000 is used for discs that don't install channels.
  • 00010001 is used for channels downloaded from the Wii Shop Channel.
  • 00010002 is used for preinstalled/update channels (most channels with a CETK are here)
  • 00010003 is unconfirmed, but a string for /title/00010003 can be found in the System Menu. One person has reported having a Nintendo Channel ticket with type 00010003, although the standard Nintendo channel uses type 00010001.
  • 00010004 is used for discs that install channels, as well as the channels installed by them.
  • 00010005 is used for DLC
  • 00010006 is similar to 00010003, but no channel has been reported with this type
  • 00010007 is the same as 0001006
  • 00010008 is used by hidden channels, for example, EULA and rgnsel.

This appears to be some sort of bitmap, where the last bit means the title came from the Wii Shop Channel (00010001 and 00010005), the second last bit means the title is a public/free channel (00010002), the third last bit means it is addon content (00010004 and 00010005), and the fourth last bit means it is internal. This means 00010003 is both public/free and came from the Wii Shop Channel, something that has not yet been seen, as free channels on the Wii Shop Channel are still given personalized tickets. 00010006 would be public addon content, possibly for disc updates. 00010007 would be addon content in a similar state to 00010003.

Launching

Titles are handled by the ES module of IOS. Titles can be launched with the ES_LaunchTitle call, which requires a title ID and a ticket. Signatures are not checked in this case, as it is assumed they are valid if the title got installed to the NAND.

Filesystem

Files related to title A-B are stored under /title/A/B/, where A and B are in hex, padded to 8 characters with leading zeros. The following locations exist:

/content/title.tmd - the TMD for this title

/content/C.app - the content with content ID C, where C is padded like the title ID.

/data/ - save data filesystem. Exact structure depends on the title itself.

Contents

Titles are subdivided into contents, which can be referred to both by their content ID and index; while index is used for all purposes surrounding the IOS interface, the ID is used internally in the filesystem and on NUS.

In general, titles start with content indices matching the IDs, but because content IDs are independent of version, when a content requires updating, its ID is replaced with the next available ID. The newer TMD is then changed to use this new content ID for the given index.

Indices themselves are used for both the "boot index" field in the TMD, as well as the ES_OpenContent ioctl.

Content usage

For installed channels:

  • The content in the "boot index" field directs to the NAND Boot Program.
  • Content index 0 stores the 0x40 byte build tag (optional) and banner data, including the animation and the localised titles.
  • Content index 1 stores the DOL file to be launched by the boot program, sometimes LZ11 compressed.

For DLC:

  • Content index 0 is used to store a 0x40 byte build tag (optional) and the banner to display in the Data Management menu.

For System Menu

  • The content in the "boot index" field directs to the main binary
    • Just like other boot programs (as well as the Homebrew Channel and Priiloader), this content is a DOL that contains both the common BS code and the main code in a data section
  • Content index 0 is used to store a 0x40 byte build tag (optional)

Types of contents

Each content has a "type" field that can have one of several values:

  • Type 0x0001 is a "normal" content.
  • Type 0x0002 is a content type seen on a few development discs. 121J and 0000dead both have a 4-byte content that was found to be 0xADDEFECA (0xCAFEDEAD in opposite endian), but because physical 121J discs have been run, it is clear that this is not the real content; the real content is probably not hash checked.
  • Type 0x0003 means the content is verified using a hash tree. This is typically used on discs, where the hash tree is the only content.
  • Type 0x4001 is used by DLC contents. It seems to mean title installation can still be finished if the content is absent.
  • Type 0x8001 is shared between titles. Using this type will cause it to be installed into /shared1 instead of TITLE/content.

System version

The TMD contains a field called "system version" that has a different meaning for different types of titles:

  • For boot2, the upper half is 0, and the lower half is identical to the TMD version. The bottom half is compared against the version in SEEPROM to detect a downgrade.
  • For IOS, the upper half is 0, and the lower half is the minimum boot2 version needed, although it has only been seen to be 0, meaning boot2v0 is the minimum.
  • For Broadway titles, this is the title ID of the IOS that it runs under. IOS does not actually verify that the title ID there is an IOS; setting it to another Broadway title causes the title to forward to the other title.