Hacking USB Loader GX

  • Thread starter Thread starter blackb0x
  • Start date Start date
  • Views Views 8,068,347
  • Replies Replies 30,226
  • Likes Likes 74
Isn't what the video scaling option doing? you can change the aspect ratio to get more/less black bar and overscan around the picture.
On wiiU you can even fore a real 4:3 output from the loader's option while keeping the TV in widescreen. The Wii can't, you need to set 4:3 in the console's settings and set your TV on 4:3 display manually.
Really? I thought those controlled the width only.
Could you tell me how to mess with the height? I'd like to get it to display 640x448. With vWii doing the 1080p upscaling.
I can't find options to do so. Only width and centering.
 
Last edited by sideskroll,
The loader is using the Folder name to get the GameID (to prevent opening the ISO, reading to buffer, closing the ISO, to get the ID from all ISO file).
If the GameID is present in the folder, it (slightly) boosts the load time of the loader.

Compatible folder with Name+ID are :
Title [ID]
or
ID_Title <-- this format checks if the 7ths character is an underscore and use the 6 first letters as GameID.

I observed plenty of cases where USB Loader GX freezes at startup on "Initialising device" when I use the naming convention "Title [ID]" for NGC games if I have some games with very long title (according to no-intro titles). Is USB Loader GX able to use the naming convention "ID" to boost its startup time, i.e. can I use only the 6-number game ID as folder name?
 
4000 games? Better off just loading the entire wiitdb and assuming he has everything instead of wasting time looking. [emoji14]

A cache would be a good idea though, only forcing a reload when called for.

Also an option to make use of the missing download file to save looking for covers that you know aren't there.

... mind you, ideas are easy. :D

Sent from my Nexus 5 using Tapatalk
 
Last edited by self_slaughter,
Is USB Loader GX able to use the naming convention "ID" to boost its startup time, i.e. can I use only the 6-number game ID as folder name?
Yes, but it will not change the loading speed.

It's currently working like that:

Looking for the ID and titles in the folder ("ID" or "Title" or "Title [ID]" or "ID_Title", also "ID.ext" if no subfolder for wii games). it should be fast to parse each folders's name to extract these 2 info.
If it doesn't find the ID, it's mounting the ISO to get the ID + title from the ISO header.
if gametdb is enabled, it's loading gametdb's title for that game using that ID. else it keeps the title found in the folder (if any).
if there's no title in the folder, and no gametdb installed, it's using the title extracted from the ISO header.
if there's an ID in the folder but no title and no gametdb, or "force title from disc" is enabled, then it's mounting the ISO (again) to extract the title from the header because it didn't mount it for the ID extraction.

to speed the loading, always put the game's TitleId in the folder, it will prevent mounting the ISO to get it.


What might takes time is either:
- mounting the iso, reading header (if missing ID, or missing ID+title)
- search the title in gametdb for each found TitleID.
- using the "Title from disc" option in feature menu, as it always force a (re)open of the ISO at the end to read the internal title.

Maybe what's slow is gametdb parsing? (not using tinyXML? maybe tinyXML could speed up the loading)
I'm wondering if storing all gameID in an array and parsing gametdb at the end would be effective. I don't think it will change, as it will add more cycles to put in array and extract it at the end to parse the array.

@sonictopfan should try to disable titles from wiitdb.xml and see if it's loading faster.
 
Thanks Cyan for the really clear explanation. Is there any tool to automatically generate the right folder name for NGC ISOs, like Wii Backup Manager or Wit for Wii games? I tried DMToolBox, but it is using the convention "ID" and you can't put it in a script (or at least I couldn't).
 
Last edited by WuaZ,
Thanks Cyan for the really clear explanation. Is there any tool to automatically generate the right folder nr for NGC ISOs, like Wii Backup Manager or Wit for Wii games? I tried DMToolBox, but it is using the convention "ID" and you can't put it in a script (or at least I couldn't).
Try the game folder renamer from this link.

https://www.dropbox.com/sh/jcc59ml76vb8spp/AACmh3RTR9sL_2NlTaSoq0Bha/Extracted/Games?dl=0

Renames the folders however you like, but it won't rename the ISOs themselves.

Edit: sonic needs an SQL back end with that amount of games!

If you could say generate a quick to read XML of all games and titles initially, then just reload that instead of rescanning completely every time it could make things snappier.

Sent from my Nexus 5 using Tapatalk
 
