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
Do you mean "wit list --sections"? (with sections there is no difference between list list-l ...)
What partition count do you mean? wit sees only discs.
Code:
# ./wit list --sections pool/wdf | head -n5

[summary]
total-discs=10
total-size=17040408576

and wwt prints for every wbfs partition one header section:
Code:
 # ./wwt ls --sections a.wbfs | head -n9

[wbfs-0]
file=a.wbfs
used_discs=4
total_discs=215
used_mib=215
free_mib=19780
total_mib=20478
 

giantpune

Well-Known Member
Member
Joined
Apr 10, 2009
Messages
2,860
Trophies
0
XP
213
Country
United States
this is the exact same command, with only the "--sections" added to the end of it. in one case, there is a field that says how many partitions are in each game ( isnt that what n(p) is ? ). in the other case, there is no field.
Code:
sudo ./wit LIST-LLL /dev/sdc2

ID6ÂÂÂÂÂÂm-dateÂÂÂÂMiB Reg.ÂÂ4 discs (10 GiB)
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ n(p) typeÂÂ path of file
------------------------------------------------
RRRR53 2010-10-13 2764 -?-ÂÂ 000
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 1 WBFS/ISO /dev/sdc2/#0
RGHP55 2010-10-10 3886 PALÂÂ Guitar Hero
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 1 WBFS/ISO /dev/sdc2/#2
RGHP53 2010-10-10 3886 PALÂÂ Guitar Hero II
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 1 WBFS/ISO /dev/sdc2/#3
STEETR 2010-05-29ÂÂ 56 NTSCÂÂTetris Party Deluxe
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 1 WBFS/ISO /dev/sdc2/#1
------------------------------------------------
Total: 4 discs, 10592 MiB ~ 10 GiB used.

Code:
sudo ./wit LIST-LLL /dev/sdc2 --sections

[summary]
total-discs=4
total-size=11106516992

[disc-0]
id=RRRR53
name=000
title=(null)
region=-?- 
size=2898264064
itime=1286960738 2010-10-13 05:05:38
mtime=1286959859 2010-10-13 04:50:59
ctime=1286960738 2010-10-13 05:05:38
atime=1286960738 2010-10-13 05:05:38
filetype=WBFS/ISO
wbfs_slot=0
filename=/dev/sdc2
source=/dev/sdc2/#0

[disc-1]
id=RGHP55
name=Guitar Hero
title=(null)
region=PAL 
size=4074766336
itime=1286960920 2010-10-13 05:08:40
mtime=1286716560 2010-10-10 09:16:00
ctime=1286960920 2010-10-13 05:08:40
atime=1286960920 2010-10-13 05:08:40
filetype=WBFS/ISO
wbfs_slot=2
filename=/dev/sdc2
source=/dev/sdc2/#2

[disc-2]
id=RGHP53
name=Guitar Hero II
title=(null)
region=PAL 
size=4074766336
itime=1286961051 2010-10-13 05:10:51
mtime=1286716560 2010-10-10 09:16:00
ctime=1286961051 2010-10-13 05:10:51
atime=1286961051 2010-10-13 05:10:51
filetype=WBFS/ISO
wbfs_slot=3
filename=/dev/sdc2
source=/dev/sdc2/#3

[disc-3]
id=STEETR
name=Tetris Party Deluxe
title=Tetris Party Deluxe
region=NTSC
size=58720256
itime=1286960789 2010-10-13 05:06:29
mtime=1275140611 2010-05-29 09:43:31
ctime=1286960789 2010-10-13 05:06:29
atime=1286960789 2010-10-13 05:06:29
filetype=WBFS/ISO
wbfs_slot=1
filename=/dev/sdc2
source=/dev/sdc2/#1

its just nice to be able to look at the games and quickly tell if they still have the update partition for example if i want to grab a IOS wad.
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
I have commited a new beta release:

CODE[disc-8]
id=RHAP01
name=PARTY PACK for REVOLUTION
title=Wii Play
region=PAL
size=177160888
itime=1286961629 2010-10-13 11:20:29
mtime=1278523557 2010-07-07 19:25:57
ctime=1286961629 2010-10-13 11:20:29
atime=1286974775 2010-10-13 14:59:35
filetype=WDF+ISO
container=WDF
disctype=2 Wii
n-partitions=2ÂÂÂÂ
 

giantpune

Well-Known Member
Member
Joined
Apr 10, 2009
Messages
2,860
Trophies
0
XP
213
Country
United States
Can you explain a little about the paths output by LIST-LLL on a partition? im getting stuff like this...

