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
wiimms-tools.png


WIT: Wiimms ISO Tools v1.27a - 2011-02-09
A command line ISO+WBFS tool set for various os.

WIT (Wiimms ISO Tools) is a set of command line tools to manipulate Wii ISO images and WBFS containers. The two main tools are called wit (Wiimms ISO Tool) and wwt (Wiimms WBFS Tool, the WBFS manager).

Feature overview:
Visit http://wit.wiimm.de/features.html for more details.

Download of the current version:

There are also some GUI available:


Highlights of this release:

  • A new tool is included: wfuse
    This new tool is a FUSE (Filesystem in Userspace) application. wfuse can mount ISO images in all supported file formats (ISO, CISO, WDF, WIA, WBFS, FST) and also complete WBFS files and partitions. The mounted file system is readonly. wfuse is available for Linux and Mac; Windows has no FUSE support. For more details read http://wit.wiimm.de/wfuse/
    .

Change log:


Code:
wit v1.27a r2289 - 2011-02-09

- Bug fix: WBFS preallocation was always a little bit to short.
- Bug fix: Wrong signature when dumping the content of TICKET and TMD files.
- Bug fix: "wwt sync --newer FST" failed because of missing timestamp.
- New option --links: Detect soft and hard linked source files while composing
ÂÂ or extracting discs and try to create hard links instead of independent
ÂÂ copies on the destination file system.
- New option: --flat: If extracting files the path names of the source discs
ÂÂ are removed. This enables extracting of all files to s specific destination
ÂÂ directory without creation of subdirectories. Command "wit files --flat"
ÂÂ can be used to verify the flat names.
- New tool: wfuse: Mount a Wii or GameCube image or a WBFS file or partition
ÂÂ to a mount point using FUSE (Filesystem in Userspace). FUSE and wfuse are
ÂÂ not available for Cygwin/Windows.


Known bugs:

- The GameCube support is in development and EXPERIMENTAL!
- There are new problems while reading from non seekable sources (e.g. pipes).
ÂÂ The reason is the complete new and more intelligent wiidisc lib which makes
ÂÂ more lookups ==> The best is to use version 1.01c for pipes.

The source is published under the license of GPL2. Checkout the sources directly from the SVN repository or browse the source. Visit http://wit.wiimm.de/ for more information.
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
@giantpune:
Some time ago you asked me: "Is it possible to extract one or some files into a directory without creating the complete directory hierarchy?"

And now my answer is yes, and it is possible in 2 ways.
Example: You want to extract sys/main.dol of the data partition into the current directory:
Code:
1.) use the --flat option
wit extract --psel data -F +/sys/main.dol --flat sourceimage .

2.) mount the image (not for windows)
mkdir mnt
wfuse sourceimage mnt
cp -p mnt/iso/part/data/sys/main.dol .
wfuse --umount mnt
rmdir mnt
 

airline38

Well-Known Member
Member
Joined
Mar 28, 2010
Messages
741
Trophies
1
XP
807
Country
Taiwan
QUOTE said:
1.) use the --flat option
wit extract --psel data -F +/sys/main.dol --flat sourceimage .

@Wiimm, what about the replacement of a file in the WBFS or ISO ?

wit replace ?? --psel data -F+/sys/main.dol -- ?????
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
replacement will be a hard job. it is together with gamecube support in my 2do list in group 2 "extensions". First I will finish group 1 "bugs":
- little bug fixes and correction of with "[2do]" marked source.
- --section support for some other commands.
- some other nice little things.

btw: FUSE was also in group 2.
 

giantpune

Well-Known Member
Member
Joined
Apr 10, 2009
Messages
2,860
Trophies
0
XP
213
Country
United States
i think you have brought back a bug which you had once fixed.

Code:
./wit EDIT ./blabla.wbfs --id=123456 --modify=DISC
*****ÂÂwit: Wiimms ISO Tool v1.20a r1946 x86_64 - Dirk Clemens - 2010-11-05ÂÂ*****
! wit: No valid source file found.


./wit EDIT ./blabla.wbfs --id=123456 --modify=BOOT
*****ÂÂwit: Wiimms ISO Tool v1.20a r1946 x86_64 - Dirk Clemens - 2010-11-05ÂÂ*****
wit: EDIT WBFS:/media/1TB_SATA_USB/wbfs/blabla.wbfs

