Hacking Configurable USB Loader

oggzee

Well-Known Member
OP
Member
Joined
Apr 11, 2009
Messages
2,333
Trophies
0
XP
184
Country
Slovenia
Configurable USB Loader

configusbloader.png



NOTE: since the official release v70, there have been some more improvements made by the community which can be found here:
http://code.google.c...cfg-loader-mod/

and here:
http://cfgusbloader.ntd.homelinux.org/trac/CfgUSBLoader/


by oggzee, usptactical, gannon and Dr.Clipper

Based on Wanikoko SD/USB Loader 1.5, Kwiirk Yal, Hermes uLoader 3.1, WiiPower NeoGamma R4
+ many others (Sorg, nIxx, fishears, 56Killer, WiiShizzza, hungyip84, Narolez,...)


Contents

Features
Videos and screenshots
Installation instructions
Download
Other useful download links
FAQ
FAT support FAQ
Archive of OLD stuff



Features:
This version of the loader allows you to customize numerous options to better suit your preferences.
- SDHC and USB HDD device support
- GUI and Console mode (switchable runtime)
- Background Music (.mp3 or .mod)
- Themes (switchable runtime)
- Widescreen (auto-detect)
- Transparency (covers and console)
- Cover images download
- Cover styles: 2d, 3d, disc
- Automatic resize of covers
- Renaming game titles (using titles.txt)
- Per game configuration of Video mode, Language, Ocarina cheating
- Light up DVD slot when install finishes, optional eject
- Childproof and parental guidance
- USB HDD with multiple partitions supported (WBFS for games and FAT for config, covers and other resources)
- SDHC with multiple partitions supported (WBFS for games and FAT for resources...)
- Custom IOS selection for better compatibility with USB drives and other USB devices.
- cIOS supported: waninkoko's 247, 248, 249 & 250, Hermes 222, 223, 224 (mload) v4,v5, kwiirk 222 & 223 (yal)
- Banner Sounds
- Loading games from .wbfs or .iso files on a FAT or NTFS partition
(with waninkoko cios rev18+ or hermes cios v4+)
- Loading games from DVD
- WiitDB support for info, sorting and filtering of games
- Configurable


Videos and screenshots
Video of cfg39 showing the various GUI styles in action:

Screenshots: (Blue Matrix theme by Narolez)



Installation:

Tutorial: http://gwht.wikidot.com/usb-loader (by Dr. Clipper)
Config options explained: http://gwht.wikidot....gurable-options

Quick Instructions:
Copy the contents of "inSDroot" to the root of your SD card, This will add the USB Loader to your homebew channel.
You can also install a channel forwarder to start the loader directly from the system menu.
Or a full channel without dependence on the SD card (See below in the Other useful download links)
Please see the included README-CFG.txt for more help and info.

There is a poll:
NEW: What Do You Use To Play Your Backups?
OLD: Which is your favourite USB Loader?
Please vote :) I'm curious where will we land...


Webchat: http://webchat.quake...ls=USBLoaderCFG

Download:

NOTE: since the official release v70, there have been some more improvements made by the community which can be found here:
http://code.google.c...cfg-loader-mod/

Official latest release:

cfg v70 (release)
Cfg_USB_Loader_70.zip
cfg70.dol
cfg70-222.dol
lang70.zip
(or online update)
Code:
Changes:

07-07-2011 cfg v70 (release)
* Version
* Full package changes:
- New default theme: Glass (v2) (by The-Magician)

05-07-2011 cfg v70b6 (beta)
* Updated to rodries ehcmodule for hermes cios (222,223,224)

03-07-2011 cfg v70b5 (beta)
* Fixed occasional crashes in GUI game select
especially when using WBFS partition
* Minor cleanups

02-07-2011 cfg v70b4 (beta)
* Print game requested IOS in game info screen
(after the GAMEID and size) (tnx R2-D2199)
* Minor cleanups

02-07-2011 cfg v70b3 (beta)
* Support for hdd with 4k sector size on fat/ntfs/wbfs filesystems
Thanks to: dimok (libs) davebaol (cios) and dexter (testing)