Code:
R3TP54 2010-10-10 1570 PALÂÂ Top Spin 3
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 1 WBFS/ISO /media/WiiFat500/wbfs/R3TP54.wbfs/R3TP54.wbfs
RFPP01 2010-10-12 1980 PALÂÂ Wii Fit Plus
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 2 WBFS/ISO /media/WiiFat500/wbfs/RFPP01.wbfs/RFPP01.wbfs

where they end with the filename 2 times. "/RFPP01.wbfs/RFPP01.wbfs". how does wit arrive at that path?
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
Hi bug finder
wink.gif


The second "RFPP01.wbfs" should be a "#2" (the slot number within WBFS) to identify the source correctly. Fixed!

I have changed the output layout of list-lll a little bit:
Code:
# wit list-lll a.wbfs/#3 pool/wdf/mkw.wdf pool/wdf/ssb.wdf

ID6ÂÂÂÂÂÂm-dateÂÂÂÂMiB Reg.ÂÂ3 discs (10 GiB)
ÂÂn(p) p-infoÂÂÂÂÂÂ typeÂÂÂÂ source
----------------------------------------------------
RMCP01 2010-01-16 2862 PALÂÂ Mario Kart Wii
ÂÂÂÂ 3 DUC-ÂÂÂÂÂÂÂÂ WDF+ISOÂÂpool/wdf/mkw.wdf
RSBP01 2010-07-07 7294 PALÂÂ Super Smash Bros. Brawl
ÂÂÂÂ15 DU-?ÂÂÂÂÂÂÂÂ WDF+ISOÂÂpool/wdf/ssb.wdf
RHAP01 2010-07-07ÂÂ172 PALÂÂ Wii Play
ÂÂÂÂ 2 DU--ÂÂÂÂÂÂÂÂ WBFS/ISO a.wbfs/#3
----------------------------------------------------
Total: 3 discs, 10328 MiB ~ 10 GiB used.
The '/#3' is the slot selector. You can also say "file/id6" or "file/index" (index=0 based game index). The new column 'p-info' (partition info) shows available partitions. (D=Data, U=Update, C=Channel, ?=Other). The alignment has changed.

And this is the --section output:
CODE# wit list-lll --section a.wbfs/#3

[summary]
total-discs=1
total-size=180355072

[disc-0]
id=RHAP01
name=PARTY PACK for REVOLUTION
title=Wii Play
region=PAL
size=180355072
itime=1287049437 2010-10-14 11:43:57
mtime=1278523557 2010-07-07 19:25:57
ctime=1287049437 2010-10-14 11:43:57
atime=1287049437 2010-10-14 11:43:57
filetype=WBFS/ISO
container=WBFS
disctype=2 Wii
n-partitions=2
partition-info=DU--ÂÂÂÂÂÂ
 

giantpune

Well-Known Member
Member
Joined
Apr 10, 2009
Messages
2,860
Trophies
0
XP
213
Country
United States
i see most of the time, i can use these paths that wit puts out as arguments for source games. but this doesnt seem to work for games on a wbfs partition. is there a equivelent to "wit DUMP" that will accept a paths from a wbfs partition like "wit DUMP /dev/sdc2/#3 --show..."?
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
giantpune said:
i see most of the time, i can use these paths that wit puts out as arguments for source games. but this doesnt seem to work for games on a wbfs partition. is there a equivelent to "wit DUMP" that will accept a paths from a wbfs partition like "wit DUMP /dev/sdc2/#3 --show..."?
Each command of wwt+wit, that accept images (except FILETYPE), accept also WBFS files with an selector like /path/to/wbfs/#3. Read http://wit.wiimm.de/info/iso-images.html#selector for details.

And remember the output of "wit list --sections":
There is always one filename= and one source= line and the source contain this slot selector if the file is a wbfs.
CODE# wbfs file:
....
wbfs_slot=2
filename=pool/wbfs/a.wbfs
source=pool/wbfs/a.wbfs/#2
....

# wdf file:
....
wbfs_slot=-1
filename=pool/wdf/wpl.wdf
source=pool/wdf/wpl.wdf
....

If you find a command that doesn't support it, your kudos as bug finder will be improved.
 

giantpune

Well-Known Member
Member
Joined
Apr 10, 2009
Messages
2,860
Trophies
0
XP
213
Country
United States
i found another bug in wit. if i give him "wit DUMP " the type says it is a wii game, not gamecube, while the disc type correctly says gamecube.

Code:
./wit DUMP /dev/sdc2/#5

Dump of file /dev/sdc2/#5