"EDIT" + "--id=" + "--modify=DISC" + ".wbfs" file = doesnt work

this bug is present in the latest version of wit. i have gone back a few revisions and it is present. i have not gone back far enough to see when it was re-introduced.
 

Alouest

Member
Newcomer
Joined
Feb 14, 2011
Messages
5
Trophies
0
XP
25
Country
France
Hello,

Sorry if it's not the good place.
Sorry for my bad English (school is fare away now).

It 's the 3rd time that I loose my wbfs partition (bad use of loader and cios I guess).

As it's very long to rip again and again my games, I try to repair the wbfs partition.
ph34r.gif


Code:
alouest@alouest-desktop:~$ wwt check /dev/sde1
*****ÂÂwwt: Wiimms WBFS Tool v1.18a r1868 i386 - Dirk Clemens - 2010-10-10ÂÂ*****

!! wwt: ERROR #28 [READ FILE FAILED] in AnalyzePartitions() @ src/wbfs-interface.c#367
!!ÂÂÂÂÂÂNo WBFS magic found: /dev/sde1
!! wwt: ERROR #15 [NO WBFS FOUND] in AnalyzePartitions() @ src/wbfs-interface.c#381
!!ÂÂÂÂÂÂno WBFS partitions found -> abort

Code:
alouest@alouest-desktop:~$ wwt analyse /dev/sde1

ANALYZE /dev/sde1
------------------------------------------------------------------------------------
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂHD SECTORSÂÂWBFS SECTORSÂÂ DISCSÂÂÂÂÂÂ (all values in hex)
ÂÂÂÂÂÂÂÂÂÂ WBFSÂÂÂÂ totalÂÂsecÂÂtotalÂÂÂÂsecÂÂmax inode
NAMEÂÂÂÂmagic vrsÂÂÂÂ num sizeÂÂ numÂÂÂÂsizeÂÂnum sizeÂÂADDITIONAL INFORMATION
------------------------------------------------------------------------------------
INODE-TIM: okÂÂ1ÂÂe4fbfa3ÂÂ200ÂÂe4fbÂÂ200000ÂÂ d6 2600ÂÂ2010-11-06 16:37:21 n=5
DISCS:ÂÂÂÂÂÂ-ÂÂ0ÂÂe4fbfa3ÂÂ200ÂÂe4fbÂÂ200000ÂÂ d6 2600ÂÂ7 disc header found
------------------------------------------------------------------------------------


I try this command that I find on www : "wwt -f -p /dev/sde1 EDIT ACT=0-1000" but again :
Code:
alouest@alouest-desktop:~$ wwt -f -p /dev/sde1 EDIT ACT=0-1000
*****ÂÂwwt: Wiimms WBFS Tool v1.18a r1868 i386 - Dirk Clemens - 2010-10-10ÂÂ*****
!! wwt: ERROR #28 [READ FILE FAILED] in AnalyzePartitions() @ src/wbfs-interface.c#367
!!ÂÂÂÂÂÂNo WBFS magic found: /dev/sde1
!! wwt: ERROR #15 [NO WBFS FOUND] in AnalyzePartitions() @ src/wbfs-interface.c#381
!!ÂÂÂÂÂÂno WBFS partitions found -> abort


I try this command "wwt format --recover" but after than :

QUOTE said:
alouest@alouest-desktop:~$ wwt analyse --auto

ANALYZE /dev/sda

ANALYZE /dev/sda1

ANALYZE /dev/sda2

ANALYZE /dev/sda3

ANALYZE /dev/sdb

ANALYZE /dev/sdb1

ANALYZE /dev/sdc

ANALYZE /dev/sde
------------------------------------------------------------------------------------
HD SECTORS WBFS SECTORS DISCS (all values in hex)
WBFS total sec total sec max inode
NAME magic vrs num size num size num size ADDITIONAL INFORMATION
------------------------------------------------------------------------------------
INODE-TIM: ok 1 e4fbfa3 200 e4fb 200000 d6 2600 2010-11-06 16:37:21 n=5
------------------------------------------------------------------------------------

ANALYZE /dev/sde1
------------------------------------------------------------------------------------
HD SECTORS WBFS SECTORS DISCS (all values in hex)
WBFS total sec total sec max inode
NAME magic vrs num size num size num size ADDITIONAL INFORMATION
------------------------------------------------------------------------------------
INODE-TIM: ok 1 e4fbfa3 200 e4fb 200000 d6 2600 2010-11-06 16:37:21 n=5
DISCS: - 0 e4fbfa3 200 e4fb 200000 d6 2600 7 disc header found
------------------------------------------------------------------------------------

