Hacking wwt+wit: Wiimms WBFS+ISO Tools

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
wwt: Wiimms WBFS Tool v0.19a - 2009-11-27
A command line WBFS tool set for various os.


I have updated the tool. The first post with more details is updated too.

Download:Highlights/bug fixes of this release:
  • The wwt command ADD support the new option --sync: Synchronize the WBFS by removing and adding discs until the WBFS contains exactly the discs of the source list.

    The new wwt command "SYNC" is an abbreviation of "ADD --sync".
    .
  • The new command "wit MOVE" can rename ISO files. While using %-escapes many naming schemes are possible.
    .
  • The calculation of the size of blcok devices is now much better. Thanks for help.
    .
Last changes:
Code:
wwt v0.18a r465 - 2009-11-22

- Bug fix: Wrong temp filename while creating an splitted WBFS.
- Default split size is now 4GiB-32KiB for WBFS and 4GB for all other files.
- wwt CHECK -ll: Print an additional dump if errors found.
- wit SCRUB: Allow type conversion.
- new commands: wwt RENAME+SETTITLE: Set ID and title of discs [EXPERIMENTAL].
- IMPORTAND BUG FIX in libwbfs/wiidisc: All scrubbing operations including
ÂÂ adding to a WBFS could loose sectors.

wwt v0.19a r491 - 2009-11-27

- New ADD option: --sync: Synchronize: remove and add until WBFS contains
ÂÂ the same discs as source list.
- New comamnd: wwt SYNC: Abbreviation for: ADD --sync
- New commands: wit RENAME+SETTITLE: Set ID and title of discs [EXPERIMENTAL].
- New command: wit MOVE: move/rename iso files.
- MAC bug fix: segmentation fault if formatting a drive.
- Bug fix: Interrupt possible while processing a source directory.

Sources comes with GPL2. Checkout the sources directly from the SVN repository or browse the source.
 

drh

Well-Known Member
Newcomer
Joined
Nov 14, 2009
Messages
76
Trophies
0
XP
81
Country
Thanks Wiimm, confirmed format works on mac osx

{FYI: new users, if its a new drive, make sure your wii hdd is not mounted in osx for tools to work}
 

Floyd4711

Member
Newcomer
Joined
Nov 26, 2009
Messages
6
Trophies
0
XP
1
Country
Gambia, The
Hi,
it's me again.

My problem isn't solved yet.

I'd like to format a real partition with the win version and I don't know how to tell wwt to do the job.
I tried this:
wwt FORMAT -s 300 --sector-size 1024 -f I:
I is the partitition.

This is the output:
***** wwt: Wiimms WBFS Tool v0.19a r491 cygwin - Dirk Clemens - 2009-11-27 ***
**
!! wwt: ERROR #13 [WRONG FILE TYPE] in cmd_format() @ wwt.c#1152
!! I:: Neither regular file nor block device: (null)
** 0 files formatted.

It seems I didn't do the syntax right?
can someone give me a working command line?

I tried to do the trick by booting Knoppix and running the Linux version, but some libraries seem to be missing.
So I'm glad to do it in Win32

Thanks.
Floyd
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
@Floyd4711:
The name of the USB drive is not I:. It is something like /dev/sd*.

It seems that wwt needs an additionally command to find and show partitions that are not formatted, perhaps an option for command FIND.

workaround: use an other WBFS manager to format and then try "wwt FIND", the WBFS partitions should be visible.


EDIT:
Load http://wiimm.de/x/wwt-v0.19b-r493-cygwin.zip and try "wwt find -l" to show all partition names.
 

Floyd4711

Member
Newcomer
Joined
Nov 26, 2009
Messages
6
Trophies
0
XP
1
Country
Gambia, The
/dev/sd* looks like Unix

QUOTE said:
workaround: use an other WBFS manager to format and then try "wwt FIND", the WBFS partitions should be visible.
The problem is, any other WBFS managers fails.

QUOTELoad http://wiimm.de/x/wwt-v0.19b-r493-cygwin.zip and try "wwt find -l" to show all partition names.
C:\wwt-v0.19a-r491-cygwin\bin>wwt find -I
!! wwt: ERROR #20 [SYNTAX ERROR] in check_command() @ wwt.c#2650
!! Command 'FIND' don't uses option --iso
-> Type 'wwt -h' (or better 'wwt -h|less') for more help.

