Hacking wwt+wit: Wiimms WBFS+ISO Tools

FIX94

Former Staff
Former Staff
Joined
Dec 3, 2009
Messages
7,284
Trophies
0
Age
30
Location
???
XP
11,248
Country
Germany
Hey wiimm, I switched from wii backup manager to wit because its amazing to have so much features and batch support, wanted to thank you for this software :lol: now I can just transfer new games with one bat file!
wit CV --wbfs --psel -UPDATE -vv -r 'C:\newgames\'
wit ST -E$ +=$T --title titles-de.txt -vv -r 'C:\newgames\'
wit CP -E$ --title titles-de.txt -vv -r 'C:\newgames\' -D 'C:\wbfs\$N [$I]\$+'
wit CP -E$ --title titles-de.txt -vv -r 'C:\newgames\' -D 'V:\wbfs\$N [$I]\$+'
pause
I just have the question why some of my games in the verify process say the partition is encrypted and scrubbed, others are not scrubbed. Is there some size difference?
 

kylster

mich weich töten
Member
Joined
Sep 11, 2010
Messages
1,393
Trophies
0
Age
37
Location
Fr33D0M R1N6
XP
472
Country
United States
Is that spoiler a way to have the convert a game to wbfs into a folder under it's title ID? this is what I've been trying to figure out how to do with this app.

P.S. I'm still a noob at cmd line when I figure things out I have to make a .bat file so I'm not to forget LoL
 

FIX94

Former Staff
Former Staff
Joined
Dec 3, 2009
Messages
7,284
Trophies
0
Age
30
Location
???
XP
11,248
Country
Germany
Is that spoiler a way to have the convert a game to wbfs into a folder under it's title ID? this is what I've been trying to figure out how to do with this app.

P.S. I'm still a noob at cmd line when I figure things out I have to make a .bat file so I'm not to forget LoL
Yeah exactly. It makes a folder structure like 'C:\wbfs\Mario Kart Wii [RMCP01]\RMCP01.wbfs', before it will remove the update partition of the game. It took me a while to get it to work :P You don't know the diff between scrubbed and non-scrubbed partition I suppose?
edit: Oh and it also renames the internal game name that you don't need a titles.txt in the usbloader.
 

kylster

mich weich töten
Member
Joined
Sep 11, 2010
Messages
1,393
Trophies
0
Age
37
Location
Fr33D0M R1N6
XP
472
Country
United States
I always thought the scrubbed partitioned was just dummy data (unneccessary data to fill the full 4.7GiB) that it replaced with 0's for better compression but I believe it is also fake signed (truch bug). If given the option to trim or scrub always scrub cause the information can be placed back onto the disc while trimming permantely deletes the dummy data.

Sorry if my info isn't what your looking for :)
 

FIX94

Former Staff
Former Staff
Joined
Dec 3, 2009
Messages
7,284
Trophies
0
Age
30
Location
???
XP
11,248
Country
Germany
I always thought the scrubbed partitioned was just dummy data (unneccessary data to fill the full 4.7GiB) that it replaced with 0's for better compression but I believe it is also fake signed (truch bug). If given the option to trim or scrub always scrub cause the information can be placed back onto the disc while trimming permantely deletes the dummy data.

Sorry if my info isn't what your looking for :)
Not sure if this information is the one I was looking for lol. The strange thing is that's in pretty much all games, also from the ones I dumped by myself using cleanrip, this is why I don't really think thats it. The partitions are not fakesigned, so no idea what it is.
 

PsyBlade

Snake Charmer
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
AFAIK:
scrubbing:
removing the unneeded filler data
it can be replaced in the iso (with 0x00 for best effect) to make it compress better (or for sparse files)
or simply not stored at all like wbfs CAN do (it can store unscubbed too)
its not neccesary to fakesign to do this

trimming:
the partitions inside the image are moved around to have the important part in front and the filler at the end
the unimportant end of the file is then cut off to make the file smaller
this offers the same space benefit as scrubbing but requires fakesigning

fakesigning:
many changes to the image make its signature invalid
things like replacing files etc
a replacement fake signing can be created but is only accepted as valid by old ios revisions that are still have the fakesigning bug
cios does not check singning at all
 

FIX94

