Hacking USB Loader GX

  • Thread starter Thread starter blackb0x
  • Start date Start date
  • Views Views 8,066,540
  • Replies Replies 30,226
  • Likes Likes 74
Just my 2 cents, if you want to set a custom config path in the CFG file, how should the loader know where to get it from, as it has to read the CFG file before it knows where to look for it, i think that's kind off crazy, dont you?
 
dimok said:
@--JoCa-- You need to check your settings maybe you used an earlier version of the Loader and the old config files messed up your Loader.

If the Loader didnt create a folder than your SD might have been locked. If so you need to make the SD "writeable" (the little switch on the side of sd-card).

The download didnt even start if the folders are not created.

It was "writeable" last time I checked...

Argh... I'm getting confused...
I have the USB Loader GX v1.0 Channel (from 2 or 3 pages behind), and it is all default. It created a global_config.cfg, as I see it inside the SD.

I'll try later... I will only be able to touch my Wii after 7 loooooooong hours :/


Btw, I still can't play SSBB via USB loader. Neither Wanin's 1.1; 1.5; USB GX channel; HBC; SSBB Custom channel; DVD5 or DVD9...
frown.gif
 
dimok said:
So basicly you are saying that the loader should set at the first run the configpath right???


Did you think of how the hell the loader should know on the second run that the configpath was moved? He cant just search the damn whole SD Card for the file.

Somehow he needs to know where the configfiles are......he cant just know out of himself that the configpath was moved (he needs to load it of the config file to find out it was moved).

How about the command similar to "RELATIVE path"? That is, a path RELATIVE to the boot.dol. I believe this is how the ULTIMATE Loader works.
 
WAAAAAAAAAAAAAAAA.....................



EDIT: @Tintin

dimok said:
omg dont you guys get it? HOW THE HELL SHOULD THERE BE A DOL FOLDER WHEN THE DOL IS LOADED THROUGH CHANNEL? THERE IS NO DOL FOLDER WHEN ITS LOADED THROUGH A CHANNEL/FORWARDER/PRELOADER.

oh my god i give up the explaining.....


EDIT:oops actually there is when loading through forwarder. But not if you load through Channel/Preloader/TCPLoad/Elf Sender
 
dimok said:
So basicly you are saying that the loader should set at the first run the configpath right???

Did you think of how the hell the loader should know on the second run that the configpath was moved? He cant just search the damn whole SD Card for the file.

Somehow he needs to know where the configfiles are......he cant just know out of himself that the configpath was moved (he needs to load it of the config file to find out it was moved).
Sort of, but not really... You will still need a minimum of two hardcoded locations, to fall back on.

The Loader would first try to write to the relative location of the booted .DOL ("./"). If this is not possible, or errors out, then the loader would try the second static location ("SD:/config/"). If neither are possible, there is a problem! BUT... If the Loader finds one of the hardcoded locations, it will write to that location. Then, if there is a "Custom CFG" defined, the Loader will write to that path TOO. Writing to both locations would keep the "global_settings.cfg" files in sync.

ALTERNATIVELY... Skip the "Custom CFG" altogether, and simply hardcode the "./" and "SD:/config/" locations!


rolleyes.gif
 
I dont like your idea much. Its not hard to make but its kinda nonesense.....we can as well just stay at sd:/config/
 
than at least change the folder to ss like sd:/config/usbloadergx. i an other tool uses the same filename for a config file in the sd:/config folder you can't use both and that kind of sucks.
 
dimok said:
I dont like your idea much. Its not hard to make but its kinda nonesense.....we can as well just stay at sd:/config/
That's just messy. Except for my emulators, ALL my other apps keep all their configuration files in their own directories. If you're going to hardcode something like that, hard code it to the typical HBC apps directory...something like: "SD:/apps/USBLoaderGX/config/"

wacko.gif
 
Download Version 1.0 (with icon.png and meta.xml)
USB Loader GX V 1.0 (r316).rar

and/or the latest revision (alpha/beta/whatever)
r326.dol

OR
check the site http://tinyurl.com/USBLoaderGX
where everything plus elfs go
tongue.gif

(plz read first post or help page at site before asking)

Changes since v1.0 (316)
Code:
326:ÂÂÂÂ Change the scrollbar behavior based on the pagesize in theme.
325:ÂÂÂÂ *Now if no HDD is found at startup you will be asked if you want to retry 30secs
ÂÂÂÂÂÂÂÂ with the cIOS of your choice or return to WiiMenu.
324:ÂÂÂÂ fixedÂÂissue255 
323:ÂÂÂÂ Changed prototype for OnScreenKeyboard. It now accepts minimum entry length to
ÂÂÂÂÂÂÂÂ keep people from removing any part of "SD:/" and crashing when trying to download.
ÂÂÂÂÂÂÂÂ Also added clear button to delete all text back to the set minimum.
322:ÂÂÂÂ *Fixed BUG: cIOS selected in the GameSettings wasnt loaded before gamestart! Now
ÂÂÂÂÂÂÂÂ it should work fine and fix some freezer inside games. ( issue 217 , 227)
321:ÂÂÂÂ Set up 3rd tab in settings screen for any other settings.ÂÂAdded new images for tabs.(NeoRame).
ÂÂÂÂÂÂÂÂ Did some housekeeping with the code.
320:ÂÂÂÂ Fixed thi Install-Bug ... i think
319:ÂÂÂÂ *change the keyboard graphics for more wii-ish look
ÂÂÂÂÂÂÂÂ *delete keyboard_mediumkey_over.png and keyboard_largekey_over.png
318:ÂÂÂÂ Change themes right when theme path is altered.ÂÂNot really tested, but it should work.
317:ÂÂÂÂ Fixed the scrollbar better with the cursor when dragging it.
ÂÂÂÂÂÂÂÂ Tested fine with 30, 60, 150, and 200 in the gamelist.

