Apploader

From WiiBrew
Jump to navigation Jump to search

Apploaders are small bits of code included on every disc that tell the System Menu what regions of the disc to load for the disc to be booted.

Each apploader has 4 functions: entry, init, main, and finalize. The entry function takes 3 pointers as arguments, and fills them with the init, main, and finalize functions[1]. 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.

Apploaders appear to have Revolution OS strings; this probably means dev units had Revolution OS directly linked with them, possibly similar to the NAND Boot Program.

An open-source apploader is available from HackMii.

References

1. https://github.com/dbarnett/wiimu/blob/a2bbe46a9b0af48be76564716a28a7b69aa77e74/source/disc.c#L322