Hacking USB Loader GX

  • Thread starter cyrex
  • Start date
  • Views 7,166,014
  • Replies 29,363
  • Likes 48

smf

Well-Known Member
Member
Joined
Feb 23, 2009
Messages
6,643
Trophies
2
XP
5,862
Country
United Kingdom
What I understand now is official games might be able to use it if they are launched from a loader and don't reload their own video mode. if they keep using the current video mode set by the loader before launch, then it could benefit from the fix too. if it forces a video mode reload, it'll be gone.
am I right?

https://www.retrorgb.com/wii-480p-video-bug-discovered.html

What we need now, is for launcher software such as USB Loader to include a real-time patch for this issue,

I think they hope you'll scan the executable and patch it....
 

leseratte

Wiimmfi Team
Member
Joined
Jun 2, 2012
Messages
453
Trophies
1
XP
1,859
Country
Germany
Got a first test version of the USB-Loader with the 480p patch to work. I tested it with MKWii, NSMB, Wii Sports and Wii Play (as these are the only four games I currently have on my flash drive). NSMB seems to be compiled with another version of the SDK than the other three games so it required a different patch.

This debug version creates a log file "debug.txt" on the SD card. If the patch was successful, it will contain "Found offset for 480p patch - create branch from X to heap (Y)" with X and Y being some memory adresses. If it wasn't successful it will contain "Didn't find offset for 480p patch!". The patch will be applied all the time, without being tied to a specific video mode setting as it doesn't force any video mode and only has effect on 480p output.

This version might break channel booting due to the debug logging (can only boot games, not channels) but this is just for testing anyways. It'd be cool if you could test some more games and check the log file to see if this patch works for most games or if there are more than these two variants that I need to add.
 

Attachments

  • debug-build.zip
    2.7 MB · Views: 236
Last edited by leseratte,

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
thank you for your work.
I tested it quickly, both MKWii PAL Last story PAL.
I compared to 1271 but I didn't see what's different :(

I checked the log, and it said it worked.
Last story : Found offset for 480p patch - create branch from 0x806072e4 to heap (0x8179aaa0)
MKWii : Found offset for 480p patch - create branch from 0x801bcddc to heap (0x817f0500)

I forced PAL480p in the settings to be sure, I'm using hdtv+Wide option.
I'll have to understand what I have to compare and how to see it. for now, the patch said it worked, but my eyes didn't see anything different in the game. I must be blind :lol:
 
Last edited by Cyan,

leseratte

Wiimmfi Team
Member
Joined
Jun 2, 2012
Messages
453
Trophies
1
XP
1,859
Country
Germany
It depends on the console as well. On WiiU and on newer Wiis the patch is useless (Nintendo seems to have fixed the bug in hardware), it only seems to change something on older Wiis.
 

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
It's a launch day Wii, so I guess I just don't know what I have to look for.
but if you tested it, it means it works.

do you need help to find the address for older SDK? maybe having some log at game launch we can provide?

Attention, some games have memory patching detection like Kirby. These games shouldn't have the patch applied unless they are using gameconfig.txt to bypass the check.
I don't know if your patch will be detected or not. I don't have that game to test, but I have prince of persia I can test with. I suppose making it an option will be required in that case.

edit:
first test, bad result. the game didn't even boot. usually it boots, but freeze at the intro when memory is patched.
second test without the patch, the game works fine.
third test with patch again : I confirm prince of persia forgotten sands doesn't boot at all with the patch. it's worse than the usual memory patch detection.
Found offset for 480p patch - create branch from 0x80777314 to heap (0x817e67e0)
 
Last edited by Cyan,

leseratte

Wiimmfi Team
Member
Joined
Jun 2, 2012
Messages
453
Trophies
1
XP
1,859
Country
Germany
I don't know if there are other versions of the SDK than the two I've already found. There is no easy way for me to make the loader print any useful information for games where it doesn't find anything (because, well, it didn't find anything). So if there are other versions of the SDK where that code part differs (If there are games where that patch says that it failed) I would need the main.dol from the game to manually add a proper detection for that version to the loader.

I didn't know there are games that check for memory modification - how is that handled with gecko codes? Does the loader then apply a patch to remove that detection and do I need to somehow trigger it from my code as well?
Yeah, might be useful making it an option then.
 
Last edited by leseratte,

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
each game with that patch detection function (Meta fortress) needs a specific gameconfig or cheat to patch it. I don't think it's a common function that you can detect, but maybe I'm wrong.
if you want to take a look, I joined kirby's files (Crediar's work).

geckocodes provides the needed gameconfig.txt when it exists.
if nobody did a patch, then users can't apply some of the cheatcodes. for example, there's no cheatcode for prince of persia forgotten sands.
if you check for kirby, you'll see that some cheatcodes can work without the patch, some require it.
https://geckocodes.org/index.php?c=SUKE01

games with Meta fortress are also broken with video mode patch, aspect ratio, game from another region, language patch, cheats, old "return to loader" method before using d2x method, etc.
 

Attachments

  • SUKE01 gameconfig.txt
    38.1 KB · Views: 168
  • SUKP01 gameconfig.txt
    35.3 KB · Views: 169
Last edited by Cyan,

leseratte