28-06-2011 cfg v70b2 (beta)
* Fixed GUI game options when clear patches is set to all
* Improved exception stack dump output to show also the debug log and version
* Improved gui theme switch to reflect text and button color changes immediately

26-06-2011 cfg v70b (beta)
* Updated devkitPPC to 23
* Updated libogc to 1.8.7
* When clear patches is set to all really disable all game patches,
previously some could still be enabled (anti 002 and some others)
* Fixed GUI Menu display of game options hook type when ocarina is enabled

25-06-2011 cfg v70a (alpha)
* updated libraries for improved support of hdd with 4k sectors: (tnx dimok)
libfat r4700, libntfs r10 (ntfs-3g 2011.4.12), libext2fs r15 (v1.0.2)

Utility to convert .iso to split .wbfs files and vice versa: wbfs_file_2.9.zip
Included are sources and binaries for: windows, macosx and linux.
And also the utility scripts move_dirs.bat and resplit.bat

Sources:
http://code.google.c...source/checkout

Other useful download links:

Language files (translations): topic

Configurator tool for windows: cfgLoader Configurator (by Dr. Clipper)

Forwarders:
See topic: Official CFG Loader Forwarder


Themes:
See this topic: Theme's for Configurable USB Loader
And this site: wii.spiffy360.com
HBC icon by matriculated

Game cover images: http://www.wiitdb.com

titles.txt: http://wiitdb.com/titles.txt

Partition Editor: http://gparted.sourceforge.net/ (Useful for creating multiple partitions on SD Cards and USB Thumb drives and creating FAT32 partitions larger than 32GB, but be careful to select the correct disk, so that you don't wipe your other drive)

fat32 format tools: fat32format fat32format GUI

cIOS 222/223 with mload by Hermes:
v4 and v5 cIOS 222 is supported.
Get cios 222 v4 here: http://mods.elotrola...oader_v3.0C.rar
official uloader/cios 222 forum(in spanish)

GUI WBFS managers that supports .wbfs files on a FAT partition:
by pccfatman: Wii Game Manager - A GUI for wbfs_file.exe
by fig2k4: Wii Backup Manager

Links to other sites / forums related to the cfg loader:
nextrl.it (Italian forum, by cambo)
emudesc.net (Spanish forum, by PabloACZ)
elotrolado.net (Spanish forum, by Lendrich)

FAQ

Some known issues and suggestions that are frequently asked about:
* Donations: please direct your donations to wiitdb.com
* Black bar at the bottom of screen in console mode with 576i video mode
* Banner animations or icons
* HBC launcher
* Spinning discs
* NAND emulation
* Screensaver
* Coverflow Grid mode
* DONE: GUI settings
* DONE: GUI game start screen
* DONE: HQ cover zooming
* DONE: Disable intro screen (only for direct starting channels)
* DONE: New Gecko OS 1.9.x (aka Ocarina 2 aka Brawl+ support) (by Wiipower)
* DONE: Profiles / Multiple favorite groups
* DONE: WiitDB integration (game info: description, genres, which controllers, number of players, etc...)
* DONE: GC and other controllers
* DONE: DVD launcher
* DONE: Multiple wbfs partitions support
* DONE: Automatic download/update of titles
* DONE: GC launcher (disc only)
* DONE: Return directly to the loader when exiting a game: return_to_channel option (or use preloader)
* DONE: Automatic download/update of themes,...
* NO: Installing / starting games over network

The list is here just so we can tone down the number of repeated requests on the forum
We might or might not work on any of the listed items.



FAT/NTFS support FAQ

The FAT and NTFS support has raised a lot of repeated questions, so here's a FAQ about that:

Q: Can it play .iso files directly?
A:
NTFS: Yes.
FAT: Yes but only .iso files which are smaller than 4GB such as forwarder .iso files or .iso files compacted with WiiScrubber. To solve the 4GB problem, convert the .iso to .wbfs format using the wbfs_file utility.

