Hacking USB Loader GX

  • Thread starter Thread starter blackb0x
  • Start date Start date
  • Views Views 8,063,308
  • Replies Replies 30,225
  • Likes Likes 74
Having trouble getting my USB Samsung T7 SSD to work. Would give up but it IS somewhat working elsewhere, just not in the 2nd re-initialization of USB during USB Loader GX startup.
So ios and mod wise i think i followed everything correctly. i'll include the syscheck on bottom of this post.

If i understand correctly both Homebrew channel and USB Loader GX as well as wiiXplorer use IOS58 to communicate with my USB - SSD.
* In wiiXplorer this works correctly and i can see and open files + it stores configuration on my USB-SSD
* Also homebrew left some files on there, cant quite remember how or which files, but I've seen them (before numerous reformats)
* Start USB Loader GX it will go through its first USB detection cycle, this 'detects' quite fast. i see my blue led on SSD flashing indicating that its being read, USB Loader GX is then going to loading config and eventual re-initialising USB. My SSD gets 'unmounted' during which i a RED led, this also happens when i switch to wiiXplorer or to Homebrew, or to USB Launcher GX initially.. Then the blue solid light will turn back on (suggesting successful remount?). but USB Launcher GX enters the 20 sec countdown loop and then just goes to Loader screen with UN-initialised USB device.

So during or around the 're-initializing usb' i can see the message that it is switching to IOS 249. From this i conclude that either IOS249 is NOT working with my SSD or my SSD does not have expected state in the (2nd) countdown loop. OR something happens before
i tried modifiying meta.xml of USB on my SD card (not ssd, start from homebrew | sd), to boot with 251 or to set 251 as loader but that doesn't seem to have any effect.. it boots like described above then i can see it switching to 249

Could not find where all the ioss'es are used for.. IOS251 base 58 i assumed is a patched IOS58, so that's why i tried that


So i dug a bit in the code, and found the StartupProcess.cpp.. This seems to confirm what i observe:
* first starts in IOS58 and detects the USB (or at least makes the led flash), i think it also enters the spinup loop for this, but that doesnt get to coutning down, just moves on quite fast
* then notices other IOS is configured thus Unmounts(Destory / deinit), remounts en enters spinup loop, times out
so the difference between those pieces of code is IOS content and the DeviceHandler::DestroyInstance(); and USBStorage2_Deinit()

so i figured mebe recompile myself, then see if i can fidle around a bit adding logging. but recompiling on my pc fails after minute or so, also included the recompile failure's in spoiler tag below.

Also how can i see debug printing, eg the gprintf's that are 'everywhere' ?






SysCheck ME v2.5.0 by blackb0x, JoostinOnline, Double_A, R2-D2199 and Nano
...runs on IOS58 (rev 6176).

Region: PAL
System Menu 4.3E (v514)
Priiloader installed
Drive date: 02.13.2007
Homebrew Channel 1.1.2 running on IOS58

Hollywood v0x11
Console ID: 62661803
Console Type: Wii
Shop Channel Country: Netherlands (94)
Boot2 v4
Found 67 titles.
Found 47 IOS on this console. 14 of them are stubs.

