NANDLoader: Difference between revisions

From WiiBrew
Jump to navigation Jump to search
Hallowizer (talk | contribs)
m Merged with apploader
Tag: New redirect
Hallowizer (talk | contribs)
Moved the stuff back here, since it's not an apploader
Tag: Removed redirect
Line 1: Line 1:
#redirect [[Apploader#NANDLoader]]
{{Ambox|type=content|text=This page is a mess, and should not be relied on for information; there is a lot of confusion between BS1 and the boot program. You may be looking for [[NAND Boot Program]] for information on the 0x48000-byte loader that gets loaded to 0x81330000.}}
 
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.
 
There are open source tools available to inject a NANDLoader into regular binaries like {{User|DacoTaco}}'s [[OpenDolBoot]].
 
=== Wii ===
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.
 
=== vWii ===
On the [[vWii]], because the [https://wiiubrew.org/wiki/Espresso Espresso] only boots [https://wiiubrew.org/wiki/Ancast_Image Ancast Images], the NANDLoader must be signed. Nintendo solved this by adding title 1-512 (known as '''BC-NAND''') as a NANDLoader. When launching a title other than the [[System Menu]], IOS will start this NANDLoader 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.

Revision as of 08:25, 16 January 2022

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.

There are open source tools available to inject a NANDLoader into regular binaries like DacoTaco's OpenDolBoot.

Wii

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.

vWii

On the vWii, because the Espresso only boots Ancast Images, the NANDLoader must be signed. Nintendo solved this by adding title 1-512 (known as BC-NAND) as a NANDLoader. When launching a title other than the System Menu, IOS will start this NANDLoader 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.