Hacking USB Loader GX

  • Thread starter cyrex
  • Start date
  • Views 7,189,566
  • Replies 29,369
  • Likes 48

Zonta85

Well-Known Member
Member
Joined
Nov 9, 2007
Messages
436
Trophies
0
Age
39
Location
Ascoli Piceno
Website
www.facebook.com
XP
523
Country
Italy
like GreyWolf said.

add these line to english.lang at line#1734

msgid "Plugins Default Partition"
msgstr ""

msgid "Plugin Files Path"
msgstr ""

then

add your laguage msgid and msgstr to your language file.

my bad for not adding them.

Thank you for the help. It seems that in the English.lang lines 1733 and 1734 seems to be for other purposes:
1733 msgid "Play Previous"
1734 msgstr ""

Should i add

msgid "Plugins Default Partition"
msgstr ""

msgid "Plugin Files Path"
msgstr ""

At the line 1735, having this at the end?

1733 msgid "Play Previous"
1734 msgstr ""
1735
1736 msgid "Plugins Default Partition"
1737 msgstr ""
1738
1739 msgid "Plugin Files Path"
1740 msgstr ""
1741
1742 msgid "Playing Music:"
1743 msgstr ""
 
Last edited by Zonta85,

GreyWolf

Well-Known Member
Member
Joined
Mar 2, 2015
Messages
5,399
Trophies
0
Age
54
XP
1,516
Country
United States
The line number (or even the order) doesn't have to be the same. Just the pairs of English msgids and translated msgstrs.

"Play Previous" will always have the same hash code. Look in the English language file for what you're translating then replace the msgstr in the file for the language you're translating it to. If it's missing you can just add it. Just make sure the msgid is exactly the same as it is in the loader's code where the tr() macro is that contains the original text.

e.g.:
msgid "Play Previous"
msgstr "I am a platypus."
 
  • Like
Reactions: self_slaughter

GreyWolf

Well-Known Member
Member
Joined
Mar 2, 2015
Messages
5,399
Trophies
0
Age
54
XP
1,516
Country
United States
Where i can control the loader's code?
Can't i just see for the msgid at what i have on screen using usbloadergx?

What it shows on-screen in English is what it looks up to translate. As long as you make sure you have all of the capitalization and punctuation in your msgid it should find it.

Make sure you're using the english.lang file from the latest revision. I just regenerated the language files and it didn't change any of them so they should be current. If you know how to check the source out and can install devkitPPC you can always create up to date language files by running "make lang".

These should be current but I attached a zip file of the ones I generated just in case.

There is a handy application called PoEdit that's handy for editing the lang files. You just have to tell Windows to open the .lang extension with it after it's installed.
 

Attachments

  • Languages.zip
    312.4 KB · Views: 195
Last edited by GreyWolf,
  • Like
Reactions: Zonta85

WuaZ

Active Member
Newcomer
Joined
Mar 17, 2015
Messages
26
Trophies
0
XP
262
Country
France
(edit: don't take it bad, I'm not angry about you, just pointing that it's missing a step in the way we should report the bug)
sorry, but that's still not answering my question, which is :
is the issue happening ONLY when the "custom cover" option in the cover download menu is being checked, or the issue is "downloading covers when gamecube games are enabled in the 4th menu".
Maybe you think "custom banner" is the banner layout (where you see animated banners to select games).
I guess the loader menu's name are confusing, I might name them differently than what other users call them.

I did the test on r1260 release, and your guess was correct: the bug only occurs when "custom banner" is ticked. If I unselect "custom banner", there is no issue (the Wii games are still displayed after scrapping).
 

self_slaughter

Well-Known Member
Member
Joined
Apr 27, 2009
Messages
105
Trophies
0
XP
246
Country
I did the test on r1260 release, and your guess was correct: the bug only occurs when "custom banner" is ticked. If I unselect "custom banner", there is no issue (the Wii games are still displayed after scrapping).
I did knock up a "fix" for that a few days ago by making sure it refreshed the list after checking covers, as I personally couldn't see what was wrong with the code. But that will certainly help narrow down the original cause. :)


edit: Test DOL (1262 + gamecube cover fix, Doesn't include plugin mod.)
http://www.mediafire.com/file/fns6skraxbp57kg/boot.dol
edit: Test DOL #2 (1262 + gamecube cover fix + plugin mod)
http://www.mediafire.com/file/d19yd3w013xvvq2/boot.dol

Sent from my Nexus 5 using Tapatalk
 

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
I did the test on r1260 release, and your guess was correct: the bug only occurs when "custom banner" is ticked. If I unselect "custom banner", there is no issue (the Wii games are still displayed after scrapping).
Thank you for doing the test again :)
Seeing it's only with custom banner, I can find the issue. Or I can just restore all the covers with slaughter patch. If I also don't find the real issue, I'll go with your patch. Thanks.

I will add the two related lines in english.lang and italian.lang and submit them here tomorrow.
Thank you again.
You don't need to release an english version of the lang file.
the lang files are automatically generated at compile time, it adds the missings strings to the file in alphabetic order.

when you compile, you type "make", after the make is done, you type "make lang" to generate the lang files based on the strings found in the sources.
it will re-generate all language files, so all translators can easily add the new translation without adding the english strings manually.

I usually release new lang when there's new string to translate, or if I got a new version from a translator.

if you already translated the new strings for the plugin mod, that's great. When I'll add your file it will already have the italian translation for that release :)
 
  • Like
