Hacking USB Loader GX

  • Thread starter cyrex
  • Start date
  • Views 7,187,030
  • Replies 29,369
  • Likes 48

element6

Well-Known Member
Newcomer
Joined
Jun 2, 2016
Messages
65
Trophies
0
Age
123
Location
Miami, FL
Website
www.google.com
XP
198
Country
United States
I also moved the usb detection past the version detection (it shouldn't create issues).
3.400 should now work with MBR, GPT and EBR. (also with "unknown" table type, like wiiU hdd, I hope nobody will wonder why it doesn't work while they don't have an error message, just a little common sense please)
I don't know if EBR (Extended/logical will work, I didn't work on that support at all. Maybe it will work, maybe not)
I think it will work as long as you have the correct EBR type (0x0F; not 0x05).

Please, report is this 1261_mod01 works fine with nintendont+GPT, and I'll add it in my signature.

users with 0x05 can ask me if they want to test the EBR version detection, I added it in mod2.

Wow, I can't believe you jumped on this so quickly! I saw this last night when I hopped on here just for kicks. I had the 4TB WD Mybook drive boxed up with a return label ready to ship back to Amazon. I figured I'd at least hold onto it in case I found something I could use it for before I reached the return deadline.
  • I pulled it back out of the box, partitioned the drive the same as before (GPT, 2TB FAT32/32KB on partition 1, 2TB WBFS on partition 2), and everything works almost flawlessly.
  • It sees my Wii games and GC games on both partitions.
  • It automatically launches Nintendont and applies the configuration properly.
  • When exiting Nintendont (L+R+Z+Start on GC Controller) it flawlessly returns to USB Loader GX and lets me launch another game.
  • All Wii games launch and run perfectly.

I found one problem; when I click on the Homebrew Channel icon on the bottom right corner of the USB Loader GX screen, my screen appears the same as the screenshot below. My hand still moves around the screen and follows the wiimote, so the system isn't completely hung, but it seems like it's having trouble releasing or unmounting the USB drive. I hear drive activity during this time, but nothing chonges on the screen and no combination of button presses on the wiimote change anything.

One of the times it did this, I waited about 3-5 minutes and it actually returned to the Homebrew Channel, but other times I didn't get as lucky. Returning to the Wii Menu or powering off the system are the only safe options in order to exit this mod version of USBLGX.

IMG_8629.jpg




Finally, I tested three different combinations of partitions on my 4TB drive. Here are the results with this mod version (Partition1/Partition2):
  1. FAT32(32k)/WBFS - Reported as above. Everything seems to work fine. The only bug is that trying to return to the Homebrew channel results in what seems like a USB bus lockup. Wii continues to play USBLGX bg music and responds to controller movement.
  2. FAT32(32k)/FAT32(32k) - USB Loader GX starts up and mounts the drive, but the second it gets into the main screen, it locks up the system hard: No response to controller input, sound card on Wii locks up and holds the last note it was playing, and the screen appears exactly the same as this:
    IMG_8629.jpg
  3. FAT32(32k)/NTFS(4k) - USB Loader GX begins to start up and mounts the drive fine but does not make it to the main screen. Just as it is about to advance to the main screen I get this DSI exception. It actually does reload after 20 seconds and returns me to the HBC or Wii Menu. Here is the screen I get everytime:
    IMG_8630.jpg
All results above were the same whether I launched USBLGX from the forwarder channel or from HBC.


Final comments
  • FAT32/WBFS on a GPT disk works excellent. I am definitely going to hold on to my 4TB drive and load it the whole way up to see how USBLGX tolerates this over time. I'm sure I can find a use for the 2x2TB Maxtor drives I ordered that are arriving tomorrow :lol:
  • The one bug I found is reported above.
  • All of my testing was done by launching USBLGX/Nintendont from a 2GB SD card. Although USBLGX and Nintendont now support GPT disks, the Homebrew Channel does not. This means you can't launch homebrew apps from a GPT disk, not even a single partition GPT disk. Hopefully the development team will add such functionality in the future, but as I said, launching from an SD card is a working solution in the case of a GPT disk with multiple partitions.
  • Strange finding: When I mount a disk with two partitions on it in USBLGX it assigns two different device ID's to the same partition. I believe you call it "DeviceHandler" in your code. For example, in the case of my working partition scheme (FAT32/WBFS), I have both usb1 and usb3 pointing to the same exact FAT32 partition. They can be used interchangeably too. If I want to change my Main Gamecube Path to usb3:/Games instead of usb1:/Games it will work just the same.

