Hacking Configurable USB Loader

  • Thread starter Thread starter oggzee
  • Start date Start date
  • Views Views 7,866,779
  • Replies Replies 18,482
  • Likes Likes 22
wbfs_file_1.2.zip
http://sharebee.com/d01f6166
included: sources and binaries for windows, linux and macosx.

Changes:
v1.2:
* On Windows allow to use device name instead of drive letter in the format:
\\?\GLOBALROOT\Device\Harddisk3\Partition2
This is useful if you don't have a drive letter assigned to a partition
 
Oggzee,

as you suspected it the actual cios does not support files bigger than 2gb. it gets stuck at
too bad
frown.gif

I guess we are stuck with 2gb files until hermes (hopefully) updates that.
or until the library is updated.

anyway thanks for pointing it out.. I was pretty close to convert my games to 4gb files.. it would have been such a waste of time
wink.gif


wbfs_file d:/destination/gameid.wbfs create e:/source/game.iso
works like a charm
so does : wbfs_file d:\destination\gameid.wbfs create e:\source\game.iso

but, if I may share my humble opinion, you should change this command.
because we need to KNOW the gameid to launch this command.
otherwise some noob will use it entering anything they like as a wbfs name and will complain the game is not recognized by the loader.

maybe something like
wbfs_file convert_wbfs
i.e.
wbfs_file convert_iso

please note that for WBFS only the folder is given the name being automatically given , while for the ISO the filename can be given, otherwise if given only the directory it can be extracted from the wbfs file automatically....

once again these are only my two cents.
I am pretty sure in a couple of days we will start seeing a few managers that will wrap all that
wink.gif


Cheers,
R

edit :
I just tried converting from WBFS to iso... once again using two hard drive.
tried the create function... does not work.. it is only meant one way iso->wbfs
tried the extract_iso... seems to work but it is VERYYYY slow.. it is faster to add the game to a wbfs drive and to extract it
wink.gif
 
redia said:
Oggzee,
as you suspected it the actual cios does not support files bigger than 2gb. it gets stuck at
too bad
frown.gif

I guess we are stuck with 2gb files until hermes (hopefully) updates that.
or until the library is updated.
anyway thanks for pointing it out.. I was pretty close to convert my games to 4gb files.. it would have been such a waste of time
wink.gif


That is not a cios problem but a libfat problem or could even be a bug on my side, i need to check (... depends on off_t size when building for ios and of my proper use of it), anyway, for now 2gb split is the max.

redia said:
wbfs_file d:/destination/gameid.wbfs create e:/source/game.iso
works like a charm
so does : wbfs_file d:\destination\gameid.wbfs create e:\source\game.iso

but, if I may share my humble opinion, you should change this command.
because we need to KNOW the gameid to launch this command.
otherwise some noob will use it entering anything they like as a wbfs name and will complain the game is not recognized by the loader.

maybe something like
wbfs_file convert_wbfs
i.e.
wbfs_file convert_iso

please note that for WBFS only the folder is given the name being automatically given , while for the ISO the filename can be given, otherwise if given only the directory it can be extracted from the wbfs file automatically....

once again these are only my two cents.
I am pretty sure in a couple of days we will start seeing a few managers that will wrap all that
wink.gif


Cheers,
R
yeah i thought of that, maybe i'll add that too one day, should be trivial anyway

redia said:
edit :
I just tried converting from WBFS to iso... once again using two hard drive.
tried the create function... does not work.. it is only meant one way iso->wbfs
correct, create is only from iso to wbfs, it also say so in the help.

QUOTE(redia @ Oct 27 2009, 03:00 PM)
tried the extract_iso... seems to work but it is VERYYYY slow.. it is faster to add the game to a wbfs drive and to extract it
wink.gif
i'm not sure exactly what are you doing here, can you be more specific?
are you using drives or files and what drive and filesystem is source and destination..?
 
lol.. I knew I was not clear.. sorry..
but it is good I was not because you can ignore my previous comment about the speed I took the ETA as granted..... lol
nevertheless the extraction is not working correctly.

I had an ISO, on a NTFS HD.
I converted it to a splitted WBFS file on a FAT32 HD
as mentioned it works like a charm using the create option.

now I want to do the opposite.. I want to convert a splitted WBFS file on a FAT32 HD to an ISO (on a NTFS drive. to burn it for example)
as mentioned previously the create option does not work.
so I tested

TEST 1 ... direct conversion
wbfs_file gameid.wbfs
it "extract" the ISO to the working directory.
so if the working directory is a fat32... it will fail.
the only solution to use this command would be to copy the wbfs files to a NTFS HD first and then launching it.. but it defies the concept.. I want to store my wbfs files on a FAT32 disc, and to extract them to a NTFS HD directly without copying them first. plus working from one HD to another is faster.
but still for educational purpose I did the test.
it took about 7-8 minutes.
but the resulting file seems faulty...
the resulting ISO is 4.489.216kb
while it should be 4.589.824kb
the resulting size varies depending on the game, see further down for a couple of exemple