Q: Isn't FAT limited to 4GB file size but a game iso is larger than 4GB?
A: Yes, that's why the .wbfs files are scrubbed to save space and if it is still larger than 4GB it is split to 4GB chunks. Split files are named gameid.wbfs, gameid.wbf1, gameid.wbf2,... similar to how the a .rar archive can be split to multiple files (.rar, .r01, .r02,...)

Q: What about the file size, games on WBFS partition are scrubbed / compressed, will it take more space on a FAT/NTFS partition?
A: No, it will take the same space because the files are not in .iso format but instead .wbfs format, which uses the same scrubbing / compression method as on a WBFS partition, actually the file format is the same as the format of the WBFS partition. And to be even more accurate, the .wbfs files will take even less space, because the wbfs block size will be smaller too. (The size depends also on the selection which partitions are copied - all or only game)

Q: I have copied the .iso/.wbfs files to my usb drive but the loader doesn't see them?
A: The files have to be copied to the \wbfs folder on the FAT/NTFS partition.
These filename layouts are supported:
D:\wbfs\GAMEID.wbfs
D:\wbfs\Title [GAMEID].wbfs
D:\wbfs\Title [GAMEID]\GAMEID.wbfs
D:\wbfs\GAMEID_Title\GAMEID.wbfs
Same for .iso:
D:\wbfs\GAMEID.iso
D:\wbfs\Title [GAMEID].iso
D:\wbfs\Title [GAMEID]\GAMEID.iso
D:\wbfs\GAMEID_Title\GAMEID.iso

Q: Can I extract all the games from a WBFS partition to .wbfs files?
A: Yes, use this command:
wbfs_file.exe W: extract_wbfs_all D:\wbfs
Where W: is your WBFS partition and D:\wbfs is the FAT partition on USB (or on local hard-disk)

Q: How to convert all the .iso files to .wbfs files in one step?
A: Open up CMD where your iso files are and run:
for %i in (*.iso) do wbfs_file.exe "%i"
If you write that in a .bat batch file then you have to use %%i instead of %, like this:
for %%i in (*.iso) do wbfs_file.exe "%%i"

Q: How long does it take to convert one game to .wbfs?
A: Depends on hard drive speed and (scrubbed) game size. It should take the same time as copying a file. That means a couple of seconds for a game like WiiPlay which uses only about 100MB and a couple of minutes for games that take up 4GB...

Q: Are there any GUI wbfs managers that support .iso/.wbfs files on a FAT/NTFS partition?
A: Yes:
by pccfatman: Wii Game Manager - A GUI for wbfs_file.exe
by fig2k4: Wii Backup Manager

Q: Does running games from a FAT formatted SD / SDHC card work?
A: Yes, but only from SD cards, SDHC compatibility is still an issue. (SDHC might work with some cards and cios 249 rev19+)

Q: What is the recommended cluster size when formatting FAT?
A: It's not important - any size should work fine. But 32kb is a good choice as that size is aligned to wii disc sector size.

Q: Is it possible to install a game from a dvd disc to a FAT partition in .wbfs format?
A: Yes. Just press button + to install the game as usual.

Q: Is there any advantage using FAT/NTFS rather than a WBFS partition?
A: Depends on personal preference. These are some of the poins:
advantages:
- no need to repartition in case the disk is already used for other stuff
- the game files can be copied using normal file managers
- the partition space can be shared for other purposes
- better choice of file-system recovery / de-fragmentation tools
disadvantages:
- limited choice of loaders: only CFG, GX and WiiFlow support FAT/NTFS at the moment.
similarities:
- loading speed and compression should be the same compared to WBFS
notes:
- install game on NTFS is disabled by default but can be enabled with option: ntfs_write=1



Archive of OLD stuff




OLD Channels & Forwarders:


OLD Versions:
cfg v69 (release)
Cfg_USB_Loader_69.zip
cfg69.dol
cfg69-222.dol
lang69.zip
(or online update)
Code:
Changes:

09-06-2011 cfg v69 (release)
* Updated about window with credits & translators list
* Full package changes:
- New default theme: Blue 2011 (by The-Magician)
- Added tetris.mp3

