Homebrew Official 5.5.X ELF Loader

cmdj13

Well-Known Member
Member
Joined
Aug 28, 2015
Messages
139
Trophies
0
Location
In front of my computer
XP
219
Country
Gambia, The
Hello Josamilu.
Why do you want to implement an exit function ? The _doExit() function in init.c works fine and execute itself at the end of your elf main function, no ? It's working for me anyway.

--------------------- MERGED ---------------------------


I guess it's because the loader doesn't find the boot.elf on the server (error 404). Is your elf file in the same directory than your payload ?
My setup is like this:

SERVER ROOT:
<some folders>
boot.elf
payload

and in the payload folder:
elfloader.bin
<all the other haxx files>
 

josamilu

Well-Known Member
Member
Joined
Feb 1, 2015
Messages
383
Trophies
0
Location
Saturn is better than Jupiter :P
XP
319
Country
Gambia, The
Hello Josamilu.
Why do you want to implement an exit function ? The _doExit() function in init.c works fine and execute itself at the end of your elf main function, no ? It's working for me anyway.

--------------------- MERGED ---------------------------


I guess it's because the loader doesn't find the boot.elf on the server (error 404). Is your elf file in the same directory than your payload ?
I also tryed the doExit(); finction in init.c but it also crashed for me. So it looks like there is a Problem in my code. Thanks anyway.
 
  • Like
Reactions: eliboa

seagal112

Well-Known Member
Newcomer
Joined
Apr 22, 2014
Messages
63
Trophies
0
Age
43
XP
418
Country

SonyUSA

We're all mad here
Editorial Team
Joined
May 12, 2006
Messages
1,780
Trophies
2
XP
5,618
Country
United States
I'll just say this, the Exit code works fine on my 5.5.1 U in the hello elf example. However, some people say my exit function in my games (which is the same) doesn't work and crashes their WiiU, so I think there is some per-console case issue going on.

--------------------- MERGED ---------------------------

First Centipede posted works, second one does not :/
 
Last edited by SonyUSA,

eliboa

Well-Known Member
Member
Joined
Jan 13, 2016
Messages
157
Trophies
0
XP
1,257
Country
France
Not really, we can't get anything to work with it except Hello World and an unplayable, super slow centipede port lol
I managed to get the gx2thread example working and other homebrews as well. I didn't experienced any _Exit issue neither.
 

eliboa

Well-Known Member
Member
Joined
Jan 13, 2016
Messages
157
Trophies
0
XP
1,257
Country
France
Here is the GX2Thread example i adapted in elf (sources + elf + elf loader i used + makefile).
 

Attachments

  • GX2ThreadElf.rar
    533.4 KB · Views: 281
  • Like
Reactions: canariobr

piratesephiroth

I wish I could read
Member
Joined
Sep 5, 2013
Messages
3,453
Trophies
2
Age
103
XP
3,233
Country
Brazil
So, I've spent the past 4 or 5 days fiddling with this to get it to work and it finally does, allows you to load a gigantic ELF into JIT, since apparently it's 32MB (and no RPX gets that big, even uncompressed because of the data section), and I just got it working. I've only tested it on my system but it should work on others if you have the ELF in the right place. It's provided as-is, with no warranty, feel free to do as you see fit. I'll get a better ELF documentation/structuring done soon.

Technical Explanation
If you wanna know how it works, I reused some code from FIX's ELF loader in libwiiu but I had to redo the whole thing because it was giving me lots of problems. It uses the very end of MEM1 (0xF5FFFFE0-FF)
to store stuff while it works, then copies the ELF into 0xF5800000 (slightly before that), it might have trouble with bigger stuff so I'd suggest developing file loading using sockets. It uses a catch() function at the start so I can jump to it to recover ROP chains. All the ROP does is copy the loader to the very end of JIT, and then reruns all the ROP to copy sections into the start as needed and then jumps to it.

Usage
It searches for a URL with /payload, so host it somewhere with a URL like http://192.168.0.7/payload?elfloader, it'll cut off that part and load a file called boot.elf (http://192.168.0.7/boot.elf)

Downloads??
Attached is libwiiu source for the ELF loader and the Hello World ELF I used to test. You can grab the code550.bin and host it wherever. It will probably only work on 5.5.X because of the ROP. Also had MrRean help me get this working, so thanks.
Will this this make my Wii U be capable of bearing my children?
 

SonyUSA

We're all mad here
Editorial Team
Joined
May 12, 2006
Messages
1,780
Trophies
2
XP
5,618
Country
United States
OK! Here is something you guys can use right now!

It's a copy of C@VE - Beta 4

172.0.0.1:8080/payload/elfloader.mp4
172.0.0.1:8080/payload/boot.elf

Replace 172.0.0.1:8080 with your IP/website and port!

And if you guys want to submit your own levels for my game, grab the matrix from my thread and PM me the map! It's super simple!

http://gbatemp.net/threads/wip-c-ve-5-3-2-5-5-x.414000/

F28dvEV.jpg
 

Attachments

  • payload.rar
    7.1 KB · Views: 306
Last edited by SonyUSA,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    HiradeGirl @ HiradeGirl: Have a nice day. Life. Week. Month. year.