Homebrew Official Homebrew Launcher for WiiU

  • Thread starter Cyan
  • Start date
  • Views 805,961
  • Replies 1,173
  • Likes 98

Don Jon

Well-Known Member
Member
Joined
Nov 20, 2015
Messages
1,057
Trophies
0
Age
38
XP
1,496
Country
United States
so I decided to resize it

3vmqpzv.png
 
Last edited by Don Jon,

dimok

Well-Known Member
Member
Joined
Jan 11, 2009
Messages
728
Trophies
3
XP
2,635
Country
United States
@dimok, your template for an elf file will not work on 5.5, at least not with the sections you have in the link file. This will work for 5.5:
Code:
OUTPUT(boot.elf);

ENTRY(_start)

SECTIONS {
    . = 0x01808000;

    __rx_start = .;

    .start : { loader.o(*) }
    .text : { *(.text) }
    .rodata : { *(.rodata .rodata.*)}

    __rx_end = .;

    . = 0xF4C00000;

    __rw_start = .;

    .data : { *(.data) }

    __bss_start = .;
    .bss : { *(.bss) }
    __bss_end = .;

    . = ALIGN(0x40);
    .stack : {
        . += 0x8000;
        _stack_top = .;
    }

    __rw_end = .;
}
Then you set up the stack for 5.5 in your loader.c, making sure to include "coreinit.h".

Putting this here for anyone on 5.5 that wants to make an elf file.

Hi brienj,

sorry to say that but this is just wrong what you do, at least if you want to make the application run in HBL. This is the setup you need for browser exploit only. It is not gonna work with HBL. HBL loads the application like a real WiiU application with the stack setup from coreinit (good stack) and many other hardware initialisations that are preparing real WiiU applications inside coreinit to run properly, such as the FPU and network. Your entry address 0x01808000 probably wont even work either in the Mii Maker application, though I didnt try it. Its very sloppy to setup "own" stack on top of already existing one and ignore the existing good stack (the one specificly setup for an application start and bigger stack on top). Own stack setup is needed in the browser exploit because you hook some position (ROP) and jump to your code from where there is no good stack (stack pointer is pointing somewhere unknown or some unusable place) but its not needed on HBL method. You will break the launch and the return to HBL and especially the return to Mii Maker code which will cause a freeze on every exit of the application.

The linker file I provided will work for any firmware. The problem you have on 5.5 (or any firmware other than 5.3.2 or 5.4.0) is that you dont have a kernel exploit or dont have the addresses I hook to setup IBATs and DBATs for the application code and data. If people provide the addresses inside kernel, that we need to hook for DBAT and IBAT setup, we can make homebrews almost completely firmware independent with HBL.
Without setting up own DBAT and IBAT you are very limited in program memory and data memory. The way HBL works you have up to 8 MB of memory (currently) for your application and it can be extended. The browser exploit way is only a way to start some payload inside the browser application. You dont have full potential of a WiiU application inside the browser exploit, its very limited, especially with heap memory.

My point is, that this is not how HBL is intended to be used. HBL uses out the entry point of mii maker main() which is a good start for almost any application and where you have the full potential of a WiiU application in it.

Alright, here's a shot in the dark at the elf porting, since I'm on 5.5 and can't actually test.. Can someone tell me if the attached app folder successfully loads and runs space game in HBL?

I put the source code for this elf port on github. As was done in the pong port, I replaced the OS methods with ones from dynamic_libs and used the new makefile.

@dimok Thanks for the pong port. Also, is OSGetTime missing from os_functions.c?
Code:
unsigned int coreinit_handle;
OSDynLoad_Acquire("coreinit.rpl", &coreinit_handle);
int64_t (*OSGetTime)();
OSDynLoad_FindExport(coreinit_handle, 0, "OSGetTime", &OSGetTime);

Hi, yeah its possible that not all functions are present in the dynamic_libs. Just add them the same way the other functions are in there and extend it with it. We can collect all functions together and have a complete header file with all of the dynamic functions.

Btw OnScreen TV issues are probably caused by the way HBL launches the application. Its launched with less initialization to the OSScreen functions. For example you have to enable screen and probably need to change another point to make the distorted screen work normal again on TV. This is caused by the "_Exit()" call on relaunch of the application inside the sd loader code of HBL. If you remove this _Exit() call and just call the Mii Maker main (calling OSTitle_main_entry) then you dont have that kind of issue because it does more initializations in that direction. But that makes the launch of the application longer and you dont have black screen all the way between two applications. A white screen pops up right before the 2nd application is started. So it is necessary to find what is missing in the initialization of the application to make the OSScreen TV work normal again. I will check what we are missing later and fix this inside the HBL probably. If I dont find anything we still can change to the slower launching method with the white screen in between the applications but at least it will not have this on screen issue.
 
Last edited by dimok,
  • Like
Reactions: vgmoose and yahoo

romans.art