IOS4 (rev 65280): Stub
IOS9 (rev 1034): No Patches
IOS10 (rev 768): Stub
IOS11 (rev 256): Stub
IOS12 (rev 526): No Patches
IOS13 (rev 1032): No Patches
IOS14 (rev 1032): No Patches
IOS15 (rev 1032): No Patches
IOS16 (rev 512): Stub
IOS17 (rev 1032): No Patches
IOS20 (rev 256): Stub
IOS21 (rev 1039): No Patches
IOS22 (rev 1294): No Patches
IOS28 (rev 1807): No Patches
IOS30 (rev 2816): Stub
IOS31 (rev 3608): No Patches
IOS33 (rev 3608): No Patches
IOS34 (rev 3608): No Patches
IOS35 (rev 3608): No Patches
IOS36 (rev 3608): No Patches
IOS37 (rev 5663): No Patches
IOS38 (rev 4124): No Patches
IOS40 (rev 3072): Stub
IOS41 (rev 3607): No Patches
IOS43 (rev 3607): No Patches
IOS45 (rev 3607): No Patches
IOS46 (rev 3607): No Patches
IOS48 (rev 4124): No Patches
IOS50 (rev 5120): Stub
IOS51 (rev 4864): Stub
IOS52 (rev 5888): Stub
IOS53 (rev 5663): No Patches
IOS55 (rev 5663): No Patches
IOS56 (rev 5662): No Patches
IOS57 (rev 5919): No Patches
IOS58 (rev 6176): USB 2.0
IOS60 (rev 6400): Stub
IOS61 (rev 5662): No Patches
IOS70 (rev 6912): Stub
IOS80 (rev 6944): No Patches
IOS222 (rev 65280): Stub
IOS223 (rev 65280): Stub
IOS248[38] (rev 65535, Info: d2x-v11beta1): Trucha Bug, ES Identify, NAND Access
IOS249[56] (rev 65535, Info: d2x-v11beta1): Trucha Bug, NAND Access, USB 2.0
IOS250[57] (rev 65535, Info: d2x-v11beta1): Trucha Bug, NAND Access, USB 2.0
IOS251[58] (rev 65535, Info: d2x-v11beta1): Trucha Bug, NAND Access, USB 2.0
IOS254 (rev 65281): BootMii
BC v6
MIOS v10
Report generated on 05/22/2023.
#~/usbloadergx$ make
sjis.cpp
~/usbloadergx/source/utils/sjis.cpp: In function 'std::string sj2utf8(const std::string&)':
~/usbloadergx/source/utils/sjis.cpp:2104:39: error: 'uint8_t' was not declared in this scope
2104 | char arraySection = ((uint8_t)input[indexInput]) >> 4;
| ^~~~~~~
~/usbloadergx/source/utils/sjis.cpp:2:1: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
1 | #include "sjis.h"
+++ |+#include <cstdint>
2 |
~/usbloadergx/source/utils/sjis.cpp:2104:47: error: expected ')' before 'input'
2104 | char arraySection = ((uint8_t)input[indexInput]) >> 4;
| ~ ^~~~~
| )
~/usbloadergx/source/utils/sjis.cpp:2114:51: error: expected ')' before 'input'
2114 | arrayOffset += (((uint8_t)input[indexInput]) & 0xf) << 8;
| ~ ^~~~~
| )
~/usbloadergx/source/utils/sjis.cpp:2114:81: error: expected ')' before ';' token
2114 | arrayOffset += (((uint8_t)input[indexInput]) & 0xf) << 8;
| ~ ^
| )
~/usbloadergx/source/utils/sjis.cpp:2121:17: error: 'uint16_t' was not declared in this scope
2121 | uint16_t unicodeValue = (convTable[arrayOffset] << 8) | convTable[arrayOffset + 1];
| ^~~~~~~~
~/usbloadergx/source/utils/sjis.cpp:2121:17: note: 'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
~/usbloadergx/source/utils/sjis.cpp:2123:20: error: 'unicodeValue' was not declared in this scope
2123 | if(unicodeValue < 0x80)
| ^~~~~~~~~~~~
make[1]: *** [/opt/devkitpro/devkitPPC/base_rules:15: sjis.o] Error 1
make: *** [Makefile:153: build] Error 2
 
Last edited by dewfuz,
i tried modifiying meta.xml of USB on my SD card (not ssd, start from homebrew | sd), to boot with 251 or to set 251 as loader but that doesn't seem to have any effect.. it boots like described above then i can see it switching to 249
Restore the unmodified meta.xml file and then boot up the loader, set the loaders IOS to 58, exit the loader and then boot it up again. This should result in the loader not using a cIOS at all, so your USB storage device will only be initialised once.