I looked over your code in the archive and see the changes you had to make in order for this to work. I always forget how many precautions have to be put into place to keep a user from crashing a program :P

Your work is greatly appreciated :bow: I am sure this will help many others with the same dilemma I had. I still can't believe how versatile the Wii U is. With all of the development and the sheer user base that the homebrew Xbox360/PS3 scene has, they still haven't found a way around FAT32/MBR on the Xbox360 or anything larger than a 1TB UFS formatted internal drive on the PS3!
 
Last edited by element6,

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
That was a nice and big report !
Thank you for all your tests you did :)

Thanks for testing nintendont too (well, that was the purpose of the test).

I don't know why launching the HBC icon hangs there. It works fine with r1260?


I had report about the GPT dual partition issue, but what you said here is really useful :
Strange finding: When I mount a disk with two partitions on it in USBLGX it assigns two different device ID's to the same partition. I believe you call it "DeviceHandler" in your code. For example, in the case of my working partition scheme (FAT32/WBFS), I have both usb1 and usb3 pointing to the same exact FAT32 partition. They can be used interchangeably too. If I want to change my Main Gamecube Path to usb3:/Games instead of usb1:/Games it will work just the same.
saying that a same partition is mounted twice is probably the issue !
Maybe the second "NTFS" is kept as "format to use" and the loader re-assign the first partition as the third but with the wrong format (NTFS library for a FAT partition).
I'll have too verify the loop in the deviceHandler and partitionHandler.

Thanks for the code dump screen too, I'll check if I get something useful from it.
 
  • Like
Reactions: pepobr and Troopage

element6

Well-Known Member
Newcomer
Joined
Jun 2, 2016
Messages
65
Trophies
0
Age
123
Location
Miami, FL
Website
www.google.com
XP
198
Country
United States
Ok, I'm back. Had a couple hours today to knock this out and I believe I have straightened almost all of the little mysteries with large format drives and USBLGX.

Here are the results of my tests with different partition schemes:
  • One 3.7TB NTFS(4k) Partition on GPT - DSI Exception after mounting drive. Will not make it to the main screen of USBLGX.
IMG_8633.jpg
  • Two NTFS(4k) partitions of equal size - DSI Exception after mounting drive. Will not make it to the main screen of USBLGX.
IMG_8634.jpg
  • One WBFS partition (first) and one NTFS(4k) partition (second) of equal size - DSI Exception after mounting drive. Will not make it to the main screen of USBLGX.
IMG_8635.jpg
  • One NTFS(4k) partition (first) and one WBFS partition (second) of equal size - DSI Exception after mounting drive. Will not make it to the main screen of USBLGX. Similar DSI Exception to the one above.
  • Two 1TB (or less) FAT32(32k) partitions on GPT with WBFS folders placed on each partition - GC Games can be launched from Partition 1. Wii games can be launched from either partition. No issues found but see my note below that starts off with "safety feature needed."
  • Two 1.3TB FAT32(32k) partitions on GPT with WBFS folders placed on each partition - USBLGX hesitantly loads after pausing at "Initializing USB device" for 10-15 seconds. Once the main screen appears it appears as below. No hand is present to follow the direction that you point the Wiimote in, but it plays the backkground music without any issues. Does not go any further or respond to any buttons pressed. Had to pull power from Wii-U to reset. Picture below:
IMG_8636.jpg
  • Two 1.5TB (or greater) FAT32(32k or 64k) partitions on GPT with WBFS folders placed on each partition - DSI Exception the instant USBLGX sees the drive. Will not reload after DSI Exception. Power had to be pulled from Wii-U. DSI Exception:
IMG_8637.jpg
  • Three 950GB FAT32(32k) partitions on GPT with wbfs folders on each - USBLGX hesitantly loads after pausing at "Initializing USB device" for 10-15 seconds. The main screen (without any buttons or a list) appears for less than a split second. Instantly goes to a DSI exception similar to the one above afterwords.

Other notes:
  • FAT32 seems unstable anytime the total of the partitions goes over 2TB on GPT, which leads me to believe that the FAT32 library referenced may have been designed with only MBR disks in mind.
  • The issue of the Wii "soft-lockup" when trying to return to the Homebrew Channel by clicking on the HBC icon in bottom right is also present in r1260. I guess I just didn't notice it before. It seems to occur because I am loading USBLGX off of an SD card. When I boot into USBLGX directly off of an MBR FAT32 partition, the HBC button works fine. I can't do it when I am using a GPT disk because HBC doesn't work with GPT disks.
  • It's worth mentioning that clicking on the round "Wii" button to the right of this icon and selecting "Homebrew Channel" will return me to the Homebrew channel with no problems or freezes when I have booted USBLGX from SD. Clicking on "Wii Menu" safely returns me to the Wii Menu from that button as well.
  • The issue of multiple instances appearing for the same partition is a result of leaving USB 0 and 1 enabled ("Both") under the "Hard Drive Settings" menu of USB Loader GX. If I set it to only port 0, in the case of two FAT32(32k) partitions on a GPT drive, the partitions are individually referred to as usb1 and usb2. If I enable "Both" for that same hard drive, I am presented with usb1, usb2, usb3, and usb4. In this case, partition 1 = usb1 = usb3 and partition 2 = usb2 = usb4. They are interchangeable. I am leaving this set to only port 0 from here on out. I think USBLGX might do this due to the way the rear usb ports work on a Wii-U when under vWii mode but I no longer have a plain Wii here to prove that assumption with. For reference, I am not using a Y-Cable. My drive is externally powered and I have only one USB cable plugged into the top USB port at the rear of my Wii-U.

Safety feature needed:
Somehow prevent user from assigning usb2 or usb4 as "Main Gamecube Path". If I set up my GPT drive with the second partition being FAT32 and put GC games on it, r1261 Mod01 allows me to assign "usb2:/games" as my "Main Gamecube Path" and will call on Nintendont to launch a game from this partition. Nintendont will attempt to start the game, but it will crash the entire vWii and send you back to the Wii-U Menu after a few moments. No DSI Exception or errors are given.

4096 vs 512byte sectors:
This is extremely important if you intend to create a continuous FAT32 partition larger than 2TB. Many external USB drives ship from the factory in 512byte emulation mode to this day. The disks physically have 4096byte sectors, but to maximize compatibility across multiple platforms, hard drive vendors force the SATA->USB controller inside the external enclosure to emulate 512byte sectors.
Because of the limitations of the FAT32 file system, it is impossible to create a single FAT32 partition larger than 2TB on a drive with 512byte sectors. Although, with 4096byte sectors and 64k clusters, the addressable limit is 16TB for one, continuous FAT32 partition.

Most vendors provide a "factory restore" or "compatibility formatter" application that allows you to convert the drive to 4096byte sectors when you format it.

For Western Digital, the application is called WD Quick Formatter. It can be found here for Windows and Mac along with instructions: http://support.wdc.com/KnowledgeBase/answer.aspx?ID=3868

You want to use the "XP Compatible" configuration to enable 4096 byte sectors.

WDquickformat.jpg


For Seagate, the application is called DiscWizard Extended Capacity Manager. It can be found here for Windows: http://www.seagate.com/support/downloads/beyond-2tb/


Here is my 4TB MyBook (Model WDBFJK0040HBK-NESN) after using WD Quick Formatter and WBM to format to FAT32 w/64k clusters:

4_TB_FAT32.jpg


Notice the bytes per sector in WBM below. This used to report 512bytes every time I formatted before using Quick Formatter and changing the drive to XP Compatibility mode.

