Hacking USB Loader GX

  • Thread starter cyrex
  • Start date
  • Views 7,165,924
  • Replies 29,363
  • Likes 48

razenxd

Well-Known Member
Newcomer
Joined
Nov 6, 2013
Messages
92
Trophies
1
Age
31
XP
338
Country
Greece
Just an update to my issue,
Any of my backups(at moment 13) seems to work fine with WiiFlow
None of them pass the black screen with usbloader gx.
Seemsthat i will lost the nice wii channel theme that usb loader has :(
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,649
Country
France
d2x doesn't seem to have the korean key in its sources, and users reported that it worked fine. but I don't know about dev consoles, they are maybe different.
if you need to add it, it uses the same libwbfs located in source\cios-lib\libwbfs\wiidisc.c

sorry, I don't know more about it.
 

GerbilSoft

Well-Known Member
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,250
Country
United States
d2x doesn't seem to have the korean key in its sources, and users reported that it worked fine. but I don't know about dev consoles, they are maybe different.
if you need to add it, it uses the same libwbfs located in source\cios-lib\libwbfs\wiidisc.c

sorry, I don't know more about it.
I guess I'll have to experiment with it a bit.

The key index for dev-encrypted games IIRC is still 0 (same as retail-encrypted), so the only way to know for sure if it's right is by decrypting known data. The first 64 bytes of the encrypted data is a Wii disc header, which has a Wii magic number, so I can use that to verify retail, Korean retail, and dev encryption.

If I get it working, I'll send you a patch. (Not sure if it's okay to post a patch containing Wii encryption keys here.)
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,649
Country
France
I already got the korean key from a patch posted here.
The keys are in the sources anyway, it should be fine. I could delete it from here after I get it if it's really an issue.

thanks for the test you'll do :)
Good luck!
 

Zonta85

Well-Known Member
Member
Joined
Nov 9, 2007
Messages
436
Trophies
0
Age
39
Location
Ascoli Piceno
Website
www.facebook.com
XP
523
Country
Italy
I haven't played any 2-disc games, but based on the code, it should automatically swap whenever the game stops the drive motor. If it isn't doing this, it's a bug that should be looked at. (I'll need to get some 2-disc games to test it.)
Ok, i've done my tests wit ALL 2 disc based games that are in the wii library.
Here the Results

-Baten Kaitos: Eternal wings and the lost ocean: Doesn't swap, Nintendont seems to be frozen because i cannot exit with Home or button combo
-Baten Kaitos Origins: Doesn't swap, Nintendont seems to be frozen because i cannot exit with Home or button combo
-Enter the matrix: Doesn't swap, Nintendont seems to be frozen because i cannot exit with Home or button combo (And the in game language selector doesn't work if forced in 480p, starts automatically in English)
-Killer 7: Doesn't swap
-Goldeneye Rogue agent: Doesn't swap
-Medal of Honor Rising sun: Doesn't wap
-Metal Gear Solid The twin snakes: doesn't swap
-Resident Evil: Doesn't swap
-Resident Evil Code veronica X: Doesn't swap
-Resident Evil 4: Doesn't swap
-Resident Evil 0: Doesn't swap
-Tales of Symphonia: Doesn't swap
-The lord of the rings The third age: Doesn't swap, Nintendont seems to be frozen because i cannot exit with Home or button combo
-Tom Clancy's Splinter Cell Chaos theory: Doesn't swap, Nintendont seems to be frozen because i cannot exit with Home or button combo
-Tom Clancy's Splinter Cell Double Agent: Doesn't swap, Nintendont seems to be frozen because i cannot exit with Home or button combo.

