Hacking Priiloader 0.9 Released!

DacoTaco

Well-Known Member
Member
Joined
Oct 8, 2017
Messages
166
Trophies
0
XP
883
Country
Antarctica
tl;dr : Priiloader 0.9.1 is online and can be downloaded through Priiloader's 'Check for updates' menu.
you can also download it & the updated hacks file containing the new hacks @ https://github.com/DacoTaco/priiloader/releases/tag/0.9.1

Hey guys,

It's been a while, and it has been a journey in the last few months when we were working on this but here is Priiloader 0.9!
its full of reworks and changes & works completely on any wii.
you are free to verify & check it out. As for the changes i will explain this in 2 parts. Please let me know if you like this in detail talk that is below. Let's start with the actual changelog :

(version name still under construction)
Code:
# v0.9.1 : Flex Tape time!
### Fixes & Improvements
* fixed possible caching issue when clearing a dol's BSS
* fixed crash when 18 hacks would be shown in the hacks menu
* fixed crash when 18 dol/elfs would be shown in the binaries menu
* fixed crash when 18 titles would be shown in the launch title menu
* fixed loading dol/elf arguments from nand if there are none
* fixed some memory leaks       
* show error when user tries to enter menu using front buttons but is denied access

# v0.9 : Itsa Prii, can't get rid of mii
### Fixes & Improvements
* Reworked dol & SysMenu loading code.
  * We can load -any- dol or elf now
  * this removes the entrypoint restriction
* Fixed setting dol arguments
* Reworked the hacks parser & loading code
* Changed Priiloader's Nand bootcode
* Installer source is open source again
* Added decent vWii detection code to the installer
* Fixed a few online beta update version display bugs
* restart checking controllers if launching HBC failed
* libogc upgrade to 2.1.0
  * Improved keyboard compatibility
  * Improved 420p video output
* fixed loading binary arguments
* Reduce Priiloader size by loading the certs of NAND
      
### New Features
* Added the first wii-mini hacks
* Added option to use front buttons to navigate
* Added offset support in the hacks
* Added support for comments in the hacks
* Added USB Keyboard support
  * Meant for wii-mini
  * Works on all Wii's
  * Mapping is as follows :
    * A = Enter
    * B = Esc
    * X = X
    * Y = Y
    * Start = Spacebar
    * Arrow keys : directions
  * Hold escape to stop autoboot and enter the menu




Ok, so lets go in more detail, shall we?


first off all, the front panel buttons.
Ive always been against them getting functionality in Priiloader cause it was confusing to have select enter priiloader but also be a button to enter a menu (like system menu). however, to help a few people i added it in version 0.8.3 beta 1. this was sloppy work however and was properly implemented in 0.9


The main event of Priiloader 0.9 is the reworking of the hacks parsing. i was approached by Leseratte10 to aid him in allowing Priiloader to alter System menu and patch a game on start to automatically connect to Wiimmfi instead of the nintendo service which has been offline for a while.

For this to work we had to re-introduce the 'offset' segment in the hacks file. I did, but it works different this time.
imagine the following hack :
Code:
[Offset test]
#comment test
minversion=1
maxversion=9999
offset=80003400
patch=0x48003402
patch=0x12345678, 0x90123456

this hack would write 0x48003402 to address 0x80003400 , 0x12345678 to 0x80003404 and 0x90123456 to 0x80003408 for System Menu versions 1 until 9999 (resulting in SM getting stuck, but i digress ).
And yes, you can see that correctly. multiple patch lines are allowed now, which makes it possible to make a hack that does a lot more then just patch System Menu's binary.
As seen in the test hack, I also added the possibility to add comments using the # character.
But we will all get to see examples of that later, but don't let it stop you from doing stuff to System menu already!


Next up : the new loader.
During the development of the hacks we noticed that booting system menu became harder and harder as loading system menu would overwrite Priiloader and crash the system.
I solved this by introducing the loader. All dol/elf loading (this includes System Menu) has been moved to a standalone binary called loader (herp die derp) .
Priiloader will now load the loader & read the binary to mem2 and execute the loader. the loader will then do what needs to be done and loads the binary (and applies the offset hacks for system menu). this means that Priiloader can start all binaries even the ones which run in the same memory space as Priiloader.
Technically this kills any need for forwarders to be required, but i know they will keep being used so they can easily update their /shivers Usbloaders


Whats next? USB Keyboard support!
Fullmetal5 changed Priiloader to have support for USB Keyboards. this is meant so that Wii-Mini users can access & navigate the Priiloader menu without a wiimote.
The mapping of the buttons are in the changelog above.
Holding escape during boot will show the priiloader menu.
This change works, but testing is required. his usb keyboard worked perfectly, but my Logitech G710+ responded to slow to allow it to stop the autoboot.
my comfort curve 2000 however worked perfectly too.