aah, documentation says FIND only finds WBFS partitions.

my status:
Samsung S2 portable 500Gb
even FAT32 formatting is only possible if formatted with samsung tool, any other tool in Win get errors. Formatting with WBFS manager, ncWBFSTool not possible because of errors.
Somebody speaks about other Sectorsize, so I finally found your tool as a last option.

Any ideas?
 

Floyd4711

Member
Newcomer
Joined
Nov 26, 2009
Messages
6
Trophies
0
XP
1
Country
Gambia, The
Aaah,

wwt FIND -a find on the other HDD /dev/sdb2

replugging the real destination HDD and
wwt FORMAT -s 365 --sector-size 1024 -f /dev/sdb2
results in
***** wwt: Wiimms WBFS Tool v0.19b r493 cygwin - Dirk Clemens - 2009-11-28 ***
**
FORMAT BLOCK DEVICE /dev/sdb2 [366 GiB, sector size 1024]
** 1 file formatted.

The formerly FAT32 is lost but WBFSmanager says by loading:
"Fehler während des Ladevorgangs des Laufwerks. Stelle sicher, dass das Laufwerk nicht von einer anderen Applikation verwendet wird und, dass es ins WBFS-Format gebracht wurde."

is FORMAT BLOCK DEVICE an error?


Format with sectorsize 512:
wwt FORMAT -s 365 --sector-size 512 -f /dev/sdb2
***** wwt: Wiimms WBFS Tool v0.19b r493 cygwin - Dirk Clemens - 2009-11-28 ***
**
FORMAT BLOCK DEVICE /dev/sdb2 [366 GiB, sector size 512]
!! wwt: ERROR #16 [WRITE FILE FAILED] in WrapperWriteSector() @ lib-std.c#2689
!! Write failed [F=3,0+200]: /dev/sdb2

!! -> No space left on device
** 1 file formatted.

So sectorsize 1024 sems to be right?

Any other ideas how to WBFS format this exotic HDD?
 

Floyd4711

Member
Newcomer
Joined
Nov 26, 2009
Messages
6
Trophies
0
XP
1
Country
Gambia, The
Wiimm said:
little L = -l as shortcut for --long (letter before M)

Oh, i copy/paste from your post ;-)

type wbfs d.usage size file (sizes in MiB)
-----------------------------------------------
BLOCK -- 0 95396 /dev/sda
BLOCK -- 0 79996 /dev/sda1
BLOCK -- 0 15390 /dev/sda2
BLOCK -- 0 476940 /dev/sdb
BLOCK -- 0 102400 /dev/sdb1
BLOCK WBFS 0 374528 /dev/sdb2

So my partition is WBFS?
and the managers doesn't work with 1024?
I hope the Wii will accept it,

Thanks for your help,
if you have any other cool idea, let me know.

Floyd
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
A sector size of 1024 is only needed if
a) you have >500 games
b) will use a drive with >2TB

Most WBFS managers and USB loaders doesn't support a sector size of 1024.
 

Floyd4711

Member
Newcomer
Joined
Nov 26, 2009
Messages
6
Trophies
0
XP
1
Country
Gambia, The
Wiimm said:
A sector size of 1024 is only needed if
a) you have >500 games
b) will use a drive with >2TB

Most WBFS managers and USB loaders doesn't support a sector size of 1024.

Maybe you're right, but as you can see in my previous posts, I got errors by formatting with the default sectorsize of 512 Bytes:
QUOTEwwt format -v -f /dev/sdb2

wwt: Wiimms WBFS Tool v0.19b r493 cygwin - Dirk Clemens - 2009-11-28

FORMAT BLOCK DEVICE /dev/sdb2 [366 GiB, sector size 512]
!! wwt: ERROR #16 [WRITE FILE FAILED] in WrapperWriteSector() @ lib-std.c#2689
!! Write failed [F=3,0+200]: /dev/sdb2
!! -> No space left on device
** 1 file formatted.

Maybe there's sthg special about the drive?
 

PsyBlade

