Hacking USB Loader GX

  • Thread starter cyrex
  • Start date
  • Views 7,191,632
  • Replies 29,369
  • Likes 48

lordelan

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
5,803
Trophies
1
Age
44
XP
6,575
Country
Germany
Sorry this doesn't work. But I have found a workable solution.
Just to be clear I'm using 3.0 rev.1262 (which AFAIK is the latest).

I've done some extensive testing and I'm going to present some data here. It is extremely possible I missed something, so I'm certainly willing to go back with some more info and try again.

Based on what I can tell there are 3 ways/locations that USB Loader GX can get a title from:
1) GameTDB (wiitdb.zip/.xml)
2) From the disc header itself
3) From the name of the game file/folder itself.

There are two settings with the Features section of USB Loader GX which control this:
a) Titles from GameTDB
b) Force titles from Disc

When option "a" is chosen, it will read the wiitdb.xml (1) file from the location configured in custom paths.
If you have this option chosen it is strictly enforced - meaning that you will only ever see the titles listed in the xml file no matter what else you do.

If option "b" is chosen, it too is strictly enforced. In fact, enabling option "b" will disable option "a". Even if you turn them both on - if you exit the settings and then re-enter you will see option "a" is turned off. When option "b" is chosen it is again authoritative, except instead of taking the names from the wiitdb.xml (1) it will get the names from the disc header (2).

The disc header can be permanently changed by tools such as WiiBackupManager, but I'm sure many people prefer not to do this (I also believe there is a character limitation on this name(?)).

This leaves us with the final option. Keeping both "a" and "b" OFF. In this configuration, the titles are read from the name of the game file/folder itself (3).

This means that as long as we have the files on the disc names as we wish, they will display as we wish. Fortunately WiiBackupManager makes this very easy. Why? Well, in addition to supporting the GameTDB naming, WBM also supports using the custom-titles.txt file which can override only those names you specify. Then, you can choose to rename only the games you want with a custom name. This is all configured in the Options > Settings > Titles page of WBM. Enable both txt files and set their paths. I also prefer to disable the bottom two boxes so that the disc headers remain untouched.

In my case (I use ISO files on an NTFS disk) and my storage options in WBFS are "Store files in separate sub folders" for folder layout and "Title [GameID]" for naming style. I believe that as long as you are using the full name (and not *just* the GameID) in either in the file or folder name you can name it appropriately here with WBFS and it will show right in the loader as long as you keep both "a" and "b" off.

In WBFS it will show games using a custom title in a different color (purple by default), but remember to actually rename them using the Tools > Game Titles > Rename "X" options in WBFS.

A few closing notes:

As far as USB Loader GX honoring files like wiitdb.txt, titles.txt, or custom-titles.txt. It simply doesn't.
The *only* file that the loader will ever read is wiitdb.xml.
I tested this by placing all of these files in the custom path location and placing a slightly different name for a game in each one.
Testing all permutations of settings in the loader, the only file that was ever read was the xml.
This is why I believe the original suggestion of "Just change it in the titles.txt" is invalid - at least in the most up to date versions.
If anyone has any data points here to prove me wrong, please share as I would like to know if I am misunderstanding some functionality.

AFAIK some of the other loaders (like configurable USB) *does* support both a titles.txt and a custom-titles.txt, very much the same way that WiiBackupManager does. While I would love to see this feature in USB Loader GX, I'll admit that now that I've figured out how it is working it isn't very inconvenient. I'm sure 99% of the users are hooking their drive up to their PC and using WBM to manage their games, so I have no problem just using that to ensure my files/titles are named as I want them.

Oh - one other note on sorting, and why using my method (keeping both "a" and "b" off) solves some other issues. Some of you may have noticed that games following a format like this are sorted wrong:

LEGO Indiana Jones 2: The Adventure Continues
LEGO Indiana Jones: The Original Adventures