Member
Newcomer
Joined
Feb 20, 2016
Messages
7
Trophies
0
Age
37
XP
83
Country
It's because you had the SD Card in your MacBook.
It stored the hidden Apple files for indexing.
HBL "thinks" the hiddenfile for the .ELFs is a real .ELF
try to remove the hidden files and folders either on a Linux or Windows machine or use a hidden files remover on MacOS like BlueHarvest and put an exception to not create those files on removable media.
BlueHarvest http://www.zeroonetwenty.com/blueharvest/

Cheers, CableLeecher
Thanks, simply deleted using Terminal.
 

brienj

Trying to avoid getting cancer
Member
Joined
Jan 3, 2016
Messages
1,232
Trophies
0
Website
twitter.com
XP
2,142
Country
United States
Hi brienj,

sorry to say that but this is just wrong what you do, at least if you want to make the application run in HBL. This is the setup you need for browser exploit only. It is not gonna work with HBL. HBL loads the application like a real WiiU application with the stack setup from coreinit (good stack) and many other hardware initialisations that are preparing real WiiU applications inside coreinit to run properly, such as the FPU and network. Your entry address 0x01808000 probably wont even work either in the Mii Maker application, though I didnt try it. Its very sloppy to setup "own" stack on top of already existing one and ignore the existing good stack (the one specificly for the application setup and bigger stack). Own stack setup is needed in the browser exploit because you hook some position (ROP) and jump to your code from where there is no good stack (stack pointer is pointing somewhere unknown) but its not needed on HBL method. You will break the launch and the return to HBL and especially the return to Mii Maker code which will cause a freeze on every exit of the application.

The linker file I provided will work for any firmware. The problem you have on 5.5 (or any firmware other than 5.3.2 or 5.4.0) is that you dont have a kernel exploit or dont have the addresses I hook to setup IBATs and DBATs for the application code and data. If people provide the addresses inside kernel, that we need to hook for DBAT and IBAT setup, we can make homebrews almost completely firmware independent with HBL.
Without setting up own DBAT and IBAT you are very limited in program memory and data memory. The way HBL works you have up to 8 MB of memory (currently) for your application and it can be extended. The browser exploit way is only a way to start some payload inside the browser application. You dont have full potential of a WiiU application inside the browser exploit, its very limited, especially with heap memory.

My point is, that this is not how HBL is intended to be used. HBL uses out the entry point of mii maker main() which is a good start for almost any application and where you have the full potential of a WiiU application in it.
Yeah, the addresses for HBL won't work for my apps, at least not on 5.5, and that's what I have, and no way to test. It's hard enough testing on my actual firmware. I'm sorry, but there is zero motivation to even bother with anything other than what I can use on my own system. Whenever 5.5 has Kernel access, I'll worry about porting anything.
 

dimok

Well-Known Member
Member
Joined
Jan 11, 2009
Messages
728
Trophies
3
XP
2,635
Country
United States
Yeah, the addresses for HBL won't work for my apps, at least not on 5.5, and that's what I have, and no way to test. It's hard enough testing on my actual firmware. I'm sorry, but there is zero motivation to even bother with anything other than what I can use on my own system. Whenever 5.5 has Kernel access, I'll worry about porting anything.
Hi yeah I fully understand that. I would have no motivation to do it for some other firmware that you personally are not on either. You cant test stuff and just have to code blindly. I hope that the kernel exploit for 5.5.0 and 5.5.1 is gonna be released someday. As far as I know one person (dont know if I am allowed to name him here) has already the necessary kernel addresses which can be hooked to have this all running on 5.5.0 and 5.5.1. Though until the exploit is public there is little you or other people can do.

Thanks for your time for it though. I could help you port the code if you want but for that I would need to see the code and I guess you want to keep it closed source right(?), which is completely ok.
 
  • Like
Reactions: soniczx123

brienj

Trying to avoid getting cancer
Member
Joined
Jan 3, 2016
Messages
1,232
Trophies
0
Website
twitter.com
XP
2,142
Country
United States
Hi yeah I fully understand that. I would have no motivation to do it for some other firmware that you personally are not on either. You cant test stuff and just have to code blindly. I hope that the kernel exploit for 5.5.0 and 5.5.1 is gonna be released someday. As far as I know one person (dont know if I am allowed to name him here) has already the necessary kernel addresses which can be hooked to have this all running on 5.5.0 and 5.5.1. Though until the exploit is public there is little you or other people can do.

Thanks for your time for it though. I could help you port the code if you want but for that I would need to see the code and I guess you want to keep it closed source right(?), which is completely ok.
Yeah, my new game is closed source, at least for now. Since I am not constrained by file size for now, I am slowly re-writing it so it is more organized, and then I will probably release the source at that time. While I am still working on it though, the re-writing won't happen as fast. I've been working on adding the rest of the letters, to complete the alphabet and going to implement a high score list using the network, which I hope to add as an easy for the end user to use addition.
 
Last edited by brienj,

Fatih120

Well-Known Member
Member
Joined
Jan 22, 2016
Messages
178
Trophies
0
Location
Albania
XP
228
Country
United States
I didn't code anything, dimok did all the work.
I did some beta tests only, and did the design/pictures (probably not very professional, but that was in a hurry too). we did it all in two days.

ERR WHOOPS MY BAD

