Hacking USB Loader GX

  • Thread starter cyrex
  • Start date
  • Views 7,194,634
  • Replies 29,369
  • Likes 48

XFlak

Wiitired but still kicking
Member
Joined
Sep 12, 2009
Messages
13,838
Trophies
3
Age
38
Location
Cyprus, originally from Toronto
Website
modmii.github.io
XP
9,837
Country
Cyprus
Unrelated to USLGX but I wanted to share this: I made all my forwarders from WiiXplorer source and I don't know why, they never worked with GenPlusGX. Trying for anything that could work for both SD and USB (and I tried A LOT), I compiled FIX94's forwarders with meta.xml support (also based on WiiXplorer v12 source) and the no_args variant worked with GPGX!
Think you can share the wad or dol?
 

Nintendo Maniac

Well-Known Member
Member
Joined
Apr 26, 2007
Messages
851
Trophies
1
XP
741
Country
United States

one-piece

Well-Known Member
Newcomer
Joined
May 17, 2009
Messages
97
Trophies
1
Location
Mexico
XP
861
Country
Mexico
I've got similar code in a test build somewhere, since I was experimenting with custom widths while it was being discussed a few months ago. Although what you're requesting is a little different.
Could you implement this, please?. The newest release of Swiss added more horizontal scaling options. For example thanks to this new update i use the new 656px horizontal scale to get a perfect ball in super monkey ball. (Im using a GC with Carby+hdmi2component adaptor to RetroTink5x).
Because the aspect ratios of games are very different.
 

blackb0x

Well-Known Member
Member
Joined
Apr 22, 2019
Messages
788
Trophies
1
XP
3,546
Country
United Kingdom
@one-piece Using a custom width will either immediately cause my TV to emit a loud beep or the game will crash and my screen will turn green when I press the home button. So these settings won't be available in my next release.

There will be an option to use the framebuffer width, since that does work correctly.
 

Nintendo Maniac

Well-Known Member
Member
Joined
Apr 26, 2007
Messages
851
Trophies
1
XP
741
Country
United States
I just discovered today that, while running a WiiWare game (e.g. Fluidity, Bust-A-Move Plus!, etc) that was launched through USB Loader GX, if you press the physical reset button on a Wii console, it'll go to a black screen and freeze the game console.

Also in the process I discovered that, if you have your system set to widescreen but have an individual full-fat retail Wii game (e.g. Metroid Prime Trilogy, Mario Kart Wii, etc) set to 4:3, and then while running that aforementioned full-fat retail Wii game press the physical reset button on the console, the game will restart but in 16:9 widescreen.
 
  • Like
Reactions: jackdolphin1947

blackb0x

Well-Known Member
Member
Joined
Apr 22, 2019
Messages
788
Trophies
1
XP
3,546
Country
United Kingdom
I just discovered today that, while running a WiiWare game (e.g. Fluidity, Bust-A-Move Plus!, etc) that was launched through USB Loader GX, if you press the physical reset button on a Wii console, it'll go to a black screen and freeze the game console.
That seems to be a longstanding issue with some WiiWare when launched from the loader. I don't know what causes it yet though.

You might see the same issue with WiiFlow and CFG Loader.

Also in the process I discovered that, if you have your system set to widescreen but have an individual full-fat retail Wii game (e.g. Metroid Prime Trilogy, Mario Kart Wii, etc) set to 4:3, and then while running that aforementioned full-fat retail Wii game press the physical reset button on the console, the game will restart but in 16:9 widescreen.
That's to be expected, since you're basically relaunching the game without any of the patches.
 
Last edited by blackb0x,

NoobletCheese

Well-Known Member
Member
Joined
Aug 12, 2018
Messages
533
Trophies
0
Age
25
XP
1,084
Country
United States
That's to be expected, since you're basically relaunching the game without any of the patches.

Am I correct in thinking the only way to avoid that issue is to patch the dol on disk?

If true, that would be very risky as it is a permanent change to the dol on disk and could corrupt it. A system of backup/restore the original dol could be implemented, but would quire a lot of work.

But, I think it would be neat to have an option to enable "patch dol on disk" in the per-game settings, with a big fat warning to the user that they should only do it as a last resort. Then we could maintain patches after resetting and for games that launch their own dol's like metroid prime.
 

blackb0x

Well-Known Member
Member
Joined
Apr 22, 2019
Messages
788
Trophies
1
XP
3,546
Country
United Kingdom
Am I correct in thinking the only way to avoid that issue is to patch the dol on disk?
It's probably not the only way to handle it, but nobody has come up with a good solution after all of these years.

Don't modified dol files also revert back to their unmodified versions within your backups when you perform a reset? If the answer is yes then you'd need to modify WBFS files instead, but that's something that the loader can't do. And personally I wouldn't want any USB loader to modify my backups, even if the changes could be reverted.

Some of the patches can't easily be converted to static patches either, since they're adding code to games and not just patching existing code e.g. the Wiimmfi patch, the 480p fix and my new partial VIConfigure patch.
 
Last edited by blackb0x,

NoobletCheese