TEST 2 ... EXTRACT COMMAND from a WBFS FILE to a ISO FILE
wbfs_file e:\source_fat32\gameid.wbfs extract_iso gameid f:\destination_ntfs\
so here it is great because I do not have to copy the WBFS files to an NTFS drive prior to launching the command because I can define the destination directory.
once again it seems to work giving me :

"Read Split: 1 GAMEID.wbf1
Read Split: 2 GAMEID.wbf2
writing to v:\GAMEID_GAMENAME.iso
5.80% (\) ETA: 0:25:19"

25 minutes is a lot. and that's what trigger my previous comment... but it is only an ETA.. the extraction finishes after about 6-7 minutes..
but once again the resulting file does not seem to be correct
the resulting ISO is 4.489.216kb
while it should be 4.589.824kb
the resulting size varies depending on the game, see further down for a couple of exemple

TEST 3 ... USING a WBFS DRIVE as a temporary conversion tool
part 1 : I added the WBFS file to the WBFS drive
wbfs_file add_wbfs gameid.wbfs
it took about 5-6 minutes.

part 2 : I extracted it as ISO to a NTFS drive
wbfs_file extract_iso GAMEID
seems to work like a charm once again
and once again the resulting file does not seem to be correct
the resulting ISO is 4.489.216kb
while it should be 4.589.824kb
the resulting size varies depending on the game, see further down for a couple of exemple

TEST 4 ... Tried to extract a game from my existing WBFS Drive which was added another manager
part 1 : added a game to my WBFS Drive
ok
part 2 : extracted this game to ISO using yet another manager
result ok
part 3 : extracted this game using your app
wbfs_file extract_iso GAMEID
the extraction reaches the end.. but no luck..
once again the iso is not extracting correctly.
one game was 516.096kb (estimated WBFS size : 78MB)
another one : 4.575.232kb (estimated WBFS size : 54MB)
one more : 4.489.216kb (estimated WBFS size : 4306MB)

TEST 5 ... Tried to extract a game which was added using WBFS_FILE.exe from an ISO using an alternate WBFS manager
part 1 : added an ISO using your app
WBFS_file add_iso

part 2 : extracted the game using an alternate manager
extraction worked fine
file comparison against the original did not reveal any error

TEST 6 ... Tried to extract a game which was added using WBFS_FILE.exe from an WBFS FILE using an alternate WBFS manager
part 1 : added an ISO using your app
WBFS_file add_wbfs

part 2 : extracted the game using an alternate manager
extraction worked fine
file comparison against the original did not reveal any error

I hope this helps.

Cheers,
R
 
Thanks redia for the extensive report!
I see now what's wrong, the ftruncate call behaves quite differently on windows than on linux so the fiel is not extended to the full size, i will fix this in a minute. The missing data is anyway not used and in the iso it's just filled with zeroes. So the produced iso can still be used, if you convert it again to wbfs and compare the contents you'll see that the produced wbfs file is the same.
 
sorry bout that ,ok ive ceen reading and woundering how to move a iso i got on my pc to a fat 32 for the loader
 
oggzee said:
Thanks redia for the extensive report!
I see now what's wrong, the ftruncate call behaves quite differently on windows than on linux so the fiel is not extended to the full size, i will fix this in a minute. The missing data is anyway not used and in the iso it's just filled with zeroes. So the produced iso can still be used, if you convert it again to wbfs and compare the contents you'll see that the produced wbfs file is the same.
first of all you are welcome. the testing is the least we can do for you.

if you have a way to test the filesystem of the destination directory I would advise you to cancel the conversion/extraction to iso in case it ain't ext2/3 or ntfs (or any other filesystem that holds file bigger than 4gb). I am sure you will get a lot of people getting corrupted files otherwise
wink.gif


I figured out that I could revert to wbfs file or even wbfs drive even with the "wrong sized" iso... the problem is if someone needs for one reason or another to burn a disc.. if the iso file is not the correct size we have to pad it (not everyone knows how to do it) otherwise it won't work.

I will test the new version as soon as it is released.
I already have all the needed files ready
wink.gif


cheers,
R
 
Hi Oggzee,

since we are in the very pioneering phase of .wbfs files I provide an idea which you may want to evaluate....

Up to now from a .iso image file we get a .txt file with the name of the game and 1-3 .wbfs files for the game itself.

In the case of many games, this creates a sort of "mess" in the wbfs folder of the FAT partition.

Why not consider the opportunity of creating from an .iso file a folder containing all of the stuffs for the game, the folder named with the gameID?

For example instead of:

RZJP69.wbf1
RZJP69.wbf2
RZJP69.wbfs
RZJP69_DeadSpace.txt

have:

RZJP69/RZJP69.wbf1
RZJP69/RZJP69.wbf2
RZJP69/RZJP69.wbfs
RZJP69/RZJP69_DeadSpace.txt