Next up : Priiloader's system init code.
When on the wii a channel is booted, it first runs certain code that will init the system.
In the Priiloader build this gets injected in the dol by our OpenDolBoot tool.
Since forever we have injected the System menu's code in priiloader thou & this has been changed into HBC's code.
The tool has also been reworked AND makes .app files that are bootable both on the Wii and on vWii ! (but not under vWii's system menu's title. this is explained why here )
I also fixed 2 minor bugs with the vWii detection in the installer and a visual bug in the online beta screen which you will see later (it'll say 0.90 beta 1, oops)


... i think thats it! xD
i'd say enjoy, and feedback is always welcome on github or this thread!


DacoTaco, OUT
 
Last edited by DacoTaco,

DacoTaco

Well-Known Member
Member
Joined
Oct 8, 2017
Messages
166
Trophies
0
XP
883
Country
Antarctica
if requested,i will upload a dol to github.
Thanks for continuing developing this tool!
I would request this please :), also for offline installation / archive purposes.
Ditto. Thanks Daco!
ill be honest, i have mixed feelings about this. these binaries are not meant for redistributing and im heavily against it too, you know that. (but i have no trouble with archiving! i save a lot of shit myself lol)

iirc modmii redistributes modded versions of priiloader too...
 
Last edited by DacoTaco,

XFlak

Wiitired but still kicking
Member
Joined
Sep 12, 2009
Messages
11,707
Trophies
2
Age
35
Location
Cyprus, originally from Toronto
Website
modmii.github.io
XP
5,150
Country
Cyprus
ModMii uses a version of priiloader with a modded installer to force it to run under IOS236. Does the official installer have a 236 option? Or is the ahbprot installer pretty much 100% safe from the network init hbc bug when using ahbprot? I know there was a risk once upon a time and work around established to avoid ahbprot crashes 99% of the time but this is as all I remember on the subject (and when I researched it recently I never found evidence that it was fully resolved) so I just kept the 236 installer mod to be safe.

If newer official installers are just as safe I have no problem switching to your official fork, in fact all else being equal I would make the switch just because it's your preference and you're the dev in charge so why wouldn't I follow your lead. Just bear in mind it may be awhile until I get around to a modmii update because I'm extremely busy IRL and it's just not a priority at the moment.
 
Joined
Nov 8, 2018
Messages
13,539
Trophies
3
Age
51
Location
Austria
XP
16,385
Country
Austria
Thank you for your Work and your Update.:bow:

I am looking forward to the Update.

Unfortunately the Priiloader v0.8.3(beta v1) says:

P1360127.JPG P1360128.JPG P1360130.JPG P1360131.JPG

Thank you.:)
 
  • Like
Reactions: jeannotte

urherenow

Well-Known Member
Member
Joined
Mar 8, 2009
Messages
3,880
Trophies
1
Age
45
Location
Japan
XP
2,375
Country
United States
Neat! Haven't fired up my Wii in years. Strangely enough, it's been almost as long since I've fired up my WiiU.

So, for those who started rolling your own since installing tools with pacman/dkp-pacman made things so much easier, here's what's needed.

1) (dkp-)pacman -S devkitPPC libogc libfat-ogc gamecube-tools
2) You need to dump your NAND (or otherwise access it) and take sys/cert.sys, copy it to priiloader/data, and rename it to certs.bin


@DacoTaco, thanks for the update, and whoa... there are a lot of warnings when I build this. Stuff like:

Code:
/home/urherenow/projects/priiloader/Installer/source/main.cpp:647:22: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'u32' {aka 'unsigned int'} [-Wformat=]
/home/urherenow/projects/priiloader/Installer/source/main.cpp:656:22: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'u32' {aka 'unsigned int'} [-Wformat=]
   sprintf(file_path, "/title/%08lx/%08lx/data/hacks_s.ini",(u32)(title_id >> 32),(u32) (title_id & 0xFFFFFFFF));
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
/home/urherenow/projects/priiloader/Installer/source/main.cpp:656:22: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'u32' {aka 'unsigned int'} [-Wformat=]
/home/urherenow/projects/priiloader/Installer/source/main.cpp:662:22: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'u32' {aka 'unsigned int'} [-Wformat=]
   sprintf(file_path, "/title/%08lx/%08lx/data/hacks.ini",(u32)(title_id >> 32),(u32) (title_id & 0xFFFFFFFF));
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
/home/urherenow/projects/priiloader/Installer/source/main.cpp:662:22: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'u32' {aka 'unsigned int'} [-Wformat=]
/home/urherenow/projects/priiloader/Installer/source/main.cpp:668:22: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'u32' {aka 'unsigned int'} [-Wformat=]
   sprintf(file_path, "/title/%08lx/%08lx/data/hacksh_s.ini",(u32)(title_id >> 32),(u32) (title_id & 0xFFFFFFFF));
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
/home/urherenow/projects/priiloader/Installer/source/main.cpp:668:22: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'u32' {aka 'unsigned int'} [-Wformat=]
/home/urherenow/projects/priiloader/Installer/source/main.cpp:674:22: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'u32' {aka 'unsigned int'} [-Wformat=]
   sprintf(file_path, "/title/%08lx/%08lx/data/hackshas.ini",(u32)(title_id >> 32),(u32) (title_id & 0xFFFFFFFF));
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
 