Reactions: Zonta85

Zonta85

Well-Known Member
Member
Joined
Nov 9, 2007
Messages
436
Trophies
0
Age
39
Location
Ascoli Piceno
Website
www.facebook.com
XP
523
Country
Italy
You don't need to release an english version of the lang file.
the lang files are automatically generated at compile time, it adds the missings strings to the file in alphabetic order.

when you compile, you type "make", after the make is done, you type "make lang" to generate the lang files based on the strings found in the sources.
it will re-generate all language files, so all translators can easily add the new translation without adding the english strings manually.

I usually release new lang when there's new string to translate, or if I got a new version from a translator.

if you already translated the new strings for the plugin mod, that's great. When I'll add your file it will already have the italian translation for that release :)

Thank you again :) I made a couple of minor bugfixes and i added the two lines for the plugins. I've tested it hard and it works flawessly. File attached, just rename it to .lang. :)
 

Attachments

  • italian.txt
    55.8 KB · Views: 328
Last edited by Zonta85,

spielvan

Well-Known Member
Newcomer
Joined
Oct 10, 2016
Messages
85
Trophies
0
Age
45
XP
923
Country
Brazil
A request to the programmer Usb Loader gx, the wiiflow already own.

When I load the usb loader gx with a control on the input controls des Game Cube, the remote turns off, and only reconnect when you click any button on the remote, thus it saves load the Wii Remote, this function already exists in wiiflow and is one of the main reasons I use it, the less use the best remote. A big hug.
 

self_slaughter

Well-Known Member
Member
Joined
Apr 27, 2009
Messages
105
Trophies
0
XP
246
Country
Had a further look into the gamecube cover thing as it is something that affects me, and I'm bored... :)