07-06-2011 cfg v69b3 (beta)
* changed option: block_ios_reload = 0, 1, [auto]
'auto' will enable block ios reload if cios is d2x and ver >= 5
'auto' is now the default
* Removed detection of hermes ios installed with pimp my wii
since the hashes were incorrect.

06-06-2011 cfg v69b2 (beta)
* Use modmii cios identification for d2x version (by R2-D2199)
* Detection of hermes cios v5.1 installed with pimp my wii (by xFede)

04-06-2011 cfg v69b1 (beta)
* Support for ModMii cios identification (thanks XFlak, WiiPower)
* Support for Korean games (by damysteryman)

03-06-2011 cfg v69a7 (alpha)
* revert to ntfs-3g-2010.10.2 (libntfs-wii r4+r7)
* Improved support for hdd with 4k sectors

03-06-2011 cfg v69a6 (alpha)
* Improved support for hdd with 4k sectors

02-06-2011 cfg v69a5 (alpha)
* Support for d2x v6 IOS reload block on FAT/NTFS/EXT2 fs.

02-06-2011 cfg v69a4 (alpha)
* Fixed #001 error on hermes cios for fakesigned games (caused by
Sam&Max fix which is now disabled on hermes cios, Thanks Wiimm)
* Fixed We Dare (thanks airline38 and WiiPower)
* Minor cleanups

28-05-2011 cfg v69a3 (alpha)
* Really fixed d2x v5+ ios reload block on wbfs

28-05-2011 cfg v69a2 (alpha)
* Fixed d2x v5+ ios reload block on wbfs (tnx WiiPower & davebaol)
(Now Sam&Max fix is always enabled)

28-05-2011 cfg v69a (alpha)
* detection of cios d2x v4 (tnx kamiro04 & FIX94)
* d2x v5+ ios reload block on wbfs (tnx WiiPower & davebaol)
* d2x v4+ return to channel method (tnx WiiPower & davebaol)
* added value: return_to_channel = auto
will try to detect the channel id from where the loader was started.
(although some forwarders are not auto detected properly,
but the official one by FIX94 is)

For the rest of the history see this post:

http://gbatemp.net/posts/2177398


Feedback welcome
 
Last edited by oggzee,

djtaz

PM's Full - Wadder Me
Member
Joined
Sep 21, 2008
Messages
2,997
Trophies
0
Age
49
Website
Visit site
XP
81
Country
Sounds good - ill give it a try
Just looking at the config and it looks very good - nice and simple - well done.

Yup i got this going fairly easily and its very good i have to say.


I would recommend you add in a more detailed Read me about what each thing does and where the files should go as this may confuse some people initially.
 

hungyip84

Well-Known Member
Member
Joined
Mar 5, 2007
Messages
470
Trophies
0
XP
126
Country
United States
Great! I would like this as the main configurable option:

Console x position
Console y position
Console width
Console height
Boxart x position
Boxart Y position

So we don't need to recompile everytime
 

WiiShizzza

Graphics juggler
Member
Joined
Oct 10, 2008
Messages
1,201
Trophies
0
Website
Visit site
XP
230
Country
Gambia, The
Another nice Idea. ike it so far... we'll see what comes out at the end.

I'll second hungyip84!

+ maybe you could add the force mode in the way it was mentioned in the other thread.
QUOTE said:
Read the 4-letter game code. If the fourth letter is J or E, default video on NTSC systems, force PAL on PAL systems. If it's P, force NTSC on NTSC systems, default video on PAL systems.

That way everything should be automatic. Did I miss anything?

Maybe you can also implement parts from nIxx MiniMP3-Player to use a background music in the loader.
the mp3 file could maybe also been added to the config file.
 

MightyMouse

Well-Known Member
Member
Joined
Apr 2, 2009
Messages
350
Trophies
0
Location
AntiSoftMii
Website
Visit site
XP
1
Country
looks really promising...i do wish everyone would join up. lol

any word from Waninkoko on a update? or has the community just sort of taken the ball and RANNN reall far with it lol
 

ether2802