Last edited by urherenow, , Reason: confirmed requirement for libfat-ogc
  • Like
Reactions: TheTechRobo

urherenow

Well-Known Member
Member
Joined
Mar 8, 2009
Messages
3,880
Trophies
1
Age
45
Location
Japan
XP
2,375
Country
United States
Please upload v9b1 dol. Thanks in advance.
since building it requires the certs.bin from a Wii, I don't think it's legal to upload here. Even if that particular cert file doesn't contain proprietary information, I believe DacoTaco stated that he doesn't like it shared in a bunch of places. If you read my post above, and read through the link in my sig, it really is easier than ever to roll your own...
 
  • Like
Reactions: grimson

DacoTaco

Well-Known Member
Member
Joined
Oct 8, 2017
Messages
166
Trophies
0
XP
883
Country
Antarctica
first off all, i uploaded a zip that has the dol in it on github [click me], if you can't download it through priiloader, use that one instead

is anyone else having issues of it not showing up in the updates page?

ModMii uses a version of priiloader with a modded installer to force it to run under IOS236. Does the official installer have a 236 option? Or is the ahbprot installer pretty much 100% safe from the network init hbc bug when using ahbprot? I know there was a risk once upon a time and work around established to avoid ahbprot crashes 99% of the time but this is as all I remember on the subject (and when I researched it recently I never found evidence that it was fully resolved) so I just kept the 236 installer mod to be safe.

If newer official installers are just as safe I have no problem switching to your official fork, in fact all else being equal I would make the switch just because it's your preference and you're the dev in charge so why wouldn't I follow your lead. Just bear in mind it may be awhile until I get around to a modmii update because I'm extremely busy IRL and it's just not a priority at the moment.
oh boy.
first off all, please don't mention the ahbprot bug ever again to me. that shit has been following me, biting me in the arse ever since it happened. it caused people to use dodgy mods & their own installers and i never got them to stop.
0.5 had the bug, 0.6 reloads IOS on startup and keeps ahbprot disabled (aka patches IOS live), killing the bug. 0.7 improved on that design and killed the last bits of the bug. so its been 9 years since that bug was killed.
yes its safe, and if you don't trust it, go look at the code on github. don't like it? make a Pull Request making it better so we can all just use the installer with ahbprot disabled...
(also, imo , a 236 mod is stupid. 249 is an always modded IOS. why the f*** do you need -another- cios... )

Neat! Haven't fired up my Wii in years. Strangely enough, it's been almost as long since I've fired up my WiiU.

So, for those who started rolling your own since installing tools with pacman/dkp-pacman made things so much easier, here's what's needed.

1) (dkp-)pacman -S devkitPPC libogc gamecube-tools
2) You need to dump your NAND (or otherwise access it) and take sys/cert.sys, copy it to priiloader/data, and rename it to certs.bin

I personally also installed libfat-ogc... can't say for sure if that was actually needed.

@DacoTaco, thanks for the update, and whoa... there are a lot of warnings when I build this. Stuff like:

Code:
/home/urherenow/projects/priiloader/Installer/source/main.cpp:647:22: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'u32' {aka 'unsigned int'} [-Wformat=]
/home/urherenow/projects/priiloader/Installer/source/main.cpp:656:22: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'u32' {aka 'unsigned int'} [-Wformat=]
   sprintf(file_path, "/title/%08lx/%08lx/data/hacks_s.ini",(u32)(title_id >> 32),(u32) (title_id & 0xFFFFFFFF));
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
/home/urherenow/projects/priiloader/Installer/source/main.cpp:656:22: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'u32' {aka 'unsigned int'} [-Wformat=]
/home/urherenow/projects/priiloader/Installer/source/main.cpp:662:22: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'u32' {aka 'unsigned int'} [-Wformat=]
   sprintf(file_path, "/title/%08lx/%08lx/data/hacks.ini",(u32)(title_id >> 32),(u32) (title_id & 0xFFFFFFFF));
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
/home/urherenow/projects/priiloader/Installer/source/main.cpp:662:22: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'u32' {aka 'unsigned int'} [-Wformat=]
/home/urherenow/projects/priiloader/Installer/source/main.cpp:668:22: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'u32' {aka 'unsigned int'} [-Wformat=]
   sprintf(file_path, "/title/%08lx/%08lx/data/hacksh_s.ini",(u32)(title_id >> 32),(u32) (title_id & 0xFFFFFFFF));
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
/home/urherenow/projects/priiloader/Installer/source/main.cpp:668:22: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'u32' {aka 'unsigned int'} [-Wformat=]
/home/urherenow/projects/priiloader/Installer/source/main.cpp:674:22: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'u32' {aka 'unsigned int'} [-Wformat=]
   sprintf(file_path, "/title/%08lx/%08lx/data/hackshas.ini",(u32)(title_id >> 32),(u32) (title_id & 0xFFFFFFFF));
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
ye, i noticed the warnings in my CI build as well. it looks to be a linux thing, because on my windows machine it doesn't give those warnings...
been thinking of reinstalling libogc/devkitppc. maybe im having some issues i don't know about

also yes, libfat is needed. look in the makefile in the priiloader folder to see what libraries priiloader needs
 
Last edited by DacoTaco,
Joined
Nov 8, 2018
Messages
13,539
Trophies
3
Age
51
Location
Austria
XP
16,385
Country
Austria
first off all, i uploaded a zip that has the dol in it on github [click me], if you can't download it through priiloader, use that one instead

Thank you for the Priiloader Update dol.:)

The Navigation with the Wi Buttons and
the new "We can load -any- dol or elf now" Feature works great by the Way.
(Makes it now easier to help Users IF they have installed Priiloader.:P)

I am pretty sure many Users will be very,very grateful for this Update.

Thank you for your Time and your Work.:)
 

XFlak

Wiitired but still kicking
Member
Joined
Sep 12, 2009
Messages
11,707
Trophies
2
Age
35
Location
Cyprus, originally from Toronto
Website
modmii.github.io
XP
5,150
Country
Cyprus
@DacoTaco, thanks for your explanation. I won't ask about the old/resolved ahbprot issue again. When 0.9 beta becomes an official/stable release I will make an effort to update ModMii accordingly in-line with your wishes - unless you feel this beta release is final in which case please let me know and I will just use this version.

I hope you know we're on the same side! Maybe I'm just misreading your messages directed to me but it seems like I upset you either now or in the past and I hope we can put the past behind us. Cheers and thanks again.
 
  • Like
Reactions: Alexander1970

DacoTaco

Well-Known Member
Member
Joined
Oct 8, 2017
Messages
166
Trophies
0
XP
883
Country
Antarctica
Thank you for the Priiloader Update dol.:)

The Navigation with the Wi Buttons and
the new "We can load -any- dol or elf now" Feature works great by the Way.
(Makes it now easier to help Users IF they have installed Priiloader.:P)

I am pretty sure many Users will be very,very grateful for this Update.

Thank you for your Time and your Work.:)
just wondering, how will that feature make it easier?
i mean, i made it so priiloader was no longer a factor when developing stuff but thats about it :)
im glad to see many are happy to see the update!

@DacoTaco, thanks for your explanation. I won't ask about the old/resolved ahbprot issue again.
no problem. you can ask/comment about it,but it's just that that shit has been shoved in my face way to many times (both here, and on IRC).
BUT ANYWAY...

but it seems like I upset you either now or in the past
this sh*thole of a community in general has ;)
and sure, i have grown up as a person, but i don't forget easily.

The plan was for a final 0.9 to be released as soon as the Wiimmfi patch hack for Priiloader is complete and tested.
basically this. the beta was released to put the code we have now out there and if everything is OK, everything will be released as a full version update.
 
Joined
Nov 8, 2018
Messages
13,539
Trophies
3
Age
51
Location
Austria
XP
16,385
Country
Austria
just wondering, how will that feature make it easier?
i mean, i made it so priiloader was no longer a factor when developing stuff but thats about it :)

Thank you.:)

We had many "Threads" with Users they could not longer access the System Menu or the Homebrew Channel
(we don't even need to talk about a BootMi installed as boot2...)
only Priiloader installed BUT no synced or no Wii Motion Controller and/or no GameCube Ports.:)
 
  • Like
Reactions: jeannotte
General chit-chat
Help Users
    kenenthk @ kenenthk: Lol AHS is getting funny two dudes and two girls get pregnant