No sleep has a bad effct on you

Thanks a ton Dimok, but thanks for sharing it with us.
 
  • Like
Reactions: Justinde75

TiMeBoMb4u2

Well-Known Member
Member
Joined
Oct 25, 2008
Messages
1,550
Trophies
0
Location
Hyrule
XP
1,198
Country
United States
Ok, I put the submitted icons to the same place.
what do you think about them?

submitted icons for HBL
304321-homebrew_launcher_icon2.2.png
(me. I can change the font but I like the bg)
new-homebrew-v1-png.40865
(wiiunator)
304345-hblauncher.png
(Plasma shadow)
304349-filfat_hbl_icon.png
(filfat)
304376-HBL_Logo.png
(dechad)
dechad asked for my BG and might submit another icon soon. I'll add it here.

Icons for loadiine
304355-icon.png
(wiiugold)
loadiine-logo-png.40776
(wiiunator 1)
loadiine-v3-png.40866
(wiiunator 2)

I like the current icon (made from eclipsesin avatar). I got used to see it here and on website exploit hosting. other users are also probably used to associate it to loadiine, maybe we could keep it.

FTPiiU
ftpiiu-v2-png.40867
(wiiunator)
icon-copy-png.40916
(sin is in)




note: please, use the proper aspect ratio, or submit it directly at the correct size.
I resized two icons and they weren't good ratio so I deleted/added borders.
I just thought I'd add to the mix. Trying to keep it classic...

...and here's one for Loadiine GX2

(NOTE: Images are in correct aspect ratio, but larger for viewing)
 
Last edited by TiMeBoMb4u2,
  • Like
Reactions: Rui Luis

dimok

Well-Known Member
Member
Joined
Jan 11, 2009
Messages
728
Trophies
3
XP
2,635
Country
United States
@vgmoose found a failure , does not work well on TV , attached video:



the game works well , all right , only fault screen tv .


Hi, can you test this application with the following ELF of homebrew launcher:
http://www52.zippyshare.com/v/h0VEeqol/file.html

I think I fixed the issue now.

Also I wanted to inform everyone that HBL officially now supports firmware 5.0.0 and probably 5.1.0 with the current GIT version thanks to @z0mb3. He implemented the port and provided a pull request. He did that for loadiine gx2 too actually.

If the issue above with the console applications on the TV is confirmed fixed I will create a new release version 1.1 of HBL.
 

Masterwin

Well-Known Member
Member
Joined
Jan 7, 2016
Messages
382
Trophies
0
XP
603
Country
Spain
Hi, can you test this application with the following ELF of homebrew launcher:
http://www52.zippyshare.com/v/h0VEeqol/file.html

I think I fixed the issue now.

Also I wanted to inform everyone that HBL officially now supports firmware 5.0.0 and probably 5.1.0 with the current GIT version thanks to @z0mb3. He implemented the port and provided a pull request. He did that for loadiine gx2 too actually.

If the issue above with the console applications on the TV is confirmed fixed I will create a new release version 1.1 of HBL.

OK , now your HBL elf , looks good , but small.

12822644_1295482713812194_1749935466_o.jpg
 
Last edited by Masterwin,
  • Like
Reactions: gbamix

dimok

Well-Known Member
Member
Joined
Jan 11, 2009
Messages
728
Trophies
3
XP
2,635
Country
United States
I think it is that small because the game sets only those pixels for TV. It has to set more pixels on TV with the OS pixel set function than on DRC. It is probably expected to look like that.

Does it look any different when you launch the original game code with the browser?
 
Last edited by dimok,
  • Like
Reactions: Masterwin

Masterwin

Well-Known Member
Member
Joined
Jan 7, 2016
Messages
382
Trophies
0
XP
603
Country
Spain
I think it is that small because the game sets only those pixels for TV. It has to set more pixels on TV with the OS pixel set function than on DRC. It is probably expected to look like that.

Does it look any different when you launch the original game code with the browser?


I do not know , I did not try Spacegame before, but it's problem @vgmoose :P , New HBL elf works :grog: , carried out either : GX2 , FTPii and settlement of the problem of Spacegame .
THX DIMOK !!!
 
  • Like
Reactions: gbamix

dimok

Well-Known Member
Member
Joined
Jan 11, 2009
Messages
728
Trophies
3
XP
2,635
Country
United States
Awesome!

Yes, the resolution is the same as the gamepad but on the TV, so that is how it has always looked. I can work on fixing/scaling that another time, but it's not a new issue. It's working properly, thanks @dimok!
Thanks for confirming it.

Sorry there is a bug in the GX2 defines. See the last commit of HBL. You should fix it on your source code too as you might get into the same issue.

Btw just FYI:
Now that you are using the HBL launching method your application has a lot of heap memory and I really mean a LOT. I once allocated 2 x 280MB chunks when playing with MSAA and the allocation didnt fail. My guess that the heap memory RAM limit is somewhere above 1GB :).
 
Last edited by dimok,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://www.phonearena.com/phones/compare/Samsung-Galaxy-S22+,Google-Pixel-8a/phones/11762,12219...