...with #2 being sorted above #1. This sorting issue appears to be caused by the ":" character. If you replace ":" with "-" these titles are sorted properly. Because ":" is not a vaild character in a FAT/NTFS file/folder name, the folders will automatically use a "-" instead. Therefore, if you configure the loader without either of the two naming options, titles of this type will already look right!
Very useful!
I was always confused about this after I came back to WBM and USBLGX after 2 years of abstinence so thanks!

@Cyan:
Now that you're back here, one question:
Would it be possible to parse an argument to USB Loader GX so it launches any game directly (but of course with the game specific settings I made)?
I mean something like you would do on a PC:
Code:
C:\some_directory\some_emulator.exe -run_this_rom:"C:\roms\some_rom.rom"
In this way I would like to launch USB Loader GX with a ID4 (or ID6?) as an argument.
USBLGX looks whether the game exists, whether it has settings (changed launch mode, changed IOS, activated cheats) and launches it directly.
It also keeps track of the fact that it was launched with an argument so it would quit to where the argument came from on game's exit.

What I want this for?
I'm highly thinking of digging into coding for Wii U and make an ultimate launcher that can launch everything from one place:
  • installed Wii U games
  • Loadiine Wii U games
  • Wii U homebrew
  • Wii(Ware) and GameCube games through USB Loader GX through some kind of HBL2HBC combined with what I'm asking for with this post
 

Shiranui-san

Well-Known Member
Member
Joined
Nov 4, 2011
Messages
247
Trophies
1
XP
285
Country
IOS 56 has less compatibility compared to IOS 57, and users should stop using IOS56 as default base, really. guides are just copying each other instead of thinking a little and making things easier for noobs (and at the same time for us, helpers!).
Well, historically it is also said that games with USB peripherals need IOS base57, but it turns out that all five Skylanders games out there for Wii won't recognise the USB portal if using IOS base57. They work like a charm with a IOS base 56 though.
 
  • Like
Reactions: Cyan

bengalih

Well-Known Member
Member
Joined
Jun 28, 2009
Messages
133
Trophies
0
XP
438
Country
United States
d2x v8 or v10 (non alt) based on IOS57 is the best for all games, even with the ones which required hermes cIOS, so there's really no need of any other IOS on wii or vWii to get all games working.
All games = games without anti piracy protection, or Dragon Quest RPG which requires IOS59.

Thanks - good info. So what is the current stat of piracy protection. I googled a little bit about this and found this thread here which you posted in:
https://gbatemp.net/threads/nintys-new-copyright-protection-bca.194097/

I would like to get all my backups on my USB and not worry about having to know the whereabouts (or safety) of my physical discs anymore.
Do the newest generation of loaders pretty much handle all of these things automatically.

Can I assume that if a game boots that it will run - or is it still true that prevention measures can cause random crashes or other such mayhem.

Is there a list of games anywhere that are problematic that I can compare to my collection and see.

It really seems devs like yourself have figure all of this out as in the early days I used to have to tinker around a lot to get many games working. These days it seems that the loaders pretty much boot up anything you through at them with almost no special configuration.
 

Duncan Idaho

Well-Known Member
Member
Joined
Mar 5, 2011
Messages
505
Trophies
1
XP
595
Country
Venezuela
I don't know about MP3 standalone (I don't have it) but MP3 from Trilogy is a pain in the arse. I also have problemas with it, I think most of them are cIOS related:

- if it is loaded off of emuNAND with neek2o, it gets stuck in the cannon cutscene destroying the Leviathan after the attack of Dark Samus.

- if it is loaded using cIOS D2X (I tried with v6, v7, v8, v10), it freezes randomly, the Wii reloads and gets back to Wii main menu. In this case it doesn't matter if emuNAND save option is enabled or if you are storing your savegame in the console's own memory. But it seems that the game runs faster using a cIOS base38 instead of a cIOS base56.

