Line 2:
Line 2:
{{yagcd}} <!-- http://hitmen.c02.at/files/yagcd/yagcd/chap13.html#sec13.3 and http://hitmen.c02.at/files/yagcd/yagcd/chap18.html#sec18.2.3 -->
{{yagcd}} <!-- http://hitmen.c02.at/files/yagcd/yagcd/chap13.html#sec13.3 and http://hitmen.c02.at/files/yagcd/yagcd/chap18.html#sec18.2.3 -->
−
'''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 [https://hackmii.com/2008/08/open-source-apploader-iso-template/ HackMii].
+
'''Apploaders''' are small stubs bundled with every app, responsible for loading the rest of the app and executing it.
== Disc Apploader ==
== Disc Apploader ==
Disc apploaders are called by the [[System Menu]]. The <code>entry</code> function takes 3 pointers as arguments, and fills them with the <code>init</code>, <code>main</code>, and <code>finalize</code> functions{{Ref|https://github.com/dbarnett/wiimu/blob/a2bbe46a9b0af48be76564716a28a7b69aa77e74/source/disc.c#L322}}. <code>init</code> takes a print function as an argument and returns nothing. Meanwhile, <code>main</code> takes 3 pointers, which get filled with arguments to pass to DVDLowRead, and keeps getting called until it returns something other than 1. <code>finalize</code> takes no arguments, but returns the entrypoint, which the System Menu then jumps to.
Disc apploaders are called by the [[System Menu]]. The <code>entry</code> function takes 3 pointers as arguments, and fills them with the <code>init</code>, <code>main</code>, and <code>finalize</code> functions{{Ref|https://github.com/dbarnett/wiimu/blob/a2bbe46a9b0af48be76564716a28a7b69aa77e74/source/disc.c#L322}}. <code>init</code> takes a print function as an argument and returns nothing. Meanwhile, <code>main</code> takes 3 pointers, which get filled with arguments to pass to DVDLowRead, and keeps getting called until it returns something other than 1. <code>finalize</code> takes no arguments, but returns the entrypoint, which the System Menu then jumps to.
+
+
An open-source disc apploader is available from [https://hackmii.com/2008/08/open-source-apploader-iso-template/ HackMii].
== NANDLoader ==
== NANDLoader ==