WBMformat.jpg


Hope this helps you guys!
 

ca032769

INFOCOM Collector
Member
Joined
Jan 11, 2012
Messages
636
Trophies
1
Location
Riverside, CA
XP
1,888
Country
United States
Last edited by ca032769,

element6

Well-Known Member
Newcomer
Joined
Jun 2, 2016
Messages
65
Trophies
0
Age
123
Location
Miami, FL
Website
www.google.com
XP
198
Country
United States
@element6 - I used FAT32 GUI Formatter to format my WD 4TB HDDs to a single FAT32/32k and use it all the time for my Wii games. Never had any problems.

Have you had any thoughts trying to format yours as just one FAT32/32k or FAT32/64 partition to see if it works?

If you haven't checked into just using one partition, here's a thread about it: https://gbatemp.net/threads/guide-formatting-your-external-harddrive-to-fat32-in-seconds.269589/

I've been using FAT32 Format GUI for years. It's a great tool. But just like any other formatting utility, it can't format a single FAT32 partition larger than 2TB on a GPT or MBR drive with 512 byte sectors. This is only possible when the drive has 4096byte sectors, hence the explanation at the end of my last post.

I didn't do this right off the bat because my drive shipped with 512byte sector mode enabled like many others. The topic of disabling/converting the 512byte sector mode of most external drives is rarely, if at all, discussed on this site or any other site I was searching for answers on. Seagate and Western Digital do a very good job of hiding the utilities and resources that I linked to above as well.

I am loading it all the way up now to see how USBLoaderGX tolerates a single 4TB FAT32 partition in MBR mode. I don't see how I will have any trouble with it from here on out, but enabling full support of GPT within HBC, USBLGX, and Nintendont is definitely a better option for the future.

PS, I came across that thread many many times when I first started troubleshooting why I couldn't format my WD Drive to a single FAT32 part. Notice how not a single person mentions anything about 512 byte vs 4096 byte sectors or disabling the 512byte sector emulation?

That's the one Marv. That's the silver tuna.
 
Last edited by element6,

ca032769

INFOCOM Collector
Member
Joined
Jan 11, 2012
Messages
636
Trophies
1
Location
Riverside, CA
XP
1,888
Country
United States
Yes, I seemed to have missed the entire drive was formatted to one partition in the very last part.

A solution to all this would be great seeing I'm sitting on a few WD 8TB HDDs and I'd like to start using one for Wii/GameCube/WW/VC in a single partition.
 

element6

Well-Known Member
Newcomer
Joined
Jun 2, 2016
Messages
65
Trophies
0
Age
123
Location
Miami, FL
Website
www.google.com
XP
198
Country
United States
Yes, I seemed to have missed the entire drive was formatted to one partition in the very last part.

A solution to all this would be great seeing I'm sitting on a few WD 8TB HDDs and I'd like to start using one for Wii/GameCube/WW/VC in a single partition.

For Western Digital, the application is called WD Quick Formatter. It can be found here for Windows and Mac along with instructions: http://support.wdc.com/KnowledgeBase/answer.aspx?ID=3868

You want to use the "XP Compatible" configuration to enable 4096 byte sectors.

WDquickformat.jpg

Try using that tool above ^

After you enable XP compatible mode (4096 byte sectors) on WD Drives you should be able to create a single, 8TB FAT32/64k partition with FAT32 Format GUI, WBM, or Easeus. If it doesn't let you, try converting to GPT and give it another shot.
 

Clutz450

Well-Known Member
Member
Joined
Jul 20, 2013
Messages
779
Trophies
1
Age
41
XP
1,185
Country
United States
Thanks so much for all the tests you did. While I may not understand everything you did I'm sure someone else will and be able to put that information to good use.

I'm pretty sure I mentioned to you before that I have a WD MyBook drive and aside from running some utility to prevent it from sleeping I just took it out the box and was able to format the entire 4 TB to FAT32 with 64k sectors. The only issue I have with any of my drives (and I have a 1, 2, 3 and 4 TB drives all MyBooks) is that the drive doesn't get recognized when either my Wii or Wii U starts up. It always fails to load whatever I am launching and kick me back to the Wii menu. But when I try it again it loads just fine. Have you experienced anything like that on your drive with your tests?
 
  • Like