Wiimmfi Team
Member
Joined
Jun 2, 2012
Messages
453
Trophies
1
XP
1,859
Country
Germany
That doesn't look like it could easily be done generically. I guess the best way would then be to make the 480p fix a setting and not apply it all the time so it can be disabled for these games.
 

baco81

Active Member
Newcomer
Joined
Jan 19, 2017
Messages
38
Trophies
0
Age
43
XP
607
Country
I have limited free time but I'll try the debug version as soon as possible.

Recommended games to test? or just random ones?
 
Last edited by baco81,

ThaCrip

Active Member
Newcomer
Joined
Nov 28, 2018
Messages
39
Trophies
0
XP
132
Country
United States
I noticed a moment ago when updating the .xml file with parental lock that it claims it's up to date and won't let me attempt any further updates, which I need to do as the parental controls are not filtering properly.

that's a problem now because before I had to update it after adding new games so parental lock would work. but it appears they must have done something with that .xml website as after you update it, it won't let you update it again as it claims it's up to date and that's a problem because I need to do that to get it working properly with the parental controls.

any suggestions?

is there anyway to wipe the .xml file info and re-download it clean etc?

p.s. basically it's in relation to my previous post here... https://gbatemp.net/threads/usb-loader-gx.149922/page-1281#post-8431743
 
Last edited by ThaCrip,

baco81

Active Member
Newcomer
Joined
Jan 19, 2017
Messages
38
Trophies
0
Age
43
XP
607
Country
Ok, I tested a few games. Just two failed to boot.
Kirby Epic yarn
Kirby's Return to Dream Land
Donkey Kong
Bit trip complete
Rayman Origins
Newer Super Mario Bros
Conduit 2
Disney universe
GoldenEye
Singit Operación Triunfo
Call of Duty world at war
Data east arcade classics (failed to boot)
Death JR. Root of evil
Epic Mickey 2
Metal slug anthology
Nights: journeys of dreams
SNK arcade classics
Super Mario All Stars (failed to boot)
Angry birds trilogy
Kirby dream collection
Resident Evil 4
Sam & Max season one
TV Show King party
Wii play
Wii play motion
Wii party
I checked the debug text file and it says that the offset for 480p patch was found on all of them.
 
Last edited by baco81,
  • Like
Reactions: leseratte

rafaelsb

Active Member
Newcomer
Joined
Sep 12, 2009
Messages
43
Trophies
1
XP
291
Country
Brazil
Hey @Cyan, found that the SFX or effect volume option isn't saving its settings, the number is saved if you change it, but every time you reenter USBLoaderGX the volume is low.
 

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
hmm, I'll check, but that's possible there aren't any volume option in GXGlobal config file.

Ok, I tested a few games. Just two failed to boot.
Ohh, I would have thought Kirby wouldn't work. did you try playing it until the usual crash spot in case of cheatcode use? do you have gameconfig.txt to allow patches? maybe the 480p patch doesn't trigger the MetaFortress protection.
I wouldn't have thought the two non working games would be these ones.

But, more importantly : Did you notice any visual change with/without the patch?
I still don't see what improvement that patch does.
I have a launch PAL Wii from 2006, on a 4k TV, using component cable, 480p wide screen option.

but it appears they must have done something with that .xml website as after you update it, it won't let you update it again as it claims it's up to date
probably because that's the case : it's up to date, and there's no new update to that database.
I don't know why you have to update it manually to grab the data from it for newly added games. In my mind, the data were checked every time at loader's boot, and taken directly from the xml for new never added games, or from gamecache.bin file for existing/deleted/readded games.
I don't know if there's a refresh button. I could check to add one instead of having to redownload the xml.
until then, you'll have to delete the xml manually and re-update it from the update menu.
 
Last edited by Cyan,

ThaCrip

Active Member
Newcomer
Joined
Nov 28, 2018
Messages
39
Trophies
0
XP
132
Country
United States
probably because that's the case : it's up to date, and there's no new update to that database.

But the last I knew you could still update it regardless of that. now it appears it will only update if there is a newer one which is why I now have a problem.

until then, you'll have to delete the xml manually and re-update it from the update menu.

Okay, ill have to play around with this soon and see what I can figure out. ill see if I can get things working again and then report back here probably in the next day or so as if I get that working, at least there is a temporary work around.
 

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
But the last I knew you could still update it regardless of that.
probably because there were really an update.
if a game has been added, or edited (even a single letter), the database version is incremented and the loader allows its update. if the database version is exactly the same number than the one on the website, it's refusing to update.
it's not a website issue (unless unavailable, or broken), the version check is done on the loader's side to prevent waste bandwidth for the site.
 

ThaCrip

Active Member
Newcomer
Joined
Nov 28, 2018
Messages
39
Trophies
0
XP
132
Country
United States
@Cyan ; Even after a total removal of the USBLoaderGX v1271 program and refresh install, it still does the same thing pretty much.

like after the basic clean install of v1271, I updated the covers for the games, then downloaded the .xml file and adjusted the settings to show only the games of Everyone (10+ and younger) (i.e. Controllevel = 1 (Child 7+)) and it still does not work as when you LOCK and UNLOCK the system, it still shows the same amount of games, which is everything on the system from E through M.

any suggestions?

p.s. is there anyway to manually select which games are removed from showing up on the menu when it's LOCKED vs UNLOCKED?
 
Last edited by ThaCrip,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    OctoAori20 @ OctoAori20: Nice nice-