- several years ago, I finished the game using Hermes' uLoader and his cIOS 222, never had any issues even saving in the uLoader's own emuNAND. The problem with this configuration is that you have to set the alternative .DOL for MP3 in the loader, and you are forced to always play in the same difficulty level.

If you can, try installing cIOS 222 and load the game with it. USB Loader GX is compatible with cIOS 222 in case you don't want to use/don't like uLoader, but you cannot use emuNAND saves feature using GX+222.
During a FMV? That sounds like the read rate from the drive might be too slow. Have you checked the drive with something like Defraggler to see how fragmented it is? Is it a HDD or flash drive?

Got a new ISO and it runs, only issue now, is that the cheats refuse to work. I have Ocarina ON, the GAMEID matches the .txt but nothing. I specifically am attempting to use the moon jump one and it used to work.

Tested Ocarina codes on Resident Evil 4 and they work for RE4

Edit again: moon jump not working
 
Last edited by Duncan Idaho,

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
46
Location
Engine room, learning
XP
15,662
Country
France
Well, historically it is also said that games with USB peripherals need IOS base57, but it turns out that all five Skylanders games out there for Wii won't recognise the USB portal if using IOS base57. They work like a charm with a IOS base 56 though.
I I didn't know there were games working on 56 only.
At least, using 57 as default in guide is maybe a better idea. or guide should explain users WHY they have different cIOSes and HOW to use them correctly. Really, guide telling users to follow things like a robot are bad, for both users and future helpers.

Would it be possible to parse an argument to USB Loader GX so it launches any game directly
It's already a working feature.
if you load the loader with a ID6 (and 4 too?) it will launch the game automatically, using of course the setting set in the loader.
it's even skipping the loader's boot screen, it's auto-booting the game at loader's launch.

this is how WiiGSC is working.
it's generating a channel with a banner, which is in fact a forwarder to USBLoaderGX with TitleID as argument.

If you want to force a single game at boot by using meta.xml argument, I guess you just add a new argument line with only the TitleID. I never tested it, but it should parse it and detect it as if it was a passed argument from a forwarder.

so if you want to make a Wiiu app, you'll have to find how to boot a vWii dol with argument, and loads "apps/usbloadergx/boot.dol TitleID" (\0 between each arguments; not a space)
hbl2HBC is replacing the titleID of the system menu with the titleID of another channel. it's not launching a dol directly.
so, current method requires a channel forwarder which can load the loader with a titleID argument. I don't know if you can pass argument from WiiU to vWii.
 
Last edited by Cyan,
  • Like
Reactions: lordelan

bengalih

Well-Known Member
Member
Joined
Jun 28, 2009
Messages
133
Trophies
0
XP
438
Country
United States
thank you for spending your time doing the with your on emuNAND and founding the issue.
It's strange the length is the issue, but that's good to know for future users with the same issue :)

I did a bit more testing as I had a theory. The issue is not just the length of the subfolder that NAND is in, but actually the full path to the nand.
It appears that the maximum limit is 11 characters. This means the following won't work:

/n/thisisanand
/nands/wiiware
/nands_go_here/nand1

But the following will:

/nands/pl_us
/nandsgohere
/wiiware