we have the techno...!!
Former Staff
Joined
Oct 14, 2007
Messages
4,349
Trophies
0
Age
38
Location
Pto. Vallarta
XP
282
Country
Mexico
wich background format we have to use...??
huh.gif



EDIT: Almost like Nixx, but the covers are a little bit off the space..!!
wink.gif


EDIT2: Nope, is the usptactical template
mthrnitesmiley.gif
 

Screemer

Well-Known Member
Member
Joined
Sep 21, 2008
Messages
1,248
Trophies
0
Website
Visit site
XP
143
Country
Gambia, The
i want to see that with a nice and shiny ligwiigui interface with an options menu. i that would be possible a password for enabling and disabling the child proof feature would be cool.

well done so far.
 

MadBob

Nostalgia ain't what it used to be!
Member
Joined
Nov 6, 2002
Messages
1,554
Trophies
0
Website
Visit site
XP
643
Country
It would be nice to be able to configure the images path (SDRoot\Images) so we can use the same images for other loaders instead of having to place them in a different folder for this loader.
 

palasx

Well-Known Member
Newcomer
Joined
Oct 17, 2007
Messages
98
Trophies
0
XP
213
Country
United States
Too all the coders that have added the "bells and whistles" to Waninkoko's released source, thank you. Even the simplest changes such as number of titles shown, to the more detailed like loading cover images, are ALL greatly appreciated and exemplifies what the open source concept is all about.

I am a nobody, just a user and part time code junkie. Up until this morning i was satisfied with what was being called "ULTIMATE VERSION" of the usb loader, and it indeed great, but it does not need 5 differrent builds to accomplish what could be handed by a few bool flags. The concept of a configurable version is ideal. Since i am a nobody, feel free to ignore me completely, but in my perfect universe, i would like to see these flags/options implimented in a config txt. most have been mentioned already:

EnableInstall - BOOL - does what it says on the tin.
EnableDelete - BOOL - again, control ability to hit minus key to delete game.

EnableManualForceVideo - BOOL - enable 1 and 2 buttons to force video mode. i am against the reading of DISCID to autoset mode, even when checked against default mode of console. Some users have dual-mode equipment or VGA boxes or other weirdness. let the user make up their own mind on video mode please.
EnableAutoForceVideo - BOOL - if you want to impliment your DISCID check, please flag it so we can turn if off. i dont know how trivial checking default video mode is, but if you do the work, please show the wisdom that some folks dont like auto-anything. control = good.

EnableOcarina - BOOL - If there is a GCT matching DISCID, apply codes, otherwise, dont even check for GCT.
OcarinaPath - STRING - path to GCT code files. suggest forcing full patch, as its easy to confuse the uninitiated with relative paths when climbing back up the dir tree.

BackgroundPath - STRING - path to background PNG. fairly simple.
ConsoleXPOS - SHORT INT - X offset from 0,0 to being drawing text console box.
ConsoleYPOS - SHORT INT - Y offset from 0,0 to being drawing text console box.
ConsoleX - SHORT INT - width of text box
ConsoleY - SHORT INT - height of text box

NumLines - SHORT INT - the number of lines of text to use in the console box, or the number of games to display. needs trivial code for sanity check. if implimenting a resizable console as per above, this can be calculated automatically given ConsoleY. if ( [CONSOLEY / HeightOfCharacter] < NumLines) { NumLines = [CONSOLEY / HeightOfCharacter] -1;} HeightOfCharacter is however many pixels are needed for one line of text. pardon the pseudo code, as i said, trivial.

CoverPath - STRING - path to box covers. as mentioned, if they are in use for something else and already on the card, avoid wasting card space and the evils of hardcoding by checking a dang string. again, force /full/path/names/

DefaultCoverImage - STRING - full path to png of default box cover if no cover exists for current game.

thats the basics. the following i consider "fluff" options that some users might like to make it as pretty as possible.

InstallImagePath - STRING - path to a PNG which should contain text and pictures showing instructions for installing and unisntalling games, such as a picture of the +/- buttons and the words install and uninstall. alone with the SHORT INTs InstallImageX and InstallImageY, this could be positioned anywhere on the screen above the background in the same manner as cover pics. this image could be disabled if a flag disabling install/unisntall is set true. the image could be split into individual install/uninstall images, and only shown when EnableInstall or EnableDelete were true, respectively. hope that made sense, i can clarify if need be.