ÂÂFile size:ÂÂÂÂÂÂ 118240000/hex = 4699979776 = 4482 MiB
ÂÂDisc type:ÂÂÂÂÂÂ GameCube
ÂÂID & file type:ÂÂGW7E69, WBFS/WII
ÂÂDisc name:ÂÂÂÂÂÂ 007: Agent Under Fire (tm)
ÂÂID Region:ÂÂÂÂÂÂ NTSC [NTSC]
ÂÂBI2 Region:ÂÂÂÂÂÂ1 [USA]
ÂÂPartitions:ÂÂÂÂÂÂÂÂÂÂ 1
ÂÂDirectories:ÂÂÂÂÂÂÂÂ 59
ÂÂFiles:ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ356
ÂÂUsed ISO blocks:ÂÂ41136 * 32 KiB = 1286 MiB


lol, and right after i post this, i remember you said you didnt implement it yet...
QUOTE said:
WBFS/GC ! not implemented yet (forgotton)
 

giantpune

Well-Known Member
Member
Joined
Apr 10, 2009
Messages
2,860
Trophies
0
XP
213
Country
United States
is there a reason "wit edit --modify=DISC..." doesnt work in wbfs games? here is the same command except one of them has "DISC" in the modify option. one time it works, one time it doesnt work.
Code:
sudo ./wit EDIT /dev/sdc2/#1 --id=AABB00 --modify=DISC,BOOT,TMD,TICKET
*****ÂÂwit: Wiimms ISO Tool v1.19a.beta5 r1886 x86_64 - Dirk Clemens - 2010-10-17ÂÂ*****
! wit: No valid source file found.

sudo ./wit EDIT /dev/sdc2/#1 --id=AABB00 --modify=BOOT,TMD,TICKET
*****ÂÂwit: Wiimms ISO Tool v1.19a.beta5 r1886 x86_64 - Dirk Clemens - 2010-10-17ÂÂ*****
wit: EDIT WBFS:/dev/sdc2/#1

it happens for wbfs partitions and .wbfs files

and there is some issue ive had for months. i have 1 HDD that wit cannot successfully write games to. he is able to create the new file and fill it with data. but on closing the .tmp file to rename it to the correct name, it fails. i believe this is because the HDD is NTFS formatted and perhaps wit is trying to do something like chmod or set some permissions that do not exist on NTFS. however, i have other NTFS HDDs that wit is able to write to.

so, I have no clue what is up with this one drive, but wit doesnt like it. here is the error. its no emergency that wit can write there, but if you have an idea what the issue is, i would be glad to hear it.
Code:
!! wit: ERROR #30 [WRITE FILE FAILED] in CloseSF() @ src/lib-sf.c#148
!!ÂÂÂÂÂÂClose file failed: /media/1TB_3GbS_2/.test.wia.mRCzGy.tmp
!!ÂÂÂÂÂÂ-> Operation not supported
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
--modify=DISC should work for wbfs too.

And the renaming bug is mysterious. The error is the result of closing the temp file and checking the stat. For a renaming error the message is "Can't create file: ...". The part "-> Operation not supported" is a system message. You are using linux/64 and write to a NTFS partition?
 

giantpune

Well-Known Member
Member
Joined
Apr 10, 2009
Messages
2,860
Trophies
0
XP
213
Country
United States
yes, ubuntu 10.04 amd64 and ntfs3g. like i said, it works for my NTFS USB HDD fine. and it works for one internal NTGS HDD. bt for some reason, wit has never been able to make a game on this 1 HDD. im not sure what would be the issue.

after some more testing, i see "--name=poop --modify=DISC,BOOT" works for wbfs files. but "--id=AABB00 --modify=DISC,BOOT" does not work. so, it is the combination of the "--id=" and the "DISC" that makes it throw the error.
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
I have found the bug, it's curios.

If you patch the disc header the new id is patched very early while fast scanning the game so that all commands only see the new id. When opening a wbfs file the disc with the new patched id is searched and not found. This is not logged with an error message (second bug).

I have to change a little bit: access the wbfs disc by slot index.
 

giantpune

Well-Known Member
Member
Joined
Apr 10, 2009
Messages
2,860
Trophies
0
XP
213
Country
United States
yes. most of the commands like "wit copy" and "wwt add" accept a folder of extracted files as source just like a .iso or .wbfs.
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
I have committed wit 1.19a.beta6 into the beta branch. It solves the --modify=DISC problem.

giantpune said:
yes. most of the commands like "wit copy" and "wwt add" accept a folder of extracted files as source just like a .iso or .wbfs.
Yes. And I recommend the command "wit dump composingdir" to check the virtual disc.
More composing details: http://wit.wiimm.de/info/composing.html
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: In the end that call ended up costing Dell millions in lost contracts with Raytheon, and really...