Reactions: element6

element6

Well-Known Member
Newcomer
Joined
Jun 2, 2016
Messages
65
Trophies
0
Age
123
Location
Miami, FL
Website
www.google.com
XP
198
Country
United States
Thanks so much for all the tests you did. While I may not understand everything you did I'm sure someone else will and be able to put that information to good use.

I'm pretty sure I mentioned to you before that I have a WD MyBook drive and aside from running some utility to prevent it from sleeping I just took it out the box and was able to format the entire 4 TB to FAT32 with 64k sectors. The only issue I have with any of my drives (and I have a 1, 2, 3 and 4 TB drives all MyBooks) is that the drive doesn't get recognized when either my Wii or Wii U starts up. It always fails to load whatever I am launching and kick me back to the Wii menu. But when I try it again it loads just fine. Have you experienced anything like that on your drive with your tests?

So far I am not having that issue. I haven't seen it happen when I was testing it with different partitioning schemes either, but I will let you know if anything changes once the drive has everything loaded on it. I can't think of what would cause that honestly. If you don't use UStealth on the drive and turn on the Wii-U with the drive attached, does it give you the nag notification that you need to format the drive in order to use it every time you power it on or only sometimes?
 

Clutz450

Well-Known Member
Member
Joined
Jul 20, 2013
Messages
779
Trophies
1
Age
41
XP
1,185
Country
United States
This program is terrible. Don't bother downloading.
Are you talking about USB Loader GX? Would you mind elaborating on that? What about it do you think is terrible. Everything about it works perfectly for me. Maybe you are having issues getting something to work the way you want it. If you give us some details we could help you work through whatever issues you may have.
 

Undeadslayer

Active Member
Newcomer
Joined
Jun 5, 2016
Messages
27
Trophies
0
Age
26
XP
63
Country
United States
Yes I'm talking about the USB loader gx. I had everything working just fine had GameCube games running on the program with Nintendo, then it all quit working. The program couldn't read/find my external hard drive, which was in a USB 2.0 at the time. I don't know what went wrong, if you can tell what happened that would be great, otherwise I'm chalking it up to bad programming.

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

Here's some more info, whenever I tried to load the games through nintendont, the program told me the director games was not on USB drive, and when ran it through USB load gx, it would act like the USB drive wasn't plugged into the Wii.
 

element6

Well-Known Member
Newcomer
Joined
Jun 2, 2016
Messages
65
Trophies
0
Age
123
Location
Miami, FL
Website
www.google.com
XP
198
Country
United States
You need to provide more details.
  • Hard drive size
  • Hard drive model
  • If it's in a third party external enclosure (IE, you purchased the HDD and then installed it into a universal external enclosure), give us the model or part number of that too.
  • USB port you had it plugged into on your Wii
  • Size and FS type of the partition that you have on the drive for USB Loader GX to scan. If FAT32, what was the cluster size?
  • MBR or GPT?
  • Version of USB Loader GX you were using
  • Are you loading the USB Loader GX app from an SD card or the hard drive?
  • If you were loading it from that same hard drive, does the HBC still see your apps on the drive?
  • Can you still see your data on the HD when you plug it into your computer?
  • If you can, post your GXGlobal.cfg on pastebin and give us a link so we can see
Have you read these?
http://gbatemp.net/threads/beginner...g-wiiware-vc-vackups-gamecube-backups.400975/
http://wiki.gbatemp.net/wiki/USB_Devices_Compatibility_List
 
Last edited by element6,

Undeadslayer