SKINNING:
in a similar fashion you could define the path, size, and position of ALL the elements of the loader, such as instructions for install/delete mentioned above, video mode forcing, d-pad contorls, and loading and exit instructions. this would allow users to move the on screen elements as they see fit with a simple text edit to the config, instead of having to alter the backgroud image. obviously this only works for fairly simple flat-color background pictures, but again, fluff.

Skinning (ALT):
load a seperate skin.txt config file with all the image, coordinate, and cover information. this would allow users to pack the needed background and other optional images in a file with skin.txt for distrobution, without the end user having to alter config.txt. modular design is good design. CoverPath should not be in skin.txt

CHILD LOCK:
finaly, to anyone who would argue that enabling child/teen safety features in a text file isnt safe enough, and that they could just change the text config, i offer this argument: if yoru kid takes the SD card over to the computer, uses a text editor homebrew, or uses ftpii to edit the config while the SD is still in the wii, they already have enough know how and ability to change the version of the USB loader installed anyway. security through obfuscation doesnt work.

Thank you for reading, or at least skimming this crazy long post. i will go back to being a nobody.

TL;DR: OMG YOU GUYS WORK HARD SOURCE EDITS FOR THE GOOD WIN, AWESOME PRETTY COOL ULTRA SWEET!
 

palasx

Well-Known Member
Newcomer
Joined
Oct 17, 2007
Messages
98
Trophies
0
XP
213
Country
United States
ya know half way through it i got lost, im suprised thats all i forgot.

what does force language DO anyway? i cant imagine many NTSC games support both kanji/kana as well as english script. i take it that is more for PAL to force a language other than system default? how useful is that, really? if your system menu is in a language you cant read, thats a problem homebrew cant fix. (well it COULD, but it shouldnt have to.)

ok, adding it here:

EnableForceLanguage - BOOL - enabled the language for currently in place, or disabled it. if disabled AND using the skinning system/multiple images, disable the image for language as well.

EnableAutoLanguage - SHORT INT - any NON-ZERO will force a coresponding lauage, 1 for spanish, 2 for french, 3 for german, 4 for andorian, 5 for wookie, 6 for klingonee, 7 for internetees, 8 for leetspeek, etc. 0 to disable.

theres a good chance i could prbably muddle out some of this crap given all the source code provided, but i compiled ONE thing for the NDS, and im never EVER coding anything for a nintendo product EVER again, probably never a console/handheld either. i'll stick to c++ and perl thank you. php javascript and other interpreted languages dont count. fucking libwifi...i need a smoke.

again, good work to the modders, please keep it up, its vry appreciated.
 

Knocks

Well-Known Member
Member
Joined
Jun 12, 2006
Messages
559
Trophies
0
XP
255
Country
The language setting is absolutely crucial. It is used by:

1) US console owners who play Japanese games. Many Japanese games display garbled text (aka mojibake) when language is not forced to Japanese. Those games use Shift JIS text encoding, and forcing the game to Japanese reminds the game to use its native encoding instead of the default ASCII. Even worse, some games will crash or give you all sorts of problems without language forced to Japanese. Examples are Donkey Kong Jungle Beat, Naruto Shippuuden 1, Family Stadium, and many others.

2) European console owners who want to play US games in their own language. A good number of US games ship with multiple languages on the disc but don't allow you to select language in-game. Usually translations are made for a future PAL release but can't be taken advantage of without forcing the game's language to German/French/Spanish/etc.
 

palasx

Well-Known Member
Newcomer
Joined
Oct 17, 2007
Messages
98
Trophies
0
XP
213
Country
United States
okay then. well said i stand completely corrected. those language options are necessary. im still not in favor of making auto-change language mandatory though, it should remain in the user control and there should be a flag to turn auto on or off. lets hope someone who actually feels like wasting the weekend coding actually READS any of this
smile.gif
 
General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: Donde es yayo!