Former Staff
Former Staff
Joined
Dec 3, 2009
Messages
7,284
Trophies
0
Age
30
Location
???
XP
11,248
Country
Germany
scrubbing:
removing the unneeded filler data
it can be replaced in the iso (with 0x00 for best effect) to make it compress better (or for sparse files)
or simply not stored at all like wbfs CAN do (it can store unscubbed too)
its not neccesary to fakesign to do this
OK, yeah this is what I think too but it's strange that it also happens on cleanrip, so maybe cleanrip is scrubbing automatically?
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
A partition can only be scrubbed, if it has unused holes. Update partitions are always packed without holes and never scrubbed.

A scrubbed sector is filled with a constant value (0x00 preferred because of sparse files). In these sectors, decrypting and checksums calculations will fail. My tools try only some sectors to find out, if a partition is scrubbed. Therefor, if my tools tell "scrubbed" there is at least one scrubbed sector. If they tell nothing about srcubbing, it's unclear (but most/usual unscrubbed).

My tools also support (detect+convert) decrypted and encrypted (standard) partitions. decrypted can't be used on the wii, but are good for compressions. I have implemented the "decrypted feature" for tests and use it for skeletons and some internal stuff (e.g. listings of of a virtual image (=file system read as image) to avoid waste encryption and decryption). You can control decryption with --enc:
--enc encoding
Define the encoding mode. The mode is one of NONE, HASHONLY, DECRYPT, ENCRYPT, SIGN or AUTO. The case of the keywords is ignored. The default mode is 'AUTO'.


OK, yeah this is what I think too but it's strange that it also happens on cleanrip, so maybe cleanrip is scrubbing automatically?
Most tools (including ripping tools) scrub while copying automatically. And most tools support a option like --raw to enable raw copy.

btw: I have never heard from a game, that doesn't run in scrubbed mode.
 

FIX94

Former Staff
Former Staff
Joined
Dec 3, 2009
Messages
7,284
Trophies
0
Age
30
Location
???
XP
11,248
Country
Germany
OK thanks for the info, I'll just dump some games with cleanrip and my LG pc drive to see if cleanrip is really scrubbing automatically. Yeah the games run fine, I just wondered about it.
 

cthulhu

Member
Newcomer
Joined
Nov 28, 2011
Messages
17
Trophies
0
XP
14
Country
New Zealand
btw: I have never heard from a game, that doesn't run in scrubbed mode.

The PAL version of A Boy And His Blob appears to have some sort of protection that scrubbing and/or removal of the update partition triggers. With NeoGamma this manifests itself as a loading error message when running off DVD and as loading never completing when running from an WBFS volume. The problem only occurs at certain, but always the same points, i.e. you may be able to play quite a bit of the game before it stops working, it apparently depends on what has been altered. The NTSC version of A Boy And His Blob appears to run perfectly with the update partition removed and/or scrubbed.
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
OK thanks for the info, I'll just dump some games with cleanrip and my LG pc drive to see if cleanrip is really scrubbing automatically. Yeah the games run fine, I just wondered about it.
If you backup a hard disc. you only backup on file level or only used sectors. One kind of scrubbing is to find out unused sectors and do the same. Another kind of scrubbing is to remove unwanted (the update) partitions.


btw: I have never heard from a game, that doesn't run in scrubbed mode.

The PAL version of A Boy And His Blob appears to have some sort of protection that scrubbing and/or removal of the update partition triggers. With NeoGamma this manifests itself as a loading error message when running off DVD and as loading never completing when running from an WBFS volume. The problem only occurs at certain, but always the same points, i.e. you may be able to play quite a bit of the game before it stops working, it apparently depends on what has been altered. The NTSC version of A Boy And His Blob appears to run perfectly with the update partition removed and/or scrubbed.
Very interesting. My wit tools are able to create raw wbfs files or to add a game to a wbfs partitions in raw mode, just use --raw.

Some other detail:
The kind of scrubbing is done very different by different tools. Common to all is, that scrubbing is done in wii sectors (0x8000 bytes). The disk header is placed in the first 10 sectors (320 KiB, sectors 0..9). The standard libwbfs (used by most tools) marks only sectors 0, 8 and 9 as used, but sometimes other sectors contains additional info. Now it depends in the kind of copying of the tool, if the complete WBFS sector (size >=2MiB) is copied or only the "used" sectors to maximize the sparse effect. My tools read always the complete disc header and look, if non zero data is present.