This could reduce the mess in the wbfs files folder since there will be just one folder for each game.

This will allow further improvements in the future since you may want to add in the single game folders some further specific files for the games, such as the alt dol for the games which need it, a description file, the covers, a jingle....

Thanks again Oggzee for this wonderful pioneering deveopment...
 
This is fantastic stuff. Been reading & reading for the last week in the run up to it's release etc but can't get my head round some of it.
Just so typical that I've only just started using external Maxtor 750Gb to install games to & Oggzee & freinds bring something new out!
wacko.gif

Would have started earlier but I ain't THAT clever. Also no spare Hdd!
Will keep reading every day & update when it's as easy to use as I found the other versions a week or so ago....
You guys are so clever you make my blood boil!
lecture.gif
bow.gif

How quickly new stuff has been added to this update over last couple of days to make it better is quite amazing.
I just wish I was clever enough to help.
Keep up the great work guys & many regards to you all.
 
Wow, this is pretty cool. Now to hope someone updates Crap or Loadstructor to be able to load a WBFS file.
wink.gif
After that, I'll have no reason to stay on WBFS. Can't say I expected Fat32 support....this is what happens when I'm away for a few days, something cool happens and I miss it.
tongue.gif


*edit*
I suppose another idea would be to make the Configurable USB Loader capable of taking a .WBFS filename as an argument. Then a forwarder could probably do it (though it'd really only work in a way that's worth it if you had a program on the PC where you could generate the channel, changing the banner/arguments/channel ID...or whatever). Feel free to not do this, I have no idea how difficult it would be or if anyone would take it and run with it. All I know is that I don't have the know how to do it myself.
 
9th_Sage said:
After that, I'll have no reason to stay on WBFS.
Are you sure? The created files are small WBFS. You can extract and modify them with with any good wbfs manager that supports plain files. Only splitted WBFS are really new and need extra support.
 
Wiimm said:
9th_Sage said:
After that, I'll have no reason to stay on WBFS.
Are you sure? The created files are small WBFS. You can extract and modify them with with any good wbfs manager that supports plain files. Only splitted WBFS are really new and need extra support.
I don't think anything that creates a channel that loads the game from WBFS (as a shortcut on the System Menu) supports them. I did forgot they were split though. I mean, if what you're saying is "it's still technically WBFS" then yeah, I do get that. I was just saying that if a channel creator was released that supported this form of WBFS (WBFS containers in FAT32) I'd abandon having the entire partition devoted to WBFS and switch to FAT32.
 
zektor said:
charroux said:
This is either a bug or a very bad inconsistency. I change my game titles using the WBFS Manager 3.0 rename function, rarely using titles.txt. USB Loader CFG displays the titles the way I changed them, but wbfs_file doesn't. wbfs_file uses the original title when it creates the txt file and the .wbfs files. I know that some other WBFS managers also don't recoginize the changed titles, but since USB Loader CFG does, so should the wbfs_file utility.


Not a bug. wbfs_file extracts the true game title name when creating the txt file. USB Loader CFG is reading the titles.txt to display the "correct" names in accordance with title ID, but internally the names are still what they are.
OK? Maybe I need to write this in a different way. USB Loader CFG is NOT reading titles.txt in my case (I deleted it to be certain). It is reading the name from the intenal name, and it comes out just as I changed it using WBFS Manageer 3.0. wbfs_file does not read the name to be the same as CFG, but reverts to the original name before I changed it. There is obviously a difference in the way CFG Loader and wbfs_file extract game names. Is there a way to make CFG FAT/wbfs_file function the same as the CFG WBFS/WBFS Manager 3.0? Try it yourself if you don't believe me: use WBFS Manager 3.0 to change any game name not listed in titles.txt and see that the title is different.
 
LOVE this loader, switched from gx when the FAT business hit and will never go back. I wanted to know is there a way to download just the full cover and say the disc cover when downloading covers? The way I want to set it up is coverflow3d and then when I select a game have the disc pop up on the game options screen, but the only way I found to do this with new games is to download all covers, as setting download_all_styles = 0 just gets fetches the disc cover. Thanks in advance!
 
NReale3370 said:
LOVE this loader, switched from gx when the FAT business hit and will never go back. I wanted to know is there a way to download just the full cover and say the disc cover when downloading covers? The way I want to set it up is coverflow3d and then when I select a game have the disc pop up on the game options screen, but the only way I found to do this with new games is to download all covers, as setting download_all_styles = 0 just gets fetches the disc cover. Thanks in advance!
Hmm, that's strange. I thought it continued to download full covers regardless of the setting of download_all_styles. Something for oggzee to look into, I guess. In any case, you might be best off downloading all styles anyway as the 2D covers are also somewhat needed for when a full cover isn't present.
 
i seem to have run into a prob it says it cant connect to googlecodes when i try for an update any ideas to whats going on??????
 

Site & Scene News

Popular threads in this forum