My suggestion might allow games to be listed, but there's a chance that you can't actually play any of your Wii backups because the cIOS doesn't support your USB storage device.


so i figured mebe recompile myself, then see if i can fidle around a bit adding logging. but recompiling on my pc fails after minute or so, also included the recompile failure's in spoiler tag below.
A devkitPPC update was released recently that introduced all of these compiler issues. So if you really want to compile the loader yourself then you'll need to use a slightly older version of devkitPPC.

I've already fixed everything in my local copy, but I don't push changes to GitHub until I'm ready to release an update.
 
Last edited by blackb0x,
  • Like
Reactions: jeannotte
Just my 2cents: I always suffered of my Wii not being able to write to SD cards intermittently (some times it works, some times it does not). Here is the fix:


Maybe it's a known thing (I think it is not mentioned in the Wii manual), but the SD card must not be removed when the Wii is turned on.

On my end, if I do so, it corrupts the card each time.
On Windows, it says the card is write-protected although the lock is off. Switch the lock on-off several times makes the card writable again (yeah, weird).

Now, I always turn off the Wii before removing the SD card (or an Usb device), and I don't have the corruption message anymore (I use this card only on the Wii -official 2GB Sandisk for Wii)
 
  • Like
Reactions: jeannotte
@blackb0x - I've heard that music game DLC won't install/run if games are installed to front SD card slot rather than an external rear drive. Is this correct?

If so, would this be a possible feature n the future so that everything could be nicely tucked away in that SD card slot?

Thanks!
 
@blackb0x - I've heard that music game DLC won't install/run if games are installed to front SD card slot rather than an external rear drive. Is this correct?

If so, would this be a possible feature n the future so that everything could be nicely tucked away in that SD card slot?

Thanks!
I'm not familiar with music game DLC, since I don't play them games. But if the DLC is in WAD format and it's installed to your real NAND then it should work.

If the game needs to read any data from your SD card then it won't work, since the d2x cIOS doesn't allow reads or writes to files on your SD card while a game is being read from the SD card. And that's unlikely to change, since I don't have the tools required to easily debug the cIOS.
 
Last edited by blackb0x,
Hey guys. I use neek mode for some problematic games like "Castelvania ReBirth". But 480p pixel patch does not work in this mode. Is there a solution to this problem? Below is an example of "Contra ReBirth", EmuNAN Chanel Mode Neek / Full
obs64_2023-05-28_16-50-591.png
.
 
USBLoader GX r1262 plugin mod v2

download - https://www.mediafire.com/?x8anxwhp6umauzn

added simple game window
added the ability to put the plugin dol file in apps folder or even root of SD or USB device
using r1262 so that means the nintendont cfg v7 and triforce arcade mode option is included

So, if you put the plugin dol file in the apps folder edit the plugin ini file by putting the full path after dolfile=
example: sd:/apps/snes9xgx/snes9xgx-mod12.dol

or if you want to use the apps boot dol
example: sd:/apps/snes9xgx/boot.dol

but not all boot.dol support args for autobooting the game - i know snes9xgx, vbagx, and fceugx don't.
EDIT: if you use the official 2019+ releases as the plugin dol they do support args and can be used as wiiflow plugins.

Also, I tried search for wii games and it works fine, plus i selected wii and gc games then downloaded covers and it showed both wii and gc covers after the download.
@fledge68 Greetings, is it possible to add a plugin mod to the latest version of usb loader gx?
 
Anyone have problem with prince of persia forgoten sands on virtual wii?

It doesnt display title screen just blankscreen

I already set :
480p fix To off
video width to auto
deflicker filter to auto

I already switch to base ios 56 & 57 still no title screen
 
Hi! I love the Blackmod version and my Wii ❤❤❤ are there news about it getting merged with the official version anytime soon?
I guess you mean the blackb0x version? That now is the official version.

Hey guys. I use neek mode for some problematic games like "Castelvania ReBirth". But 480p pixel patch does not work in this mode. Is there a solution to this problem? Below is an example of "Contra ReBirth", EmuNAN Chanel Mode Neek / Full
The easiest solution might be to install that game to your real NAND, since then the loader can patch it in various ways.

