HAI-Priiloader, A Bootloader For VC Injects

  • Thread starter Thread starter Karlmann
  • Start date Start date
  • Views Views 11,489
  • Replies Replies 89
  • Likes Likes 17

Karlmann

Active Member
Newcomer
Joined
Dec 26, 2024
Messages
37
Reaction score
65
Trophies
0
Age
24
XP
180
Country
United States
HAI-Priiloader uses a similar technique to that used by Priiloader to enable vWii support for enabling support in HAI-IOS used by vc injects. The COMBAT-BS ANCAST image is replaced with the BC-NAND ANCAST image, which boots priiloader in the same way that replacing the system menu ANCAST image with BC_NAND boots Priiloader in vWii.

Both methods boot the same binary, necessitating integrating HAI-Priiloader with Priiloader. HAI-Priiloader checks if the system is in HAI mode, indicated by the SSL module not being loaded, and if it is in HAI mode, load the SSL module and boot a title whose ID is hardcoded in fw.img The disc is booted by default when no titleID is found to retain compatibility to current injects.

This new ability to load modules into HAI-IOS and boot homebrew applications without booting the title in the virtual disc drive facilitates implementing the remaining stubborn functionality in HAI mode.

It should be possible to enable Wiimfii support with Mario Kart Wii injects.
Fakemote can be modified to register the gamepad as a Wii Remote, addressing gamepad compatibility issues in Newer Super Mario Bros Wii and the like.
With Riivolution's source code being available it is theoretically possible to run Riivolution in HAI-Mode, adding support for using the gamepad in Riivolution-based hacks. Riivolution's patches specific to the IOS 37 kernel would need to be reimplemented on the HAI-IOS kernel for this to work.

github repo: https://github.com/ymweiss/HAI-Priiloader

The current source code has some prints that are not needed but do not impact functionality. Additionally, due to the installation currently requiring manually modifying system files and only being useful for developers, no precompiled binaries are being provided.
 
Last edited by Karlmann,
@Karlmann Sorry for not replying to you in the Mario Kart gamepad thread. Im honestly not sure what needs to be implemented

BUT THANK YOU SO MUCH DUDE
 
Does this work to load WiiWare games on consoles without a disk drive? (In my case, I use a SATA SSD as internal memory)
 
@Karlmann Sorry for not replying to you in the Mario Kart gamepad thread. Im honestly not sure what needs to be implemented

BUT THANK YOU SO MUCH DUDE
Do you know if the problem is specifically within ES? I am not confident in being able to manually patch anything within ES.
One alternative that I am considering is replacing HAI-IOS's ES with ES from a cIOS, but modified to ensure requests to reload another IOS always result in HAI-IOS reloading itself.

I am not able to test anything due to not currently having access to my Wii U and the only way to "compile" cIOS that I know of is by using the d2x installer which does not run on dolphin.
 
Do you know if the problem is specifically within ES? I am not confident in being able to manually patch anything within ES.
One alternative that I am considering is replacing HAI-IOS's ES with ES from a cIOS, but modified to ensure requests to reload another IOS always result in HAI-IOS reloading itself.

I am not able to test anything due to not currently having access to my Wii U and the only way to "compile" cIOS that I know of is by using the d2x installer which does not run on dolphin.
Im not sure either. The reason WiiLink WFC didnt work on Wii VC was THREE distinct issues in ES_Sign code.
one issue was that opening /dev/es fails because ES has like a maximum of 4 handles open at once globally and somewhere in wii vc a handle is opened and never closed
mario kart wii opens an ES handle when checking if the mario kart channel is installed and never closes it it seems, but i believe that's intentional
2.
next issue: the device (NG) certificate is actually built on runtime by IOSC using the private key and device id from the OTP and ca id, ms id, timestamp, and ms signature from the SEEPROM. this has to always generate the same exact certificate, otherwise the pre generated MS certificate will be wrong
welll, for some reason in this version of ios, the padding at the end of the issuer name isn't cleared to zero, leaving a bunch of random (stack?) garbage there. i saw a bunch of FFFExxxx values which correspond to IOS kernel address pointers. this isn't a major issue as we can just remove the client side check and the server assumes those to the zero anyway
3.
next issue: this version of ios copies the timestamp from the NG certificate into the AP certificate (which is normally meant to be left 0). this one does affect the signature as it's hashed and signed by ES in the moment in the same function rather than being predetermined. to fix this i added a new field in the wwfc auth token signature for the AP timestamp (which is always 0 literally everywhere else!!!) anyways thats pretty much it.
This is what the Wii Link WFC developer said. Wii VC ios is fucked up.
 
  • Like
Reactions: MysticStarlight
Im not sure either. The reason WiiLink WFC didnt work on Wii VC was THREE distinct issues in ES_Sign code.


2.


3.

This is what the Wii Link WFC developer said. Wii VC ios is fucked up.
Regarding the first issue, does mario kart wii close the handle when not running under wii VC?

Separately, do you know how to obtain patched cIOS modules in a more efficient manner than installing the cIOS and then subsequently extracting its modules from the NAND?
UPDATE: It should be feasible to manually apply the patches using a hex editor; there are very few.
 
Last edited by Karlmann,
Regarding the first issue, does mario kart wii close the handle when not running under wii VC?

Separately, do you know how to obtain patched cIOS modules in a more efficient manner than installing the cIOS and then subsequently extracting its modules from the NAND?
I was gonna say ModMii, but i'm not sure if it can do vWii cIOSes. @XFlak
 
Regarding the first issue, does mario kart wii close the handle when not running under wii VC?

Separately, do you know how to obtain patched cIOS modules in a more efficient manner than installing the cIOS and then subsequently extracting its modules from the NAND?
UPDATE: It should be feasible to manually apply the patches using a hex editor; there are very few.
I am not sure but i think it does close when not in VC. Again i dont have much knowledge with this sorry
 
What backups do i need before i should try installing this? Im interested (HAI- Priiloader)
Be sure you have OHBC installed.
I would recommend backing up OSv1 (you should have if you created a vc inject, the vWii system menu (though Decaffeinator works for restoring this one).

The main application that should work is the Wiimfii disc patcher.
 
Be sure you have OHBC installed.
I would recommend backing up OSv1 (you should have if you created a vc inject, the vWii system menu (though Decaffeinator works for restoring this one).

The main application that should work is the Wiimfii disc patcher.
OK I have OHBC installed
How do i back up the OSv1?
Im assuming you mean a vc inject of the OHBC?
 
OK I have OHBC installed
How do i back up the OSv1?
Im assuming you mean a vc inject of the OHBC?
I mean having OHBC installed on vWii.
If you used Teconmoons injector OSv1 should already be in C:\ProgramData\JNUSToolDownloads\0005001010004001\code\boot.bin
Post automatically merged:

Im not sure either. The reason WiiLink WFC didnt work on Wii VC was THREE distinct issues in ES_Sign code.


2.


3.

This is what the Wii Link WFC developer said. Wii VC ios is fucked up.
The issue is not with ES as it is byte for byte identical to ES from IOS 56
 
Last edited by Karlmann,

Site & Scene News

Popular threads in this forum