Last edited by self_slaughter,
Thanks Cyan for the really clear explanation. Is there any tool to automatically generate the right folder nr for NGC ISOs, like Wii Backup Manager or Wit for Wii games? I tried DMToolBox, but it is using the convention "ID" and you can't put it in a script (or at least I couldn't).
I think @GreyWolf also made a tool for windows, I forgot the name. he will tell you :p

I didn't know the game folder renamer.
 
I think @GreyWolf also made a tool for windows, I forgot the name. he will tell you :P
Yes. GCVerify (the same that verifies against redumps database) but it obviously works ONLY on a PC.
So no renaming from within the Wii or any other OS besides Windows.
By the way, did you get my last post? @Cyan
 
no, not GCverify. another one, but that's for computers too, not on console.
then, I'm not sure what was the question if it's not for computer.

ah yes, forgot to answer.
I thought the vertical option was also resizing, but it's only the position?

I don't really understand what's different with your current situation and what you really want.
Maybe 2 screen comparison could help ?

there is an option to force 4:3 on vWii to get original output, you are already using it?
you also don't enable "force widescreen" or "widescreen patch" in nintendont settings, or it will obviously deform the picture
you set the picture to output to 640 (width value set to 40, I will add an "auto" option too)
set your wiiu and TV to widescreen.
isn't it enough ? there are already black bars around the screen.

what you want is specifically "448" ?
or you want the ratio to be good? can't you play with the width to get the correct ratio?
why 448 anyway? aren't gamecube game output to 480? or 240?
 
no, not GCverify. another one, but that's for computers too, not on console.
then, I'm not sure what was the question if it's not for computer.

ah yes, forgot to answer.
I thought the vertical option was also resizing, but it's only the position?

I don't really understand what's different with your current situation and what you really want.
Maybe 2 screen comparison could help ?

there is an option to force 4:3 on vWii, you are already using it?
you also don't enable "force widescreen" or "widescreen patch" in nintendont settings, or it will obviously deform the picture
you set the picture to output to 640 (width value set to 40, I will add an "auto" option too)
set your wiiu and TV to widescreen.
isn't it enough ? there are already black bars around the screen.

what you want is specifically "448" ?
or you want the ratio to be good? can't you play with the width to get the correct ratio?
OK. Thing is, gamecube actually outputs 448p vertical size (not 480p, cause devs got the "recommendation" from Nintendo to account for overscan on old tube TVs.) So actually displaying the internal output of the GCN as 480 is distorting the image, causing it not to align with integer scaling. Although not a big deal, it would be nice to have the option to display it like it actually is (did you see the image I posted on that thread?)
That would fix both, the skewed AR (I think someone was complaining about "circles not being circles" a while back?) as well as the non integer scaling when on vWii.
Maybe the vertical is resizing? I'm not sure... I can see it "moving", not resizing...
Anyway, check this out from Nintendo themselves.
TQA7mIol.png
 
what does "12 video output" link say?
Also isn't it just the demo which is trimming 16 pixel to account for the ovescan, or the video mode itself?
all the video mode (in the SDK) to my knowledge are using 528, 480 or 240.
that's what libOGC is using.

Code:
				vi fbw  ebw  xfbH xOri yOri Widt heig  xFBMode fRend aa   Sample Pattern	
TVNtsc480Prog: 			02 0280 01e0 01e0 0028 0000 0280 01e0 00000000 0000 0000 060606060606060606060606060606060606060606060606 00001516150000
TVMpal480IntDf: 		08 0280 01e0 01e0 0028 0000 0280 01e0 00000001 0000 0000 060606060606060606060606060606060606060606060606 08080a0c0a0808
TVPal528IntDf: 			04 0280 0210 0210 0028 0018 0280 0210 00000001 0000 0000 060606060606060606060606060606060606060606060606 08080a0c0a0808
TVEurgb60Hz480IntDf: 		14 0280 01e0 01e0 0028 0000 0280 01e0 00000001 0000 0000 060606060606060606060606060606060606060606060606 08080a0c0a0808
TVEurgb60Hz480Prog: 		16 0280 01e0 01e0 0006 0000 02c4 01e0 00000000 0000 0000 060606060606060606060606060606060606060606060606 00001516150000
That's only 5 out of 12 I guess...
do you have the others on your link?

To what I understand, the video mode is set to output 480 pixels (or 240 in interlace, or 528p for PAL), but some TV have a too big overscan value masking the outer pixels. Then, developers are adviced to not use the 16 pixels on the picture's edge (and render them black, maybe?) or at least not put actual useful information like game HUD.