I can see the banners are the only instance where it changes the loader mode back and forth during the download of covers in ImageDownloader.cpp, but I'm not sure if there's a better place/way to refresh it other than what I did a few days ago? (Although it's unneeded for some users, but custom banners is the default option...)

Maybe just force the reload if gc games are selected?

ImageDownloader.cpp (untouched)
Code:
    if((Settings.LoaderMode & MODE_GCGAMES) && strcmp(fileExt, ".bnr") == 0)
    {
        short LoaderModeBackup = Settings.LoaderMode;
        Settings.LoaderMode = MODE_GCGAMES;        // Limit banner download for GameCube Only.
        GetMissingGameFiles(writepath, fileExt, MissingFilesList);
        Settings.LoaderMode = LoaderModeBackup;
    }

edit:

Made it refresh only under the same search conditions as the banner downloader. (Bar the checkbox itself)

GameBrowseMenu.cpp (modified)
Code:
    else if (DownloadBtn->GetState() == STATE_CLICKED)
    {
        gprintf("\tDownloadBtn Clicked\n");
        ImageDownloader::DownloadImages();
        if(Settings.LoaderMode & MODE_GCGAMES)
        {
            gameList.FilterList();
        }
        ReloadBrowser();
        DownloadBtn->ResetState();
    }

1262 - http://www.mediafire.com/file/515m5j68g72gbly/boot.dol
1262 + plugin - http://www.mediafire.com/file/nhaw1wvuriadrww/boot.dol

Edit: It does add a second or so extra lag, reloading the entire list like that... so it's not ideal, but better than breaking I guess.

A more elegant solution may be required.. :/
 
Last edited by self_slaughter,
  • Like
Reactions: Cyan

TheBroCode

Well-Known Member
Member
Joined
Oct 31, 2012
Messages
171
Trophies
1
XP
711
Country
Something I've wondered about for a while, it's not a problem but just something I'd like to know a bit more about:

Every so often when I quit a game or emulator back to the Wii menu (which on my setup takes me straight into USB Loader GX via a forwarder), as it initializes it will fail when it gets to the HDD. Everything else is fine and it loads USB Loader GX. This isn't too much of a problem for me as this probably only happens maybe 5-10% of the time and if I restart my Wii it initializes fine again.

However after it fails and loads USB Loader GX the error message comes up "Error: USB Device not initialized. Switching to channel list mode." - I think I have it set to channel list mode anyway because nothing looks different. The only thing different is Wii Games have been turned off in the "Select title sources" menu.

I was wondering is it possible to not have it turn Wii Games off after it fails to initialize the HDD or is it required as a safety thing?
 
Last edited by TheBroCode,

sideskroll

Well-Known Member
Member
Joined
Aug 25, 2010
Messages
653
Trophies
0
Age
41
Location
Here
XP
420
Country
Peru
Something I've wondered about for a while, it's not a problem but just something I'd like to know a bit more about:

Every so often when I quit a game or emulator back to the Wii menu (which on my setup takes me straight into USB Loader GX via a forwarder), as it initializes it will fail when it gets to the HDD. Everything else is fine and it loads USB Loader GX. This isn't too much of a problem for me as this probably only happens maybe 5-10% of the time and if I restart my Wii it initializes fine again.

However after it fails and loads USB Loader GX the error message comes up "Error: USB Device not initialized. Switching to channel list mode." - I think I have it set to channel list mode anyway because nothing looks different. The only thing different is Wii Games have been turned off in the "Select title sources" menu.

I was wondering is it possible to not have it turn Wii Games off after it fails to initialize the HDD or is it required as a safety thing?
Try changing the default cIOS the loader uses to initialize. Put it on IOS 58 (don't worry, it'll still relaunch it with 249 after it "kicks" the HDD awake) I think the not displaying Wii/GCN channels is a safety measure as to not try to access a device that for all intents and purposes is NOT connected (at least to the loader that is)

Off topic, @Cyan could you take a look at this post I made and tell me if it would even be possible? I know it's not your issue or that maybe you have no idea but it's worth a shot since otherwise I don't think it'll even be noticed.
https://gbatemp.net/threads/nintendont.349258/page-1739#post-6797682
 

GreyWolf

Well-Known Member
Member
Joined
Mar 2, 2015
Messages
5,399
Trophies
0
Age
54
XP
1,516
Country
United States
Had a further look into the gamecube cover thing as it is something that affects me, and I'm bored... :)

I can see the banners are the only instance where it changes the loader mode back and forth during the download of covers in ImageDownloader.cpp, but I'm not sure if there's a better place/way to refresh it other than what I did a few days ago? (Although it's unneeded for some users, but custom banners is the default option...)

Maybe just force the reload if gc games are selected?

ImageDownloader.cpp (untouched)
Code:
    if((Settings.LoaderMode & MODE_GCGAMES) && strcmp(fileExt, ".bnr") == 0)
    {
        short LoaderModeBackup = Settings.LoaderMode;
        Settings.LoaderMode = MODE_GCGAMES;        // Limit banner download for GameCube Only.
        GetMissingGameFiles(writepath, fileExt, MissingFilesList);
        Settings.LoaderMode = LoaderModeBackup;
    }

edit:

Made it refresh only under the same search conditions as the banner downloader. (Bar the checkbox itself)

GameBrowseMenu.cpp (modified)
Code:
    else if (DownloadBtn->GetState() == STATE_CLICKED)
    {
        gprintf("\tDownloadBtn Clicked\n");
        ImageDownloader::DownloadImages();
        if(Settings.LoaderMode & MODE_GCGAMES)
        {
            gameList.FilterList();
        }
        ReloadBrowser();
        DownloadBtn->ResetState();
    }

1262 - http://www.mediafire.com/file/515m5j68g72gbly/boot.dol
1262 + plugin - http://www.mediafire.com/file/nhaw1wvuriadrww/boot.dol

Edit: It does add a second or so extra lag, reloading the entire list like that... so it's not ideal, but better than breaking I guess.

A more elegant solution may be required.. :/

It should refresh after the download is completed no matter what the selections were. If there's a delay a progress window would be appropriate. :P
 
  • Like
Reactions: self_slaughter

self_slaughter

Well-Known Member
Member
Joined
Apr 27, 2009
Messages
105
Trophies
0
XP
246
Country
It should refresh after the download is completed no matter what the selections were. If there's a delay a progress window would be appropriate. :P
That's what I thought originally as the safer option, but it was only really the banner download that threw the list off.

Up to Cyan anyway. Just shooting ideas. :)

Sent from my Nexus 5 using Tapatalk
 

geheim

Well-Known Member
Member
Joined
Jan 4, 2013
Messages
272
Trophies
0
XP
1,256
Country
Germany
I did knock up a "fix" for that a few days ago by making sure it refreshed the list after checking covers, as I personally couldn't see what was wrong with the code. But that will certainly help narrow down the original cause. :)

Your Version works pretty fine, thanks for it! Only issue is that my Wii U vWii crashes when exiting to HBC or Wii Menu. I don't know why, does this happen for others as well??
 

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
It looks like build done by other users are working fine !
Maybe that's my own devkit which has an issue ?
I could try to build the same dol and compare if you have the issue on mine.

Maybe I messed the portlib too much, or I still have old portlib version for some libraries (like png, or zip, etc.). I don't know.

you are using the portlib provided on sourceforge?
I should replace all my folder with that one.

Off topic, @Cyan could you take a look at this post I made and tell me if it would even be possible? I know it's not your issue or that maybe you have no idea but it's worth a shot since otherwise I don't think it'll even be noticed.
https://gbatemp.net/threads/nintendont.349258/page-1739#post-6797682
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.

However after it fails and loads USB Loader GX the error message comes up "Error: USB Device not initialized. Switching to channel list mode." - I think I have it set to channel list mode anyway because nothing looks different. The only thing different is Wii Games have been turned off in the "Select title sources" menu.

I was wondering is it possible to not have it turn Wii Games off after it fails to initialize the HDD or is it required as a safety thing?
It was like that before, and I changed the loader's behavior to match the message displayed.
I'll revert it, and only add channels, instead of removing wii games.
It's causing too much issues with users not understanding why after plugging an USB with games they still don't see games (because they didn't plug the USB on previous launch, it disabled wii games listing).

it will be easier.
I also fixed an issue where the loader crashed if Wii was selected while USB wasn't mounted, so now it should be fine to have Wii games always enabled.

OR maybe, just stop setting the loader automatically in channel mode when no USB is detected.
just ask which mode to display on first install, then only keep the user's settings on all new launch.
maybe a message "attention, Wii is selected but your USB is not detected, look in 4th option to switch modes if needed" ?
instead of forcing settings automatically, I like it better. it's more noob friendly to not do things automatically.

Edit: It does add a second or so extra lag, reloading the entire list like that... so it's not ideal, but better than breaking I guess.
Thank you for taking the time to look at that issue again :)
About the "few seconds" added to reload the full game list, you should ask SonicTopFan with his 4000 games how many minutes he has to wait to reload the full list :(

(yes sonictopfan, I know, you asked about game cache :P)

refreshing the full list only when there's a new banner downloaded could be better than reloading it when gamecube is enabled.
But there should be another way to fix that issue.

I said few page back that the loader had a bug when downloading banners, and I fixed the code.
What's very strange is that the loader worked fine with the bug!
the code you quoted, it had : if((Settings.LoaderMode & MODE_GCGAMES) && strcmp(fileExt, ".nbr") == 0)
"nbr" instead of "bnr", but I think banners where downloaded correctly, so maybe that part of the source is not required? I find this very strange.



I wasn't home today.
I'll try to work on the loader tomorrow. I have nothing planned.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BigOnYa @ BigOnYa:
    I kept thinking jaws was gonna come up and attack
  • K3Nv2 @ K3Nv2:
    Jaws is on a diet
  • K3Nv2 @ K3Nv2:
    Damn power went out
  • BigOnYa @ BigOnYa:
    Ok xdqwerty, your little bro prob tripped On the cord and unplugged you
  • K3Nv2 @ K3Nv2:
    Ya I'm afraid of the dark hug me
  • BigOnYa @ BigOnYa:
    Grab and hold close your AncientBoi doll.
  • K3Nv2 @ K3Nv2:
    Damn didn't charge my external battery either
  • BigOnYa @ BigOnYa:
    Take the batteries out of your SuperStabber3000... Or is it gas powered?
  • K3Nv2 @ K3Nv2:
    I stole batteries from your black mamba
    +1
  • K3Nv2 @ K3Nv2:
    My frozen food better hold up for an hour I know that
  • BigOnYa @ BigOnYa:
    Or else gonna be a big lunch and dinner tomorrow.
  • BigOnYa @ BigOnYa:
    Did you pay your power bill? Or give all yo money to my wife, again.
  • K3Nv2 @ K3Nv2:
    Oh good the estimated time is the same exact time they just said
    +1
  • BigOnYa @ BigOnYa:
    Load up your pc and monitor, and head to a McDonalds dining room, they have free WiFi
  • K3Nv2 @ K3Nv2:
    Sir please watch your porn in the bathroom
    +2
  • BigOnYa @ BigOnYa:
    No sir we can not sell you anymore apple pies, after what you did with the last one.
  • K3Nv2 @ K3Nv2:
    We ran out
  • HiradeGirl @ HiradeGirl:
    for your life
    +1
  • K3Nv2 @ K3Nv2:
    My life has no value my fat ass is staying right here
  • K3Nv2 @ K3Nv2:
    Nearly 4 hours without power :(
  • Veho @ Veho:
    SO POWERLESS
  • K3Nv2 @ K3Nv2:
    Tell Kanye I need power
    K3Nv2 @ K3Nv2: Tell Kanye I need power