|This article is a stub. You can help WiiBrew by expanding it.|
|This article may be improved with information from Yet Another GameCube Documentation. You can help WiiBrew by expanding this article with the information and wikifying it.|
Apploaders are small stubs bundled with every app, responsible for loading the rest of the app and executing it. For this reason, all homebrew titles installed to NAND must have an unofficial apploader. An open-source apploader is available from HackMii.
One common apploader is the NANDLoader, used to boot most channels.
Disc apploaders are called by the System Menu. The
entry function takes 3 pointers as arguments, and fills them with the
init takes a print function as an argument and returns nothing. Meanwhile,
main takes 3 pointers, which get filled with arguments to pass to DVDLowRead, and keeps getting called until it returns something other than 1.
finalize takes no arguments, but returns the entrypoint, which the System Menu then jumps to.
The NANDLoader is a small bit of code in every channel that initializes the Broadway and then jumps to the main function of the executable. It is an example of an apploader, used for channels.
On the Wii the NANDLoader is included in a title's main binary ( app, in dol format). It is usually the first text section and should always be written to 0x80003400 (PowerPC reset vector)[check]. The NANDLoader should initialize the PowerPC and jump to the binary's main function.
On the vWii, because the Espresso only boots Ancast Images, the NANDLoader must be signed. Nintendo solved this by adding title 1-512 as a NANDLoader. When launching a title other than the System Menu, IOS will start this NANDLoaders to initialize the PowerPC. This NANDLoader in turn loads the title's main binary and jumps straight to it's entrypoint, skipping the title's NANDLoader which is included in title's binary.
Because the Homebrew Channel had its own NANDLoader, fail0verflow never bothered to set an entrypoint, as the custom NANDLoader knew where to jump. This resulted in the channel initially not being compatible with vWii. fail0verflow solved this by adding an entrypoint to the dol header. This resulted in the channel's NANDLoader being run on the Wii, and skipped in vWii.
Starlet ELF Loader
This is a small stub present in boot2 and every IOS, in the same binary as the kernel, responsible for loading the kernel itself. Like with PowerPC apploaders, this software is required as an intermediate step.