@GerbilSoft in the last month i added/updated about 200 games in the Nintendont compatibility list but my pc is broken (i'm doing everything with a tablet and wiixplorer) and without it i cannot update the info about the dsp. I know that is useless because now the sound and the audiofix wprk in every game, but do you think that is possible to add (like tha md5 check) ad dsp check in your fork or Nintendont?

I'm starting to have lot of things to fix, I should make a list or I'll forgot again.
- fix region detection
- Add Nintendont video aspect ratio Auto
- add proper ciso extension support
- fix gamecube game list when extension is wrong
- Add Italian and romanian translations files
- Add new HBC titleID (OHBC), maybe replace hardcoded values with proper reload to entry point to work with any HBC titles. (but might break return to system menu if it fails to load hbc)
- Enable "usb://" path to IOS check for emuNAND rev17

@Cyan do you think that you can add one more fix?

Currently the free space in the hard disk is showed only when the Wii games are selected, but if Gamecube games are selected (without wii games) in the checkboxes, free space isn't showed, only the number of games installed is visible.
Is possible to have the free space in Gc only?
 
Last edited by Zonta85,

GerbilSoft

Well-Known Member
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,250
Country
United States
Odd that pretty much all 2-disc games are broken. Is this with v4.425, v4.428 (my branch), or both? (Nintendont not responding to the Home button means the game stopped checking for controller input.)

Regarding showing the DSP version: DSP is detected when main.dol is loaded (or a sub-dol), so that'd require manually loading it and checking for patches. I could add a "Game Info" screen that shows more information in addition to MD5s. Will look into this once v4.428 is merged in.
 

Zonta85

Well-Known Member
Member
Joined
Nov 9, 2007
Messages
436
Trophies
0
Age
39
Location
Ascoli Piceno
Website
www.facebook.com
XP
523
Country
Italy
Odd that pretty much all 2-disc games are broken. Is this with v4.425, v4.428 (my branch), or both? (Nintendont not responding to the Home button means the game stopped checking for controller input.)

Regarding showing the DSP version: DSP is detected when main.dol is loaded (or a sub-dol), so that'd require manually loading it and checking for patches. I could add a "Game Info" screen that shows more information in addition to MD5s. Will look into this once v4.428 is merged in.

Afaik the game that i have tested are all the 2 disc based game.
Only disc 2---> Disc 1 is broken, not disc 1---> disc2.

Is with 4.428. Tomorrow i will test with 4.425
 
Last edited by Zonta85,

GerbilSoft

Well-Known Member
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,250
Country
United States
thanks for the test you'll do :)
Good luck!
I added the RVT key to the ULGX source and it now decodes the banner from the Sonic and the Black Knight image correctly...

...and then the ARM9 crashes when I actually try to load the game. I'm thinking the cIOS actually does need to be updated. Will try that next.

EDIT: Added it to d2x cIOS and tested it... and the ARM9 still crashes. Maybe I need to intercept the ticket read request or something? I'm not sure.

Going to try implementing this in Dolphin. If that works, I'll revisit ULGX/d2x later.
 
Last edited by GerbilSoft,

GerbilSoft

Well-Known Member
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,250
Country
United States
@Cyan I'm thinking the problem is the cIOS doesn't handle the debug certificate chain, so IOS crashes when it encounters a certificate it doesn't recognize. Do you think it'd be feasible to temporarily write a "retail-like" ticket, TMD, and certificate to a temporary file on the HDD (using a re-encrypted title key), then import that temporary file into the fraglist? I'll first need to test if replacing the certificate chain with a retail one actually works, though.

EDIT: What I'm going to do tonight is replace the issuers and certificate chains in the RVT-R test image (Sonic and the Black Knight) with the retail versions, re-encrypt the title key with the retail common key, then fake-sign the TMD and ticket. If that works, I'll add those to ULGX's GameBooter. (The resulting fake ticket/TMD/certs will be cached somewhere.)
 
Last edited by GerbilSoft,

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,649
Country
France
I wouldn't have been able to answer you. I'm not very knowledgeable on cryptography.
If you made it work, I'll add it. Thank you.

Currently the free space in the hard disk is showed only when the Wii games are selected, but if Gamecube games are selected (without wii games) in the checkboxes, free space isn't showed, only the number of games installed is visible.
Is possible to have the free space in Gc only?
I'll have to do more work on the free space.
There are different actions which doesn't refresh it, and there is also a bug if you enable it but launch a game before the free size is calculated and displayed. probably a multi-threading issue.
There are also gamecube game reported size which is wrong for multi discs (but this one should be easy to fix). completing the gamecube menus and features is a longtime due update.
it's missing a delete game menu, a copy SD to USB menu, and a way to open the SD/USB manager without using DM on USB.
 
  • Like
Reactions: Zonta85

sideskroll

Well-Known Member
Member
Joined
Aug 25, 2010
Messages
653
Trophies
0
Age
41
Location
Here
XP
420
Country
Peru
@Cyan I'm thinking the problem is the cIOS doesn't handle the debug certificate chain, so IOS crashes when it encounters a certificate it doesn't recognize. Do you think it'd be feasible to temporarily write a "retail-like" ticket, TMD, and certificate to a temporary file on the HDD (using a re-encrypted title key), then import that temporary file into the fraglist? I'll first need to test if replacing the certificate chain with a retail one actually works, though.

EDIT: What I'm going to do tonight is replace the issuers and certificate chains in the RVT-R test image (Sonic and the Black Knight) with the retail versions, re-encrypt the title key with the retail common key, then fake-sign the TMD and ticket. If that works, I'll add those to ULGX's GameBooter. (The resulting fake ticket/TMD/certs will be cached somewhere.)
@GerbilSoft as long as you're tearing the loader apart, would you mind seeing what you can do about this: https://gbatemp.net/threads/usb-loader-gx.149922/page-1158#post-6868915
I'd really appreciate it :D
Thanks.
 

abdezca

Well-Known Member
Member
Joined
May 11, 2014
Messages
116
Trophies
0
Age
36
Location
Between the south of Texas and north of Tamaulipas
XP
199
Country
Mexico
Ohhh, lot of message this weekend!
So, here all the answers.

1) what you want is the plugin system used by wiiflow : launching a ROM, which runs a specially compiled homebrew (it even has hardcoded "return to wiiflow" text on it, but will return to USBLoaderGX too), and exit back to the loader.
This plugin system is in current beta phase. Pledge (who is working on Wiiflow lite) made a modification of the loader to addapt the plugin system to USBGX. He released a patch and a beta test version (few pages back), you can try if you want.
Greywolf made a new "working" repository on github where I'll upload the patched sources and update them to change few things I want before an official integrated release on the main sources.
I might release beta for users to test and report any bugs.