Active Member
Newcomer
Joined
Jun 5, 2016
Messages
27
Trophies
0
Age
26
XP
63
Country
United States
The hard drive size is 234gb. I don't know the hard drive model. I plugged the USB into port 2. Fat32 format, no cluster. I'm using the latest version of the app. I'm loading the app through my SD card, which is a sdhc 32gb. Yes hb still reads it. Yes I can see the data on my computer, and yes I have read those sites.
 

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
You want to use the "XP Compatible" configuration to enable 4096 byte sectors.
That's funny how they named it wrong.
WindowsXP is not compatible with 4096, and it the mode which needs the 512bytes/sector emulation enabled.
using the option should put the drive to 512, and the other (Vista and newer) to 4096.
I guess they messed their program or string :(
Does Seagate utility also set the "XP compatible" as 4k instead of the 512 emu mode?

Notice how not a single person mentions anything about 512 byte vs 4096 byte sectors or disabling the 512byte sector emulation?
Clutz mentioned it in your other thread, he quoted one of my guide about the FAT32 partition size limitation and sector size relation to the max size.
Though, I didn't know you could disable the 512byte/sector emulation mode, and I even thought that 4k drives were seen as 4k by the USBLoader if they didn't have the emulation mode.
The loader should report 512 if emu mode is enabled. Too bad I don't have a ready to use build with the drive info logging yet, I'll have to write one to debug the drive detection issue too. It would be great to see if the loader "see and use" the correct information from the drive.


As a lot of users already reported they had a 4k drive (hence why DIOS MIOS and nintendont didn't work) I thought they were already without the emu mode, and they could format bigger partitions and address sector past the 2GB mark.
Maybe the way Wii homebrew are detecting the 4k are not correct and mixing the emu mode with real mode for different things. like detecting the drive as 4k but addressing sectors as 512k? (should be really bad)

I plugged the USB into port 2.
There's no USB Port 2, there is a Port0 (bottom on Wii back, top on WiiU back), and Port1 (top on Wii back, bottom on WiiU back).
You need to plug the drive on USB Port0.

Also "it doesn't work anymore" is not very informative. you didn't explain what is not working : the loader, the games, the hdd detection, etc.
Do you have cIOS still installed and detected correctly? which version and base ?

whenever I tried to load the games through nintendont, the program told me the director games was not on USB drive,
and when ran it through USB load gx, it would act like the USB drive wasn't plugged into the Wii.
From this, it seems the issue is also present inside Nintendont, and not only USBLoaderGX, so the issue is not the program but your drive, or maybe it's connected to the wrong usb port and this is why it's not detected.

it's easy to reject the fault on the program when the issue is something else. but if you think the program is at fault and badly programmed, you are free to try another one (Wiiflow or CFG Loader) and see if it works fine. If they do, then there is effectively an issue with USBLoaderGX. IF they don't work (like nintendont that you already tested) then it's likely an issue from your side.

I acknowledge that the program still has HDD compatibility issues, but it's not "just like that" making things not working anymore. It either works or not from the start.
 

Undeadslayer

Active Member
Newcomer
Joined
Jun 5, 2016
Messages
27
Trophies
0
Age
26
XP
63
Country
United States
That's my bad on not being more specific. I plugged the USB drive into the bottom port of the Wii, like your supposed to. I don't think it's the drive because it still reads on my computer. Yes I have CIOs installed and detecting. It's version 236 in slot 249.
 

GreyWolf

Well-Known Member
Member
Joined
Mar 2, 2015
Messages
5,399
Trophies
0
Age
54
XP
1,516
Country
United States
That's my bad on not being more specific. I plugged the USB drive into the bottom port of the Wii, like your supposed to. I don't think it's the drive because it still reads on my computer. Yes I have CIOs installed and detecting. It's version 236 in slot 249.

Does the drive have its own power supply or is it USB-powered? Those need to be connected with a Y-cable to get enough power.
 

Amontre

Member
Newcomer
Joined
Jan 20, 2016
Messages
15
Trophies
0
Age
43
XP
118
Country
Malaysia
I had a good working setup but I'm not sure what setting I have changed now Everytime I load my vc I get this error ""neek nand path selection failed"

If I click OK and click START the game will load just fine and all other game will not have the error message. It's quite annoying.

P/S : I did accidently click dump nand to emunand - everything then cancel it.
 
Last edited by Amontre,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: @BakerMan, why dont we play some gartic phone too?