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,645
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,267
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,267
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: 285
  • Like
Reactions: canariobr

piratesephiroth

I wish I could read
Member
Joined
Sep 5, 2013
Messages
3,453
Trophies
2
Age
103
XP
3,234
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,645
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: 308
Last edited by SonyUSA,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Psionic Roshambo @ Psionic Roshambo:
    I wonder if that was the point of game streaming
  • Psionic Roshambo @ Psionic Roshambo:
    But it's a dead end
  • Xdqwerty @ Xdqwerty:
    @Psionic Roshambo, people who cant download it can still play the game
  • BigOnYa @ BigOnYa:
    If your internet speeds are fast enough. Streaming 4k takes alot. I used to only have 20mb sec, and 4k struggled. Now I have 300mb sec and 4k plays fine.
    +1
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, i only have like 1 or 2 mb sec
  • BigOnYa @ BigOnYa:
    Did you feed the hamster in your internet router? It prob died and is running slow now.
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, why did you start saying my pc has a hamster in the first place?
    +1
  • BigOnYa @ BigOnYa:
    Its actua!ly just a old joke, meaning its slow. Was just kidding around with you.
    +1
  • BigOnYa @ BigOnYa:
    I bet @AncientBoi has some hamsters hidden somewhere tho....
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    I think Game streaming should work like this.... Local Hardware able the run the game fine, game engine and common assets stored locally, all FMV and music and textures could be streaming
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Some temporary storage
  • Xdqwerty @ Xdqwerty:
    also @BigOnYa im making some progress on my gdevelop project, implemented various mechanics
  • Psionic Roshambo @ Psionic Roshambo:
    They went all in on streaming, should have been more of a hybrid approach
    +1
  • BigOnYa @ BigOnYa:
    Or free government supplied high speed internet be nice also. Like Obama care. Xdqwerty that's cool, its time consuming but rewarding once done or playable, to see what you've made from scratch. Animations take forever, but worth it.
    +1
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, although the bullets are a bit buggy
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Not to mention this would be a massive pain to pirate
  • Xdqwerty @ Xdqwerty:
    @BigOnYa,
    and the visual aspect of the game is quite crude (the sprite that looks best is that of the protagonist just because he is a stickman with sunglasses)
    +1
  • BigOnYa @ BigOnYa:
    There is a bullets behaviour you assign to your character, that makes the code easier, under "behaviours"
  • Xdqwerty @ Xdqwerty:
    i meant that when the character is pointing to the right, the bullets spawn where they should, but when he is on the right, they move to the right but the spawn point is incorrect
  • BigOnYa @ BigOnYa:
    Itch.io has lots of free assets also. Under the bullets behavior tab, there is a "rotate bullets" option, can try that. Or in the code can try
    - fire bullet Player.X(PlayerDirection)
  • Xdqwerty @ Xdqwerty:
    im taking a break for today anyway
    +1
  • BigOnYa @ BigOnYa:
    YEa gotta after a while, looking at code for long periods will bug your eyes.
    +1
  • BigOnYa @ BigOnYa:
    That's cool tho, I'm proud of you going back to it, not giving up. It is difficult at first to learn, but fun once you get the hang of it. I think I've watched every tutorial video there is, but I still struggle sometimes to get stuff to work right. But gotta keep trying dif things, and eventually you will get it right.
    +1
    BigOnYa @ BigOnYa: That's cool tho, I'm proud of you going back to it, not giving up. It is difficult at first to... +1