People who cant load the loader or having some troubles
they should try to use .ELF
since .ELF is a lot more accurate in processing code
 
Is this the only location that the "SD:/config/" location is used? Where in the code does the "global_settings.cfg" file get parsed/written?

Code:
trunk/source/cfg.c

ÂÂ 777: {
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂreturn cfg_parsefile("SD:/config/settings.cfg", &game_set);
ÂÂÂÂÂÂÂÂ}

ÂÂ 784:ÂÂ int i;
ÂÂÂÂÂÂÂÂÂÂmkdir("SD:/config/", 0777);
ÂÂÂÂÂÂÂÂÂÂf = fopen("SD:/config/settings.cfg", "wb");
ÂÂÂÂÂÂÂÂÂÂif (!f) {

ÂÂ 854:ÂÂÂÂÂÂÂÂ snprintf(pathname, sizeof(pathname), "SD:/config/config.txt");
ÂÂÂÂÂÂÂÂ

ÂÂ 869:ÂÂ snprintf(pathname, sizeof(pathname), "SD:/config/titles.txt");
ÂÂÂÂÂÂÂÂÂÂcfg_parsetitlefile(pathname, &title_set);


unsure.gif
 
dimok said:
If everyone is OK with that i can make it "sd:/config/usbloadergx". But then dont complain about it.

I think timebomb already said it and I'll agree on some lever with him

it should check for the config at the dol folder (relative way)
if that fails (wads and stuff) it should check for a more generic folder like "sd:/config/usbloadergx" (which shoud also be the default for the creation of new files)

I would prefer to be like the second one forever because it is easier to backup the important data (but more like "sd:/data/usbloader_gx" as the config is crappy used by other apps)
 
dimok said:
If everyone is OK with that i can make it "sd:/config/usbloadergx". But then dont complain about it.

lol you crack me up..... "don't complain".
Thats one thing you can count on. I personally am happy with the way it is but it does make sense keeping all loader files in one folder the apps/usbloadergx folder but having said that my forwarder points to apps/usbloader anyway so this would be another folder as I have no usbloadergx folder my dol is still in apps/usbloader.


I suppose I could change my forwarder and keep all in one folder........OK time for some Wii Spring cleaning
blink.gif
 
@marinos35

This is stupid too. Because when you load the loader through HBC the config is loaded from dol directory and when from Channel and stuff its from sd:/config/usbloadergx/

What if one user uses both from time to time? He would have to move the shitty files around the SD. I think best solution is a constant folder for the freaken configs. Just need a good one so people stop complaining.
 
dimok said:
If everyone is OK with that i can make it "sd:/config/usbloadergx". But then dont complain about it.

That would be better yes. There are other applications that use the /config/ folder too.
 
dimok said:
@marinos35

This is stupid too. Because when you load the loader through HBC the config is loaded from dol directory and when from Channel and stuff its from sd:/config/usbloadergx/

What if one user uses both from time to time? He would have to move the shitty files around the SD. I think best solution is a constant folder for the freaken configs. Just need a good one so people stop complaining.
If there's one thing I've learned from community coding... People will ALWAYS complain!
biggrin.gif


Not that it counts, but my "vote" is for the .CFG file to be hardcoded to: "SD:/apps/USBLoaderGX/configs/" (not case-sensitive)
Except for "theme.txt", ALL configuration files should be put there. If this directory doesn't exist, the user should be prompted with a dialog box to recreate their folder structure!

What does everyone think about that?


unsure.gif
 
I seriously don't get why the conf folder is such a problem. I know some other homebrew uses it too, but I have yet to see one that uses exactly the same file as this loader. Granted, the folder may be a bit messy after a while with all those different configs in there, but who cares? You're never going to open it anyway!

I say to just make sure you use a personal name for the file so nothing would ever overwrite it and just let it be!
 
Folder creation is no problem. Folders are always being made by the loader automaticly now.

Only problem is that no one really knows what he wants it to be so i am thinking of either taking SD:/config/usbloadergx/ or stay with sd:/config/ and rename the config files.
For example make it usbloadergxglobalsettings.cfg and usbloadergxgamesettings.cfg so there is no conflict with other applications.
 
Sazzles said:
I seriously don't get why the conf folder is such a problem. I know some other homebrew uses it too, but I have yet to see one that uses exactly the same file as this loader. Granted, the folder may be a bit messy after a while with all those different configs in there, but who cares? You're never going to open it anyway!
I say to just make sure you use a personal name for the file so nothing would ever overwrite it and just let it be!
Yeah... It used to be a bigger deal than it is now. When the "config.txt" file was still in-use, there were other apps that used the same path and filename. I'm not sure if there's anything else, at this time, that uses "global_settings.cfg". Something may use "settings.cfg", though!

yay.gif
 

Site & Scene News

Popular threads in this forum