edit:
or do you have the demoINIT "preceding" code segment mentioned at the start of that screenshot?
curious to see how the Video init is done by that demoInit example.
 
what does "12 video output" link say?
Also isn't it just the demo which is trimming 16 pixel to account for the ovescan, or the video mode itself?
all the video mode (in the SDK) to my knowledge are using 528, 480 or 240.

To what I understand, the video mode is set to output 480 pixels (or 240), but some TV have a too big overscan value masking the outer pixels. Then, developers are advices to not use the 16 pixel on the picture's edge (and render them black, maybe?) or at least not put actual useful information like game HUD.
EXACTLY. paint those 32 lines black. (not only on the demo, but on all games)
Check the input and output resolutions on the bottom on this video

(Can't link specific timecode. SO check at 2:47)
Of course, it appears that other games even rendered in 660x448 or 660x480 even. So I guess the better solution would be to have an auto setting (do you think the new option on nintendont does that? I'm asking you cause the guys at the nintendont thread never answer any technical questions. Apparently they are more interested in this cheat or that cheat not working...)

--------------------- MERGED ---------------------------

this one for instance (mario sunshine) apparently outputs at 660x448i

(Timecode 10:38)

I wasn't able to get my hands on the mentioned pdfs sadly. But something in this thread might give you an idea:
http://www.gc-forever.com/forums/viewtopic.php?t=3335
 
Last edited by sideskroll,
I think the video mode is really hard to understand on Wii.
like you see, on your hdmi you have a "input" (what the game send to the hdmi adapter, I guess the buffer size) and the output (what the TV receive from the hdmi adapter).

On the wii, what's sent to the TV is the "output", so it should be set to 480.
it's the "screen size" and not the "image size".
I think it's pre-processed by the console (like what your hdmi adapter is doing, displaying a 448i in a 480p canvas, sent to the TV).

what you could try is play with the values here :
fbw ebw xfbH xOri yOri Widt heig
frame buffer width
? (I don't know what ebw is doing)
frame buffer height
position of the buffer on the canvas
canvas width
canvas height


You can recompile nintendont to edit these values.
look where the width/position values are affecting the code, and you'll find which of these video mode value it's changing.
I think it's changing the X/Y origin (position of the buffer on the output screen) and the width of the buffer (image rendered on the output screen, which should still be 720*480 on a widescreen wii setting)
try editing the buffer height. You need to do it on nintendont, because the "video mode none" setting in USBLoaderGX is not working like it should. Crediar made that option to keep the resolution set by the loader, but Nintendont is always re-forcing a different resolution and not using that option correctly (due to the added GUI that users wanted so badly while it wasn't meant to be a standalone program but a launcher for external loaders! maybe it could be done correctly now that there's no GUI displayed at all on recent versions)
 
I think the video mode is really hard to understand on Wii.
like you see, on your hdmi you have a "input" (what the game send to the hdmi adapter, I guess the buffer size) and the output (what the TV receive from the hdmi adapter).

On the wii, what's sent to the TV is the "output", so it should be set to 480.
it's the "screen size" and not the "image size".
I think it's pre-processed by the console (like what your hdmi adapter is doing, displaying a 448i in a 480p canvas, sent to the TV).
Yes, on The WII. But on a vWii it is doing the same exact conversions as the HDMI mod on a GCN.
Cause the Wii menu for instance (again, on a vWii) is surrounded by black borders. So I'm positive it's actually rendering internally at 448.

You can recompile nintendont to edit these values.
look where the width/position values are affecting the code, and you'll find which of these video mode value it's changing.
I think it's changing the X/Y origin (position of the buffer on the output screen) and the width of the buffer (image rendered on the output screen, which should still be 720*480 on a widescreen wii setting)
try editing the buffer height. You need to do it on nintendont, because the "video mode none" setting in USBLoaderGX is not working like it should. Crediar made that option to keep the resolution set by the loader, but Nintendont is always re-forcing a different resolution and not using that option correctly (due to the added GUI that users wanted so badly while it wasn't meant to be a standalone program but a launcher for external loaders! maybe it could be done correctly now that there's no GUI displayed at all on recent versions)
There's no GUI now? :blink: I haven't tried the newest versions.
Is it only GUI free if you launch from an external loader (USBGX) or you mean nintendon't is no longer a standalone app. Only interprets commands?
Anyway, so basically, currently there's no way to accomplish that. (some sort of "auto" setting that just lets each game set it's resolution individually)
 
yes, it's only gui free if launched from a loader, actually no GUI and no text at all.
it's an invisible launch method, select the game on GX -> black screen while loading -> game. no more Nintendont menus or text.

On vwii it's the same as the Wii actually.
The only difference is that the "canvas" is really output at widescreen size, and when forcing 4:3 mode (in the nintendont settings, or in usbgx feature menu) then the canvas is set to widescreen with the picture buffer rendered on the center.
if you set widescreen (instead of 4:3) that's actually doing the contrary and rendering the same way than the Wii (game image on a virtual 720px width canvas (virtual because the real output is still 1080p!), the picture takes the full TV screen area). that's only affecting the width.
if you want 448px height, then you need to mod nintendont.
 
Thanks for USB Loader GX, it is my favourite backup loader. SD loading is still not a possibility, right? It would be so cool, i wouldn't have to use other backup loaders. Especially with the large capacity SD cards are now a possibility, having an all-in-one SD card with 256 gb capacity and full of GC, Wii, Wii U games would be so cool. I wouldn't worry about switch back compatibility. :)
 
yes, it's only gui free if launched from a loader, actually no GUI and no text at all.
it's an invisible launch method, select the game on GX -> black screen while loading -> game. no more Nintendont menus or text.

On vwii it's the same as the Wii actually.
The only difference is that the "canvas" is really output at widescreen size, and when forcing 4:3 mode (in the nintendont settings, or in usbgx feature menu) then the canvas is set to widescreen with the picture buffer rendered on the center.
if you set widescreen (instead of 4:3) that's actually doing the contrary and rendering the same way than the Wii (game image on a virtual 720px width canvas (virtual because the real output is still 1080p!), the picture takes the full TV screen area). that's only affecting the width.
if you want 448px height, then you need to mod nintendont.
Thanks for taking the time to explain something that doesn't even apply to you directly.
By the way, good thing they got rid of that stupid GUI. I didn't get the point of it.
Do you know what the new "auto" (resolution? Aspect ratio?) mode on Nintendon't is about?
 
auto is used to keep the default value set by the video mode. (not the game, the one the console is setting before booting into nintendont).
The default width of the picture is 640 (you can go from 640 to 720 width).
so instead of setting "40" in USBLoaderGX to get 640px, I'll add a "auto" value too, to prevent nintendont from triggering the patching function to patch 640 to .... 640.
auto is just skipping the "replace default by user's setting" function.

I pushed r1263 on sourceforge.
it's Greywolf patch to use the new tinyxml2 (it's making the dol smaller, that's nice).
Nothing else has been changed so I don't release it officially, it's of no use to end users.

I'm now working on the plugin mod.
I'm fixing the new pictures.
Fledge : I'm wondering where you do get all the covers for the ROMs? I guess gametdb doesn't have them, right? users need to make their own? are there any pack somewhere to download?
I see you made some "no cover" for gba and snes format, but I'm not sure which file you based your template of.
 
auto is used to keep the default value set by the video mode. (not the game, the one the console is setting before booting into nintendont).
The default width of the picture is 640 (you can go from 640 to 720 width).
so instead of setting "40" in USBLoaderGX to get 640px, I'll add a "auto" value too, to prevent nintendont from triggering the patching function to patch 640 to .... 640.
auto is just skipping the "replace default by user's setting" function.

I pushed r1263 on sourceforge.
it's Greywolf patch to use the new tinyxml2 (it's making the dol smaller, that's nice).
Nothing else has been changed so I don't release it officially, it's of no use to end users.

I'm now working on the plugin mod.
I'm fixing the new pictures.
Fledge : I'm wondering where you do get all the covers for the ROMs? I guess gametdb doesn't have them, right? users need to make their own? are there any pack somewhere to download?
I see you made some "no cover" for gba and snes format, but I'm not sure which file you based your template of.
So, if I understand you correctly, auto would negate the users number? So if for instance I have 720 as default (to compensate for the enlarged aspect ratio) auto would disregard that and use 640 (the default) or would it take into account some games that might render at 660 for instance?(like the one I linked to with my videos)
Also, just updated nintendont and noticed it takes an OBSCENE amount of time to load (specially if there's no virtual mc created) what's up with that? And now that there's no info but only a black screen I thought my system freezed (if it weren't for the HDD access light)
What changed?
 

Site & Scene News

Popular threads in this forum