This info might want to go somewhere in whatever docs exist for posterity. I suspect that the actual fix in the code is probably pretty easy - so possibly it could be a quick bugfix in the next released version. Not like it is a big deal (it is easy to keep the path within limits), but not knowing this could be causing issues (maybe others we don't know about).

@bengalih The BCA is no longer needed. There is a patch built in to the loader that bypasses the check.

cool. thanks.
 

Shiranui-san

Well-Known Member
Member
Joined
Nov 4, 2011
Messages
247
Trophies
1
XP
285
Country
I I didn't know there were games working on 56 only.
At least, using 57 as default in guide is maybe a better idea. or guide should explain users WHY they have different cIOSes and HOW to use them correctly. Really, guide telling users to follow things like a robot are bad, for both users and future helpers.
Technically all five Skylanders games work with IOS base57 and also with IOS base38. It's just the portal that it is not recognised when using them, even if you disconnect and reconnect it, so at the end, you cannot play without IOS base56.
I agree with you about guides that "guide" people like robots, but seriously, it is also those people responsibility to read well and try to understand what they are going to do with their consoles before they start doing anything.
 

GreyWolf

Well-Known Member
Member
Joined
Mar 2, 2015
Messages
5,399
Trophies
0
Age
54
XP
1,516
Country
United States
Last edited by GreyWolf,

Duncan Idaho

Well-Known Member
Member
Joined
Mar 5, 2011
Messages
505
Trophies
1
XP
595
Country
Venezuela
I don't know about MP3 standalone (I don't have it) but MP3 from Trilogy is a pain in the arse. I also have problemas with it, I think most of them are cIOS related:

- if it is loaded off of emuNAND with neek2o, it gets stuck in the cannon cutscene destroying the Leviathan after the attack of Dark Samus.

- if it is loaded using cIOS D2X (I tried with v6, v7, v8, v10), it freezes randomly, the Wii reloads and gets back to Wii main menu. In this case it doesn't matter if emuNAND save option is enabled or if you are storing your savegame in the console's own memory. But it seems that the game runs faster using a cIOS base38 instead of a cIOS base56.

- several years ago, I finished the game using Hermes' uLoader and his cIOS 222, never had any issues even saving in the uLoader's own emuNAND. The problem with this configuration is that you have to set the alternative .DOL for MP3 in the loader, and you are forced to always play in the same difficulty level.

If you can, try installing cIOS 222 and load the game with it. USB Loader GX is compatible with cIOS 222 in case you don't want to use/don't like uLoader, but you cannot use emuNAND saves feature using GX+222.
Hmm, I wonder if I can use the alt dol with trilogy in GX. I mean, I know I can, but if it will add stability. I am playing on normal difficulty on my wii. So I'll test that tomorrow as well the stand alone Corruption.
 

Shiranui-san

Well-Known Member
Member
Joined
Nov 4, 2011
Messages
247
Trophies
1
XP
285
Country
Hmm, I wonder if I can use the alt dol with trilogy in GX. I mean, I know I can, but if it will add stability. I am playing on normal difficulty on my wii. So I'll test that tomorrow as well the stand alone Corruption.
Ok, just remember to set "Block IOS Reload" to OFF for Metroid Prime Trilogy.

Edit:
@Cyan @GreyWolf
Just found out that I cannot select any .dol for MPT in the individual settings of the game if the loader's language is set to Spanish.
When I try to change alt .dols from the list, there's a popup saying I have some useful information for devs, then the "Alternate dol" option automatically sets to OFF. If the loader's language is set to English, then it works fine.

Edit2:
Same happens with Zelda Skyward Sword and Wii Sports Resort.
If the GUI language is set to Spanish (maybe other languages (except English) too?) then it is impossible to select any alternate .dol from the list in the individual settings of a game.

* The option "List on gamelaunch" seems to work fine in Spanish, but the option "Select dol from game" doesn't.
 
Last edited by Shiranui-san,
  • Like
Reactions: Duncan Idaho

lordelan

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
5,803
Trophies
1
Age
44
XP
6,575
Country
Germany
I don't know if you can pass argument from WiiU to vWii.
Thank you Cyan, that would be the crux of the matter then.

Never knew arguments were already possible by the way. Cool!
Does that only work for Wii games or even WiiWare and GameCube games?
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
46
Location
Engine room, learning
XP
15,662
Country
France

GreyWolf

Well-Known Member
Member
Joined
Mar 2, 2015
Messages
5,399
Trophies
0
Age
54
XP
1,516
Country
United States
MPT needs block IOS reload ON. It has separate dol files for the menu and each game so if you turn off the reload blocking it will try to switch back to the stock IOS when it loads a game.
 