2) the config is located here:
apps/usbloader_gx/GXGlobal.cfg
you can edit all the path manually, but be sure to use single slash path (usb1:/path/, or sd:/path, and not usb1://path) this is not an URL, and using 2 path can break some features (emuNAND).
Cyan, thank you so much for the answer to my questions.

Just to clarify you are saying that plugins are being worked on and sounds great. Ill wait for an official release.

I have another question? Is there a way to sort out all the VC games, Wii Ware, and others in the loader.

For example when you go into the Wii Shop you click Virtual Console Logo, and then splits into NES, SNES, N64 and so on. Once you click one of those it shows the games for the respective console.

Is there anything in the works like that?

and before I finish, I want to thanks the whole USB Loader team for such a fantastic work and keep updating this program daily!
 
Last edited by abdezca,
  • Like
Reactions: Zonta85

tswntk

Well-Known Member
Member
Joined
Aug 6, 2012
Messages
1,018
Trophies
1
XP
2,369
Country
Switzerland
Cyan, thank you so much for the answer to my questions.

Just to clarify you are saying that plugins are being worked on and sounds great. Ill wait for an official release.

I have another question? Is there a way to sort out all the VC games, Wii Ware, and others in the loader.

For example when you go into the Wii Shop you click Virtual Console Logo, and then splits into NES, SNES, N64 and so on. Once you click one of those it shows the games for the respective console.

Is there anything in the works like that?

and before I finish, I want to thanks the whole USB Loader team for such a fantastic work and keep updating this program daily!

The thing is: is there a way to identify them as such once installed? What about injects; do they following proper naming conventions?

I don't play ww or vc myself but I have heard ppl trying to install 800+ ww/vc games to an emunamd and that alone could stall neek2o. Will that stall ULGX too by digging into the installed files for more details (if there is anything useful)?
 

GerbilSoft

Well-Known Member
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,250
Country
United States
The thing is: is there a way to identify them as such once installed? What about injects; do they following proper naming conventions?
The first character of the game ID indicates the system, e.g. G for GameCube, R/S for Wii, M for Genesis, J for SNES, etc. (see http://wiibrew.org/wiki/Title_database) (Not applicable for Wii U titles, but that isn't important here.)

Shameless bump in case you missed it :) @GerbilSoft
Could be doable, and the option can be hidden on non-Wii U systems. Will look into it later.

EDIT: Still haven't gotten the RVT-R image working on retail hardware yet, but I have a PR for Dolphin that gets it working there: https://github.com/dolphin-emu/dolphin/pull/4479
 
Last edited by GerbilSoft, , Reason: +retail HW
  • Like
Reactions: sideskroll

abdezca

Well-Known Member
Member
Joined
May 11, 2014
Messages
116
Trophies
0
Age
36
Location
Between the south of Texas and north of Tamaulipas
XP
199
Country
Mexico
The first character of the game ID indicates the system, e.g. G for GameCube, R/S for Wii, M for Genesis, J for SNES, etc. (see http://wiibrew.org/wiki/Title_database) (Not applicable for Wii U titles, but that isn't important here.)

Yeah, I'm mean it would be great if we could get a revamped menu on how to select games. Now that there is a full library of games, these little adjustments to the UI should be something that could help users a lot. Especially young ones. My nephew who is 6 years old. Going to the top end of the screen and choosing emunand or real nand, and stuff like that is like chinese to him.

is this a priority to the USB LOADER GX team?
 
Last edited by abdezca,

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,649
Country
France
is this a priority to the USB LOADER GX team?
no, this is not a priority (lack of time).
there's an old request for a way to sort games based on system.

What's possible right now is using the category feature.
1. import all categories from gametdb
2. go into the category menu and select ONLY the VC you want to display:
You want only VC Snes? check VC SNES and uncheck "all", Done. You will not see "ALL" the games anymore, and you will see "only SNES VC" because that's the only category you enabled.

importing categories from gametdb will not only import the game type, but also the game genre (action, rpg, racing, etc.) so you will have a lot of categories to browse.
If you want only small list of categories, you will have to create them yourself manually.

that's the only way you can display specific VC for the moment.
 
  • Like
Reactions: abdezca

WuaZ

Active Member
Newcomer
Joined
Mar 17, 2015
Messages
26
Trophies
0
XP
262
Country
France
I'm starting to have lot of things to fix, I should make a list or I'll forgot again.
- fix region detection
- Add Nintendont video aspect ratio Auto
- add proper ciso extension support
- fix gamecube game list when extension is wrong
- Add Italian and romanian translations files
- Add new HBC titleID (OHBC), maybe replace hardcoded values with proper reload to entry point to work with any HBC titles. (but might break return to system menu if it fails to load hbc)
- Enable "usb://" path to IOS check for emuNAND rev17

I think I forgot another fix we talked about recently...

I think you forgot the issue when scrapping NGC custom banner (only NGC games are displayed after the scrapping).
 
  • Like
Reactions: Cyan

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,649
Country
France
that was an important bug and I forgot about it, sorryyy!

- Fix filtering list when downloading custom banner
- fix region detection
- Add Nintendont video aspect ratio Auto
- add proper ciso extension support
- fix gamecube game list when extension is wrong
- Add Italian and romanian translations files
- Add new HBC titleID (OHBC), maybe replace hardcoded values with proper reload to entry point to work with any HBC titles. (but might break return to system menu if it fails to load hbc)
- Enable "usb://" path to IOS check for emuNAND rev17


I didn't post the plugin mod on github yet
house chores and family takes most of my time. I'm busy on most weekends now.
on evening, I catch the new threads and posts from the day, and it's time to go.
I try to play games a little (instead of working on the loader!) in my free time. I should try to dedicate few minutes a day to the loader
 
  • Like
Reactions: Troopage

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: https://www.youtube.com/watch?v=TKyNPg7UIIc