wwt found a new partition !!
ohmy.gif


I think it's better for me to stop blind attempt !! (obviously I don't know what I 'm doing, huh
wacko.gif
).

It seems that my games are still in there but how can I recover them ?

Thanks for your help !
grog.gif
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
The wbfs header is overwritten.
Try: "wwt format --recover /dev/sde1"
and after verifying the output (make sure that it is the right partition) try:
"wwt format --recover /dev/sde1 --force"

"EDIT ACT=0-1000" is an very old variant before --recover.


EDIT:
I'm tied and so I haven't seen that you have already done the first command. The command FORMAT needs --force for execution. It is a little bit security because FORMAT can destroy whole drives.
 

Alouest

Member
Newcomer
Joined
Feb 14, 2011
Messages
5
Trophies
0
XP
25
Country
France
Thanks for you help !

bow.gif
bow.gif
bow.gif
bow.gif


The command "wwt format --recover /dev/sde1 --force" works perfectly, find all my games and end with "no errors found".
Wiithon can see the games again ...
toot.gif

I will try plunging the HD on my wii tomorrow but it seems to be ok.

Just a question about the new partition that I have created by mistake on my disk...
(now it's /dev/sdc1 but you can see /dev/sdc is new and empty)
Code:
alouest@alouest-desktop:~$ wwt analyse --auto

------------------------------------------------------------------------------------
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂHD SECTORSÂÂWBFS SECTORSÂÂ DISCSÂÂÂÂÂÂ (all values in hex)
ÂÂÂÂÂÂÂÂÂÂ WBFSÂÂÂÂ totalÂÂsecÂÂtotalÂÂÂÂsecÂÂmax inode
NAMEÂÂÂÂmagic vrsÂÂÂÂ num sizeÂÂ numÂÂÂÂsizeÂÂnum sizeÂÂADDITIONAL INFORMATION
------------------------------------------------------------------------------------
INODE-TIM: okÂÂ1ÂÂe4fbfa3ÂÂ200ÂÂe4fbÂÂ200000ÂÂ d6 2600ÂÂ2010-11-06 16:37:21 n=5
------------------------------------------------------------------------------------

ANALYZE /dev/sdc1
------------------------------------------------------------------------------------
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂHD SECTORSÂÂWBFS SECTORSÂÂ DISCSÂÂÂÂÂÂ (all values in hex)
ÂÂÂÂÂÂÂÂÂÂ WBFSÂÂÂÂ totalÂÂsecÂÂtotalÂÂÂÂsecÂÂmax inode
NAMEÂÂÂÂmagic vrsÂÂÂÂ num sizeÂÂ numÂÂÂÂsizeÂÂnum sizeÂÂADDITIONAL INFORMATION
------------------------------------------------------------------------------------
HEADER:ÂÂÂÂokÂÂ1ÂÂe4fbfa3ÂÂ200ÂÂe4fbÂÂ200000ÂÂ d6 2600ÂÂWBFS header scanning
INODE-TIM: okÂÂ1ÂÂe4fbfa3ÂÂ200ÂÂe4fbÂÂ200000ÂÂ d6 2600ÂÂ2010-11-06 16:37:21 n=5
DISCS:ÂÂÂÂÂÂ-ÂÂ0ÂÂe4fbfa3ÂÂ200ÂÂe4fbÂÂ200000ÂÂ d6 2600ÂÂ7 disc header found
------------------------------------------------------------------------------------

It's a problem or no ? Can - or should - I delete it ?
unsure.gif


I will test the disk on my wii tomorrow.
For now, off to bed...
 

Albatroz

Well-Known Member
Member
Joined
Feb 15, 2011
Messages
135
Trophies
0
XP
55
Country
United States
i couldnt convert some games with wit,,, i noticed if filename = gamexxxxxx.iso, wit works great. but, if filename is = game xxx yyy.iso (with spaces) wit gimme error saying failed to find file.
is there any way to use long name files with spaces or, i must use single names without spaces?
thx
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
@Alouest
It is maybe a problem for auto detecting the wbfs device. You can delete the wbfs header with (if working with a unix like system):
dd if=/dev/zero of=/dev/sdc1 bs=1 count=12
Be sure to use the right device!!!
 

Alouest

Member
Newcomer
Joined
Feb 14, 2011
Messages
5
Trophies
0
XP
25
Country
France
@ Wiimm

It's perfect!
The games are here and well read by the loader.
bow.gif


As I'm working on ubuntu, I tried your command "dd if=/dev/zero of=/dev/sdc1 bs=1 count=12" pointing to the good partition (the empty one : sdd).
Code:
alouest@alouest-desktop:~$ dd if=/dev/zero of=/dev/sdd bs=1 count=12
12+0 enregistrements lus
12+0 enregistrements écrits
12 octets (12 B) copiés, 0,0018121 s, 6,6 kB/s

alouest@alouest-desktop:~$ wwt analyse --auto

ANALYZE /dev/sda

ANALYZE /dev/sda1

ANALYZE /dev/sda2

ANALYZE /dev/sda3

ANALYZE /dev/sdb

ANALYZE /dev/sdb1

ANALYZE /dev/sdd
------------------------------------------------------------------------------------
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂHD SECTORSÂÂWBFS SECTORSÂÂ DISCSÂÂÂÂÂÂ (all values in hex)
ÂÂÂÂÂÂÂÂÂÂ WBFSÂÂÂÂ totalÂÂsecÂÂtotalÂÂÂÂsecÂÂmax inode
NAMEÂÂÂÂmagic vrsÂÂÂÂ num sizeÂÂ numÂÂÂÂsizeÂÂnum sizeÂÂADDITIONAL INFORMATION
------------------------------------------------------------------------------------
INODE-TIM: okÂÂ1ÂÂe4fbfa3ÂÂ200ÂÂe4fbÂÂ200000ÂÂ d6 2600ÂÂ2011-02-15 18:42:38 n=5
------------------------------------------------------------------------------------

ANALYZE /dev/sdd1
------------------------------------------------------------------------------------
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂHD SECTORSÂÂWBFS SECTORSÂÂ DISCSÂÂÂÂÂÂ (all values in hex)
ÂÂÂÂÂÂÂÂÂÂ WBFSÂÂÂÂ totalÂÂsecÂÂtotalÂÂÂÂsecÂÂmax inode
NAMEÂÂÂÂmagic vrsÂÂÂÂ num sizeÂÂ numÂÂÂÂsizeÂÂnum sizeÂÂADDITIONAL INFORMATION
------------------------------------------------------------------------------------
HEADER:ÂÂÂÂokÂÂ1ÂÂe4fbfa3ÂÂ200ÂÂe4fbÂÂ200000ÂÂ d6 2600ÂÂWBFS header scanning
INODE-TIM: okÂÂ1ÂÂe4fbfa3ÂÂ200ÂÂe4fbÂÂ200000ÂÂ d6 2600ÂÂ2011-02-15 18:42:38 n=5
DISCS:ÂÂÂÂÂÂ-ÂÂ0ÂÂe4fbfa3ÂÂ200ÂÂe4fbÂÂ200000ÂÂ d6 2600ÂÂ7 disc header found
------------------------------------------------------------------------------------

As you can see, it has no effect : /dev/sdd is alway here.
But it's not really a problem because games works fine.
Maybe - one day - I will format the HD to clear this point.

Thank you again for your help.
yaywii.gif


Regards.
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
The WBFS header is done, that's important!

ANALYZE and also "FORMAT --recover" look deep into each partition and try to find WBFS fragments. But if the header is cleared all usb loaders and all wbfs mangers will recognize this drive as non WBFS.
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
davebaol said:
Hi Wiimm,
I would suggest you an extension for the "--show INTRO" option of the "wit dump" command when used for analyzing a wii iso.
This improvement is as simple as useful, in fact I've already implemented it as a .bat file but it can be easily integrated in wit, I guess.
The target is to show 2 info inside the update partition (if present):
  • IOS used to load the game
  • System Menu

CODE# ./wit dump pool/wdf/mkw.wdf

Dump of file pool/wdf/mkw.wdf

ÂÂReal path:ÂÂÂÂÂÂÂÂ .../mkw.wdf
ÂÂVirtual size:ÂÂÂÂÂÂ118240000/hex = 4699979776 = 4482 MiB
ÂÂScrubbed size:ÂÂÂÂÂÂb20c0000/hex = 2987130880 = 2849 MiB, 63.6%
ÂÂWDF file size:ÂÂÂÂÂÂb2e054a0/hex = 3001046176 = 2862 MiB, 63.9%, 100.5%
ÂÂFile & disc type:ÂÂWDF/WIIÂÂ&ÂÂWii
ÂÂDisc & part IDs:ÂÂ disc=RMCP01, ticket=RMCP, tmd=RMCP, boot=RMCP01
ÂÂDisc name:ÂÂÂÂÂÂÂÂ MarioKartWii
ÂÂDB title:ÂÂÂÂÂÂÂÂÂÂMario Kart Wii
ÂÂID Region:ÂÂÂÂÂÂÂÂ PAL [PAL ]
ÂÂRegion setting:ÂÂÂÂ2 [Europe] / 80 80 80 00ÂÂ03 03 04 03
ÂÂSystem Menu:ÂÂÂÂÂÂ v258 = 3.1EÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ
 

mauifrog

DA KINE WiiHacker
Member
Joined
Jan 21, 2010
Messages
1,587
Trophies
0
Website
Visit site
XP
392
Country
United States
Little help if someone could.
How can I use wit to set the Game title, game id, and region, without fakesigning the disc.

I would like to set an iso to
--id=0SBE01
--title "Super Smash Bros. Brawl"
--region USA

I have tried-
wit edit game.iso --id=0SBE01 --title "Super Smash Bros. Brawl" --region USA
But it edits the ticket, tmd, boot also. I only want to edit the header and region.
Similar to regionfrii and WIIISORenamerv3

any suggestions?
 

mauifrog

DA KINE WiiHacker
Member
Joined
Jan 21, 2010
Messages
1,587
Trophies
0
Website
Visit site
XP
392
Country
United States
Thanks, I'll try that.

Edit-
OK so
wit edit game.iso --id=0SBE01 --name "Super Smash Bros. Brawl" --region USA --modify NONE,DISC,BOOT

Just to clarify, modifying disc and boot does not require fakesign, but ticket and tmd does? Also, is there any relevance to the region string? Wit sets this to -
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Regionfrii sets it to-
80 06 80 80 80 80 80 80 80 80 80 80 80 80 80 80
What checks this region string?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv2 @ K3Nv2:
    Jaws is on a diet
  • K3Nv2 @ K3Nv2:
    Damn power went out
  • BigOnYa @ BigOnYa:
    Ok xdqwerty, your little bro prob tripped On the cord and unplugged you
  • K3Nv2 @ K3Nv2:
    Ya I'm afraid of the dark hug me
  • BigOnYa @ BigOnYa:
    Grab and hold close your AncientBoi doll.
  • K3Nv2 @ K3Nv2:
    Damn didn't charge my external battery either
  • BigOnYa @ BigOnYa:
    Take the batteries out of your SuperStabber3000... Or is it gas powered?
  • K3Nv2 @ K3Nv2:
    I stole batteries from your black mamba
    +1
  • K3Nv2 @ K3Nv2:
    My frozen food better hold up for an hour I know that
  • BigOnYa @ BigOnYa:
    Or else gonna be a big lunch and dinner tomorrow.
  • BigOnYa @ BigOnYa:
    Did you pay your power bill? Or give all yo money to my wife, again.
  • K3Nv2 @ K3Nv2:
    Oh good the estimated time is the same exact time they just said
    +1
  • BigOnYa @ BigOnYa:
    Load up your pc and monitor, and head to a McDonalds dining room, they have free WiFi
  • K3Nv2 @ K3Nv2:
    Sir please watch your porn in the bathroom
    +2
  • BigOnYa @ BigOnYa:
    No sir we can not sell you anymore apple pies, after what you did with the last one.
  • K3Nv2 @ K3Nv2:
    We ran out
  • HiradeGirl @ HiradeGirl:
    for your life
    +1
  • K3Nv2 @ K3Nv2:
    My life has no value my fat ass is staying right here
  • K3Nv2 @ K3Nv2:
    Nearly 4 hours without power :(
  • Veho @ Veho:
    SO POWERLESS
  • K3Nv2 @ K3Nv2:
    Tell Kanye I need power
  • DinohScene @ DinohScene:
    Better start running in your hamster wheel
    DinohScene @ DinohScene: Better start running in your hamster wheel