Shiranui-san

Well-Known Member
Member
Joined
Nov 4, 2011
Messages
247
Trophies
1
XP
285
Country
MPT needs block IOS reload ON. It has separate dol files for the menu and each game so if you turn off the reload blocking it will try to switch back to the stock IOS when it loads a game.
Yes, I know, but @Duncan Idaho said he wanted to test stability of MPT-MP3 choosing individual .dol files, that's why I told him to set "Block IOS Reload" to OFF, the feature is not needed if you select individual .dol beforehand.
And because of that, I also tried to choose the .dol files and found the bug I mentioned in my previous post.
 

GreyWolf

Well-Known Member
Member
Joined
Mar 2, 2015
Messages
5,399
Trophies
0
Age
54
XP
1,516
Country
United States
From what I understand you need to load something through the main menu dol in the first place before you use the alt dol method as the menu is what creates the game save.
 

Shiranui-san

Well-Known Member
Member
Joined
Nov 4, 2011
Messages
247
Trophies
1
XP
285
Country
From what I understand you need to load something through the main menu dol in the first place before you use the alt dol method as the menu is what creates the game save.
Not needed, I have just tested it deleting my savegame and going directly to any of the three games witohut loading the game's main menu in any case.

Edit:
Not always works, sometimes console reloads back to HBC, sometimes games load fine.

Edit 2:
Guess you are right after all: the games boot, but if you go to a save point, save the game, and exit, the savefile is not created...

But anyways, this alt .dol thing was for testing purposes only: for me, MP3 inside MPT behaves exactly the same way with "Block IOS Reload" ON and with alt .dol method.
 
Last edited by Shiranui-san,

Duncan Idaho

Well-Known Member
Member
Joined
Mar 5, 2011
Messages
505
Trophies
1
XP
595
Country
Venezuela
But anyways, this alt .dol thing was for testing purposes only: for me, MP3 inside MPT behaves exactly the same way with "Block IOS Reload" ON and with alt .dol method.
For me the behaivor is worse, way worse. Stick stops working in first person mode as soon as I exit the stage, not only that but, the camera starts acting wonky. Using the DOL loads my SLOT1 file and then goes bonkers.

Also using CIOS222 do I pick a DOL and I can select my save?

Nope. grabs SLOT1

However, SLOT 1 seems to be working fine with CIOS222 and even moonjump works. There are movement problems tho, this requires further testing. Seems to be a problem of the moonjumps.

Warning, trying to go back to the wii menu won't work, at all, crashes the system.

Further Edit, selecting reset boots back the game to the HBC.

Better moonjump code is wonky, causes samus to not be able to move at times.

SD moon jump won't work, it needs better moonjump which is sligthly wonky.

Testing CIOS222 without selecting a DOL. It allows me to select a save and doesn't auto loads it.

CIOS222+no DOL=Crash. IF Normal. Ditto if its a fresh game with the VETERAN difficulty.

CIOS222+Dol+Fresh Save=Works. Will need to reach savepoint. I can confirm that CIOS249 works perfectly on the first section of the game.

Game crashes are on Bryyo, especifically after janking out the ball and visiting the left tunnel and chamber then going to visit the Right tunnel/chamber

Moving now to stand-alone (everything above here is MPT-Corruption).

First test is CIOS 249 dx2v8 base 56 It crashes in Norion, shortly after the Lasso upgrade, go up the elevator, kill the enemies, jump onto the broken bridge, walk a bit forward and samus looses all control. Testing with a fresh .iso

Testing now with CIOS222.

With CIOS222 I can't advance in Norion. Same room where I would lose control of Samus now doesn't loads. Will test without Block IOS reload.

No change, game still won't load the next rooms. I assume its crashed.
 
Last edited by Duncan Idaho,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Veho @ Veho: https://i.imgur.com/bG1pQld.mp4