You can find out it, if you call: wit dump --show dmap,usage IMAGE
... on a (non scrubbed) copy of the image.
 

FIX94

Former Staff
Former Staff
Joined
Dec 3, 2009
Messages
7,284
Trophies
0
Age
30
Location
???
XP
11,248
Country
Germany
Another kind of scrubbing is to remove unwanted (the update) partitions.
OK that was the reason. I compared the dumps from my PC drive and cleanrip, both are the same. The partitions are scrubbed as soon as I remove the update partition.
 

wii knee

Well-Known Member
Member
Joined
Apr 21, 2009
Messages
200
Trophies
0
XP
149
Country
United States
This is by far one of the most important tools to our community.
I've gone through this thread but can't find how to:
1. rename game title in WBFS format with a command line or how to change it with QTGui (without having to Save As a second copy)
2. change the game title once extracted to SNEEK format

Thx!
 

Hooya

Well-Known Member
Member
Joined
Aug 25, 2006
Messages
1,878
Trophies
0
Age
42
Location
Central Illinois
Website
Visit site
XP
317
Country
United States
This is by far one of the most important tools to our community.
I've gone through this thread but can't find how to:
1. rename game title in WBFS format with a command line or how to change it with QTGui (without having to Save As a second copy)
2. change the game title once extracted to SNEEK format

Thx!

