- This article is about Wii software packaging. For the data files used by Doom, see WiiDoom.
The WAD file-format is a file-format that contains information for the Wii, such as System Menus, IOS's, and Channels.
Unfortunately, WAD files are often used to distribute pirated channels (both Virtual Console and WiiWare), due to the fact that they are also used by Nintendo and therefore easy to rip from the Wii and, for some WAD files, Nintendo's servers, and easy to create installers for. Wiibrew does not in any way endorse piracy, and as such these uses of WAD files should not be discussed.
If you wish to discuss legitimate WAD files, please ensure you make clear which file you are talking about and what you will use it for, to prevent people jumping to conclusions about your intentions.
WAD files are often installed in the Wii System Menu to appear as channels, making launching easier. If a WiiBrew app isn't installed as a channel, it can usually only be launched from the Homebrew Channel itself. WAD file creation seems to be an intricate process and tools are difficult to locate, and most are based on the .NET framework. Associated with WAD file generation are forwarders, which when loaded simply load another arbitrary application. A common technique is to use a somewhat generalized WAD that can be easily customized to then forward to another WiiBrew application stored on the SD card.
Wii System Channel WAD files exist for WiiMC, ftpii, and numerous others.
Forwarders are somewhat easier to locate, a common one being the Narolez-NForwarder, for which source exists and is easily modifiable. One WAD generation system that still appears to be active is the system that appears to be .NET based. The Wadder system also seemed to be .NET based but it appears abandoned. Although these tools are often associated with piracy, there are clearly legitimate uses for them as well.
The WAD files themselves contain either still images or a collection of images to be animated, as well as sound data. In addition there is a .DOL file for the program to be run when launched.
The data within a WAD file has the following format.
Thanks to Segher for his source.
|0x000||0x003||4||Header size = 0x0020|
|0x004||0x007||4||WAD Type ('Is\0\0' or 'ib\0\0' or 'Bk\0\0')|
|0x008||0x00B||4||Certificate chain size.|
|0x00C||0x00F||4||Reserved = 0|
|0x018||0x01B||4||Data (APP) size|
The sections are stored in the WAD in the same order that in the header. Each block (header, sections) is aligned to 0x40 bytes.
The contents are stored in the WAD in the same order as in the TMD. Each file is aligned to 0x40 bytes.
The contents (Data section) are encrypted using the title key (decrypt it from the ticket) and the content index (in the TMD, the 2 first bytes of the IV are the index, the last 14 bytes are zeroes) as IV. The SHA1 of the decrypted content must match the hash that is stored in the TMD.
In a hex editor, the beginning of any WAD will be 00 00 00 20 49 73. This can be useful to remove a WAD from an ELF file.
The "footer" is an optional, unencrypted timestamp / buildstamp.
|This article is a stub. You can help WiiBrew by expanding it.|