cemu-project / Cemu

Cemu - Wii U emulator
https://cemu.info
Mozilla Public License 2.0
6.61k stars 505 forks source link

add support for WUHB file format #1190

Closed goeiecool9999 closed 2 months ago

goeiecool9999 commented 2 months ago

Closes: #962 This work is heavily inspired by the existing code to support WUA. Some parts are copied and modified from WUT's wuhbtool (structures and hash calculation function)

Questions left to be answered:

Crementif commented 2 months ago

Oh, this is awesome to have. Nice work!

Maschell commented 2 months ago

How to assign a title ID to homebrew apps? Some kind of hash function?

On console for the "homebrew_on_menu" plugin I'm using a hash of the relative path to the .wuhb (e.g. "wiiu/apps/test.wuhb") with this hash function to get the lower title id and 0005000F for the first 4bytes : https://github.com/wiiu-env/homebrew_on_menu_plugin/blob/d0581407d69575d5205ba40ee188867e6c0dcdc1/src/utils/utils.cpp#L7

e.g. 0005000F-[HASH]

I think CEMU could/should come up with it's own implementation for the "lower tid", but they should also start with0005000F for consistency?

Maschell commented 2 months ago

Not sure to whiche extend Cemu is even handling the cos.xml, but .wuhb under Aroma are running with these cos.xml values:

https://github.com/wiiu-env/MochaPayload/blob/6f47f2f9bb29b4bf649bf52f60ceb83876c8a45f/source/ios_mcp/source/mcp_loadfile.c#L476-L498

Exzap commented 2 months ago

Looks good. Thanks!