Snake Charmer
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
Floyd4711 said:
Maybe there's sthg special about the drive?
At that level there shouldnt be much difference in drives.
Only the partition size, so mabe try creating one smaller by a few MB.
More likely the drive has more defect sectors than it can handle.
In Linux try badblocks -vwsp 1 /dev/drive (eg /dev/sdb)
***Beware : Deletes data + takes time ***
 

Skizzo

Banned!
Banned
Joined
May 1, 2009
Messages
475
Trophies
0
XP
0
Country
United States
Feel kinda silly asking this because I thought I had a handle on these command line tools, but I can't seem to get iso2wdf working. The file I want to convert is n:\te.iso and the .wdf file can be created in the same directory. Could you give me the proper command to get it working please?

On another note, is converting a 1:1 ISO image to WDF even worth the effort, or does the ISO have to be scrubbed to see any real improvement in space savings?
 

drh

Well-Known Member
Newcomer
Joined
Nov 14, 2009
Messages
76
Trophies
0
XP
81
Country
If its the only ISO in the directory, just do:

iso2wdf *

That will convert all ISO's to the the same file name with .wdf extension (it will automatically scrub them too).

I have converted all my ISO's now and deleted them in favor of their WDF counterparts.
I can always convert them back to ISO if I want, but I am saving over half the disk space the ISO's were taking up at a conservative estimate!
 

Skizzo

Banned!
Banned
Joined
May 1, 2009
Messages
475
Trophies
0
XP
0
Country
United States
Ideally I'd like to be able to go from whatever format I convert to (WDF, cISO, etc.) back to an identical ISO to what I started with, but I guess that just isn't going to be possible, unless I forego any space saving measures.

Anyways, I tried your suggestion but still get an error.

ERROR #11 [CAN'T OPEN FILE] in SetupReadSF() @ lib-sf.c#166

Trying it using the actual ISO image name, I get the following error.

ERROR #12 [CAN'T CREATE FILE] in iso2wdf() @ iso2wdf.c#243

So, Wiimm, if you could give me the exact syntax for converting a game on drive letter N:'s root directory called TE.iso (from the iso2wdf.exe on another partition) I can go from there.

The above errors are from wwt-v0.19a-r491-cygwin.
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
doc extract for wit COPY (wrong place in old doc)
CODE When writing ISO files the option --wdf, --iso and --wbfs control the output
format. If writing a WBFS file this WBFS is truncated and contains exactly
one ISO image. The default file name of this WBFS is '.wbfs'. If none
of --wdf, --iso or --wbfs is set, the destination filename will be analyzed.
If the extension (ignoring case) is ".wdf", ".iso" or ".wbfs", the specific
output format is used. The default is WDF if all other failes.
 

Skizzo

Banned!
Banned
Joined
May 1, 2009
Messages
475
Trophies
0
XP
0
Country
United States
OK thanks Wiimm. One more question though. I tried it and it errors out because it's creating a file on the same drive the tool resides on, which doesn't have the necessary free space. Am I doing something wrong with the command syntax, or does the tool always create a file (even just a temp. file) in the directory the tool is run from?

Also, you said the .wdf format could be used for any type of file, correct? Or do you now do a check to make sure it is a valid Wii ISO image. I'd just like to test it out on some other files to see if they can benefit from it, perhaps GC ISO images, but other filetypes as well.
 

frailimbnursry

Active Member
Newcomer
Joined
Nov 11, 2009
Messages
25
Trophies
0
XP
2
Country
United States
I have a feeling that another WBFS manager has corrupted the WBFS partition. I'm hoping it can be repaired with this program. I ran "wwt check" and I'm met with:

CHECK /dev/sdf3

* Summary of WBFS Check: 1 error found:
1 free WBFS sector marked as used!
Note: 1 error are based on a bug in libwbfs v0.

I run "wwt repair" and it tells me "!! wwt: ERROR #8 [NO WBFS FOUND] in AnalysePartitions()" yet when I list the titles on the drive using "wwt list" it lists for me every game correctly. Obviously it can find the WBFS partition but for some reason it won't when I try to repair it. Any suggestions?

Edit: I'm an idiot. Got it working with "wwt repair -p /dev/sdf3". Now I only need to see if that did the trick.
Edit2: It didn't. I hope I don't have to extract every .iso, reformat and refill the drive again.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://youtu.be/AjP7B2QFB9E?si=5qT8Ov9brYiIhoGi