Well-Known Member
Member
Joined
Aug 12, 2018
Messages
533
Trophies
0
Age
25
XP
1,084
Country
United States
Don't modified dol files also revert back to their unmodified versions within your backups when you perform a reset? If the answer is yes then you'd need to modify WBFS files instead, but that's something that the loader can't do.

Yes, I suppose ULGX would have to extract the dol from the wbfs, patch it and re-pack it into the wbfs file. I presume ULGX already has code for extracting dols from wbfs, as this is needed to patch and launch them. But does it have code for re-inserting a dol back into the wbfs file?

When we reset the game, I presume the game is calling its own loader function to read the unpatched dol from disk and launch it. Instead we want it to load the patched dol which is already in memory.
 

blackb0x

Well-Known Member
Member
Joined
Apr 22, 2019
Messages
788
Trophies
1
XP
3,546
Country
United Kingdom
I presume ULGX already has code for extracting dols from wbfs, as this is required to patch and launch them. But does it have code for re-inserting a dol back into the wbfs file?
It's similar to Dolphin in that it can quickly inspect certain files, but there's nothing there to add or modify files. And at no point does the loader write any of the files to your storage.

When we reset the game, I presume the game is calling it's own loader function to read the unpatched dol from disk and launch it. Instead we want it to load the patched dol which is already in memory.
I haven't read any documentation on how it's handled, but I assume a reset will overwrite some memory too.

Maybe a cIOS with specific changes to handle resets would be a solution. But that's a whole different project.
 
  • Like
Reactions: NoobletCheese

fandango

Well-Known Member
Member
Joined
May 17, 2021
Messages
148
Trophies
0
XP
816
Country
United Kingdom
Yes, certain games, such as the Smash Bros. games on both the Wii and GC, and Sonic Heroes had an option to turn off the filter, but very few games did have it. It's the exact same thing we managed to disable.
Yes, and if I remember correctly, in the Smash Bros. game the filter isnt just able to be turned off, it is turned by default.
 
Last edited by fandango,

mive

Well-Known Member
Member
Joined
Jul 19, 2018
Messages
252
Trophies
0
Age
40
XP
598
Country
Germany
i've encountered a strange issue:

if I change emunand base path ("emu channel path") to something like /emunand/my (from /nands/my), vc saving stops working (also some arcade titles wont work at all).
regular wii title save emunand ("emu path") seems to work without issues.
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,138
Country
United States
i've encountered a strange issue:

if I change emunand base path ("emu channel path") to something like /emunand/my (from /nands/my), vc saving stops working (also some arcade titles wont work at all).
regular wii title save emunand ("emu path") seems to work without issues.
if it's a neek nand, neek2o, afaik, is the only one that can read through folders. if it's normal neek, they need to be a root folder, I think.
 
  • Like
Reactions: XFlak

blackb0x

Well-Known Member
Member
Joined
Apr 22, 2019
Messages
788
Trophies
1
XP
3,546
Country
United Kingdom
if I change emunand base path ("emu channel path") to something like /emunand/my (from /nands/my), vc saving stops working (also some arcade titles wont work at all).
regular wii title save emunand ("emu path") seems to work without issues.

If it's bugged then I would of expected the issue to have been reported years ago, but I guess the settings are poorly labelled and not many people will use separate paths. I'll check it out when I've got some free time though.

I had already renamed "NAND Emu Channel Path" to "EmuNAND Channel Path" and "Nand Emu Path" to "EmuNAND Save Path" for my next release.
 

mive

Well-Known Member
Member
Joined
Jul 19, 2018
Messages
252
Trophies
0
Age
40
XP
598
Country
Germany
I probably wrote it in a misunderstanding way,
forget about Nand Emu Path/EmuNand Save Path.

The issue I'm talking about regards "Channel Path",e.g.:
usb1:/nands/whatever changed to usb1:/emunand/whatever

starting vc game "Blazing Lasers" (PCE), play a little, hit home button and exit to wii menu -> expected behaviour would be a savestate which will be loaded if you start "Blazing Lasers" again. Instead it starts from the beginning. This issue does not occur if the used path is usb1:/nands/whatever
 

fandango

Well-Known Member
Member
Joined
May 17, 2021
Messages
148
Trophies
0
XP
816
Country
United Kingdom
I probably wrote it in a misunderstanding way,
forget about Nand Emu Path/EmuNand Save Path.

The issue I'm talking about regards "Channel Path",e.g.:
usb1:/nands/whatever changed to usb1:/emunand/whatever

starting vc game "Blazing Lasers" (PCE), play a little, hit home button and exit to wii menu -> expected behaviour would be a savestate which will be loaded if you start "Blazing Lasers" again. Instead it starts from the beginning
Sorry if this is stating the obvious, but you do realise that if you change the Channels emuNAND path in ULGX you also have to move the channels to the new folder. ULGX wont move them for you.
Or are you saying that it only works if the top level folder is called nands? Well in that case why dont you simply rename your top level folder to nands? It is the convention to call it that anyway.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://www.yahoo.com/lifestyle/xbox-series-x-2-2tb-090117688.html?guccounter=1&guce_referrer=aHR...