Anyone have problem with prince of persia forgoten sands on virtual wii?
That game has anti-piracy checks, so have you fully disabled cheats or resolution patches? Maybe reset the loader and the game to their default settings?

I can confirm that the game works correctly for me on both a Wii and vWii.
 
That game has anti-piracy checks, so have you fully disabled cheats or resolution patches? Maybe reset the loader and the game to their default settings?

I can confirm that the game works correctly for me on both a Wii and vWii.
Ok ill try reset the loader
 
@blackbox, I found a bug with controllers. It happens with every controller I tested so far which are Wii U Pro Controller, Wii Classic Controller, Wii Remote. On these controllers - and + buttons are used to scroll left and right. Holding these buttons keep scrolling left or right. But if I press "+" and immediately press "-", it keeps scrolling to the right as long as I hold "-" button. But it doesn't happen when pressing "-" then holding "+". Can you look into this?
 
if anyone even still manages this forum, why does the app show up empty? ive watched videos and it shows for other people too but it goes away after about a second after everything loads. image below is all that i get, even if i wait for an hour.
image_2023-05-30_200828340.png
 
Holding these buttons keep scrolling left or right. But if I press "+" and immediately press "-", it keeps scrolling to the right as long as I hold "-" button. But it doesn't happen when pressing "-" then holding "+". Can you look into this?
It looks like the loader doesn't expect you to press both of them buttons at the same time, especially on a Wiimote where you'd normally hold it with one hand and use your thumb to press the buttons.

I'll look into if this can be improved, but it'll be low priority since the issue can easily be avoided by lifting your thumb up off of the button before your press another button.


why does the app show up empty? ive watched videos and it shows for other people too but it goes away after about a second
A delay can happen with r1272 and older if you've got a large collection of games. And a 2~ delay might be noticeable with r1281 the first time you boot the loader or if you add new games to your storage device via a PC, since the loader will rebuild it's cache so that subsequent boots are much faster.

In your case it seems like the loaders either struggling to read your USB storage device or your SD card is write protected. So first you should check that your SD card is writable and then check if the loader boots correctly with your USB storage device disconnected.

It'd be useful to know if you're using a USB hard drive or a USB flash drive and what version of the loader you're using. And I'd assume that you've followed this guide to install the d2x cIOS?
 
  • Like
Reactions: Nomado
Thanks. So after pressing "+" then holding "-", plus button doesn't need to be held once this starts. As long as minus is held it will keep scrolling to the right. I think just pressing plus then pressing minus while taking finger off plus button without having them pressed together also produces this maybe its just me switching to minus before contact with plus is released though.
 
@blackb0x
Yes I have installed d2x, and it is a flash drive. I can't use an SD due to the fact that it's a Wii Mini. Also, it's the newest update as of 5/30/2023. I don't have any spare hard drives except for a dead internal HDD, so this is all I've got to work with. Do you know of any USB Loader GX alternatives that might work better with flash drives/wont brick my wii? A lot of people have told me that it's very easy to brick a Wii Mini so I just want to make sure.
 
I think just pressing plus then pressing minus while taking finger off plus button without having them pressed together also produces this maybe its just me switching to minus before contact with plus is released though.
If I remove my thumb from either button then it immediately stops scrolling. So I was only able to replicate the issue by continuing to hold a button while I started to press the other button.

Do you know of any USB Loader GX alternatives that might work better with flash drives/wont brick my wii? A lot of people have told me that it's very easy to brick a Wii Mini so I just want to make sure.
I could guide you through editing the xml and config files to force the loader to boot with IOS58, but it'd be quicker for you to try WiiFlow Lite, since I believe that boots with IOS58 by default. But if the d2x cIOS doesn't like your flash drive then games might not work anyway.
 
  • Like
Reactions: phantzm

Site & Scene News

Popular threads in this forum