Here is my command line format for copying a clean .iso image to my hard disk:
Code:
wit copy /documents/Downloads/Wii/*.iso /media/WiiStuff/wbfs/%X --wbfs -Z 2
In Linux. Change the file paths as you have your computer and hard drive set up. This changes the file name to
Code:
Deadly Creatures [RDCE78].wbfs
for instance, and splits the files into 2GB max size.

I don't have the SNEEK format handy, but this can maybe help.
 

FIX94

Former Staff
Former Staff
Joined
Dec 3, 2009
Messages
7,284
Trophies
0
Age
30
Location
???
XP
11,248
Country
Germany
1. rename game title in WBFS format with a command line or how to change it with QTGui (without having to Save As a second copy)
I don't use the SNEEK format but do you mean to change the internal game name? As you can see in my post here I use:
wit ST -E$ +=$T --title titles-de.txt -vv -r 'C:\newgames\'
To rename the internal WBFS game title to the german one. You can change the titles txt name to your one of course.
 

snikerz

Well-Known Member
Member
Joined
Nov 30, 2008
Messages
502
Trophies
1
Website
Visit site
XP
462
Country
Lesotho
Extracting GC games with --neek should automatically create a folder with the current titleid (e.g. "GZLP01"), otherwise it won't work correctly with DML :)
 

alex.ap.pacman

Well-Known Member
Member
Joined
Sep 5, 2010
Messages
136
Trophies
0
Age
32
Location
Seattle, Washington
Website
about.me
XP
175
Country
United States
OK thanks for the info, I'll just dump some games with cleanrip and my LG pc drive to see if cleanrip is really scrubbing automatically. Yeah the games run fine, I just wondered about it.
If you backup a hard disc. you only backup on file level or only used sectors. One kind of scrubbing is to find out unused sectors and do the same. Another kind of scrubbing is to remove unwanted (the update) partitions.


btw: I have never heard from a game, that doesn't run in scrubbed mode.

The PAL version of A Boy And His Blob appears to have some sort of protection that scrubbing and/or removal of the update partition triggers. With NeoGamma this manifests itself as a loading error message when running off DVD and as loading never completing when running from an WBFS volume. The problem only occurs at certain, but always the same points, i.e. you may be able to play quite a bit of the game before it stops working, it apparently depends on what has been altered. The NTSC version of A Boy And His Blob appears to run perfectly with the update partition removed and/or scrubbed.
Very interesting. My wit tools are able to create raw wbfs files or to add a game to a wbfs partitions in raw mode, just use --raw.

Some other detail:
The kind of scrubbing is done very different by different tools. Common to all is, that scrubbing is done in wii sectors (0x8000 bytes). The disk header is placed in the first 10 sectors (320 KiB, sectors 0..9). The standard libwbfs (used by most tools) marks only sectors 0, 8 and 9 as used, but sometimes other sectors contains additional info. Now it depends in the kind of copying of the tool, if the complete WBFS sector (size >=2MiB) is copied or only the "used" sectors to maximize the sparse effect. My tools read always the complete disc header and look, if non zero data is present.

You can find out it, if you call: wit dump --show dmap,usage IMAGE
... on a (non scrubbed) copy of the image.

Wilmm how do I install this so I can use it with the Wii Backup Fusion .deb for Linux?

Also - how would I go about UNinstalling it?
 

jayjay960

New Member
Newbie
Joined
Feb 21, 2009
Messages
4
Trophies
0
XP
56
Country
I posted a thread with this problem but it didn't get any useful response so I'll try asking this here:




I have a backed-up copy of Wind Waker on DVD-R, which once upon a time worked on my old softmodded Wii. The disc drive in that Wii flipped it's shit so now I have a newer Wii - one of the black ones. From what I understand, they have a different DVD drive which doesn't allow you to use it for copied games. But it will (and successfully has, from my friend's external HD) run games from USB, via neogamma.

I made an .iso file of the WW DVD-R on my PC, and went to put it on my USB.

I'm using Ubuntu, and with gParted, I separated my USB drive into two 2GB partitions (Yes, I know it's not much). One FAT32 for general use, and another without a filesystem at that point.

Then I downloaded wwt/wit so I could format said partition as WBFS, and put the .iso on. The best way to explain this is just to show you exactly what I did: (the new partition was at /dev/sdb2)

Code:
jay@ubuntu:~$ sudo wwt FORMAT /dev/sdb2 --force
*****  wwt: Wiimms WBFS Tool v2.03a r3309 i386 - Dirk Clemens - 2011-12-30  *****
FORMAT BLOCK DEVICE /dev/sdb2 [2 GiB, hss=512]
** 1 file formatted.
jay@ubuntu:~$ sudo wwt ADD --source Wind_Waker.iso --part /dev/sdb2
*****  wwt: Wiimms WBFS Tool v2.03a r3309 i386 - Dirk Clemens - 2011-12-30  *****
WBFSv1 #1/1 opened: /dev/sdb2
- ADD 1/1 [GZLE01] ISO:Wind_Waker.iso
!! wwt: ERROR #14 [INVALID WII PARTITION] in wd_check_part_offset() @ src/libwbfs/wiidisc.c#1925
!!	  Partition 0x454c5a47 ["GZLE"]: End of PART (57057ffa) behind end of
!!	  file (57057800): Wind_Waker.iso
!! wwt: ERROR #14 [INVALID WII PARTITION] in wd_load_part() @ src/libwbfs/wiidisc.c#2091
!!	  Invalid BOOT.BIN (no MAIN.DOL and no FST), partition '0x454c5a47
!!	  ["GZLE"]': Wind_Waker.iso
!! wwt: ERROR #14 [INVALID WII PARTITION] in exec_add() @ src/wwt.c#2117
!!	  Error while adding disc [GZLE01] @/dev/sdb2
jay@ubuntu:~$ sudo wwt LIST /dev/sdb2

ID6	 1/215 discs (0 GiB)
--------------------------------------------------------------
GZLE01  The Legend of Zelda: The Wind Waker
--------------------------------------------------------------
Total: 1/215 discs, 0 MiB ~ 0 GiB used, 1922 MiB ~ 2 GiB free.

From what I can see, it formatted the partition OK, but then starts complaining that the partition is 'invalid' once I try to add the .iso, and then when I list the discs on the WBFS system, it says Wind Waker is there, but the filesystem is empty.

So, what have I done wrong?
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
It seems that you have bad trimmed gc disc:
The partition data goes upto 0x57057ffa (1459978234), but the image ends at 0x57057800 (1459976192, , 2042 bytes to short). But it is also possible, that I have done something wrong because GS support isn't tested deeply.

My tools don't copy invalid partitions. So the resulting disc is empty. Perhaps I should change this if --force is set.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    BigOnYa @ BigOnYa: Good price. I like XFX graphics cards.