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
Hi,

Is there any simple way of converting command
Code:
wbfs_file -g file.iso convert directory/
to wit?

I would like to get directory called "game name [gameid]" with "gameid.wbfs, gameid.wbf1" files inside.

I don't need script like this: https://gist.github.com/openback/1138763
Just one/simple command line.

Don't know what -g means.

Unix: wit copy --wbfs SOURCE /BASEDIR/%X/%I.wbfs
Windows: wit copy --wbfs -E$ SOURCE /BASEDIR/$X/$I.wbfs

SOURCE is a list of souece files or directories. BASEDIR is the base directory of the output. A relative path is also possible.

Add -t or --test for tests (don't create anything).
 
  • Like
Reactions: mike333

mike333

Well-Known Member
Member
Joined
Aug 30, 2010
Messages
718
Trophies
0
XP
258
Country
Poland
Thank You for fast response.
"-g" means "Copy only game partition from ISO"
So I believe it translates to "--psel DATA", right?

wbfs_file is no longer developed and last release was on Jan 2010:
http://code.google.com/p/cfg-loader/downloads/detail?name=wbfs_file_2.9.zip&
and need some patching for 64bit systems:
http://git.animux.de/overlay/diff/g...h?id=d30069f48c7ec183ebc60077bdf4fcf887dab0ac

I think it is time to break habit and use more mature tool.

Wiimm, could You point me to doc which describes %X,%I macros?

Is there magic command which for specified dir:
- find all .wbfs files (recursive dig)
- checks them (one at a time, this is not flash/ssd storage)
- pint nice looking summary

Thanks
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
Hey Wiimm, would it be possible to support the --sections option for the CHECK and REPAIR commands of wwt? That would simplify a lot the implementation of these commands in GUIs.

Which verbose level is important for you: none, -v or -vv?

Thank You for fast response.
"-g" means "Copy only game partition from ISO"
So I believe it translates to "--psel DATA", right?
Yes

Wiimm, could You point me to doc which describes %X,%I macros?
http://wit.wiimm.de/info/iso-images.html#esc

Is there magic command which for specified dir:
- find all .wbfs files (recursive dig)
- checks them (one at a time, this is not flash/ssd storage)
- pint nice looking summary

Only: Find all wii images: --recurse BASEDIR
It is possible for all commands, also for CHECK.
One status line for each game partition is print, or more. Play with --quiet and --verbose.
 
  • Like
Reactions: mike333

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
Nickkk

Here is the result of a first implementation (verbose level 0)
Code:
# ./wwt check a.wbfs  --sections
[version]
prog=wwt
name=Wiimms WBFS Tool
version=2.24a
beta=0
revision=4818
system=x86_64
endian=1234 little
author=Dirk Clemens
date=2013-12-30
url=http://wit.wiimm.de/wwt
 
[check-wbfs]
wbfs=a.wbfs
 
[check-summary]
err-sectors-marked-free=1
err-sectors-marked-used=0
err-sectors-multi-usage=1
err-sectors-invalid-reference=0
err-discs-without-blocks=0
total-errors=2
total-invalid-discs=2
 
[error]
program=wwt
command=CHECK
code=19
name=INVALID WBFS
text=Invalid WBFS
 

mike333

Well-Known Member
Member
Joined
Aug 30, 2010
Messages
718
Trophies
0
XP
258
Country
Poland
Here is instruction for those who want to migrate from wbfs_file to wit.

Conversion by wbfs_file.
Code:
wbfs_file -g abcd.iso convert asd
Conversion by wit.
Code:
wit copy --wbfs --psel data -z abcd.iso "asd/%Y/%+"

There are minor differences:
- wit can create "asd" subdirectory, wbfs_file can't
- there are minor differences in %T which is part of %Y, some chars are replaced to "_" by wbfs_file

Lack of trust. How to compare wbfs files created by different tools for one source iso.
Code:
wit diff -v a.wbfs b.wbfs

Mass wbfs verification
Code:
wit verify --recurse .

Dirk, thank You for great tool!

Here are some points to Your New Year's resolution list:
- migrate to git
- host on github
 

moli

Active Member
Newcomer
Joined
Mar 4, 2009
Messages
36
Trophies
0
Age
46
Website
moli.hu
XP
173
Country
Hungary
Dear Wiimm,
First i'd like to congratulate to you for the inclusion of wit in the official debian repositories! I was shocked and amused when i realised this. Another script i dont have to download and install manually, imdbphp should be next :)

Second, recently i reinstalled my machine (got fed up with gnome, so moving to kde (me) and xfce (girlfriend & grandma) ) and purged a whole lot of packages after that, even basic ones like xterm, ftp, host. Now i dont have a progress bar when converting an image even if i specify --progress. Which package am i missing? Thanks. It appeared this moment, minutes after starting the conversion.. nevermind me
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
SVN supports all my needs. Again, no reason to change.

Dear Wiimm,
First i'd like to congratulate to you for the inclusion of wit in the official debian repositories! I was shocked and amused when i realised this. Another script i dont have to download and install manually, imdbphp should be next :)
I know about integration of the wit tools in some linux distributions, but not one was done by me.
 

Nickkk

Well-Known Member
Newcomer
Joined
May 25, 2012
Messages
61
Trophies
0
Website
desairem.altervista.org
XP
159
Country
Swaziland
Nickkk

Here is the result of a first implementation (verbose level 0)
Code:
# ./wwt check a.wbfs  --sections
[version]
prog=wwt
name=Wiimms WBFS Tool
version=2.24a
beta=0
revision=4818
system=x86_64
endian=1234 little
author=Dirk Clemens
date=2013-12-30
url=http://wit.wiimm.de/wwt
 
[check-wbfs]
wbfs=a.wbfs
 
[check-summary]
err-sectors-marked-free=1
err-sectors-marked-used=0
err-sectors-multi-usage=1
err-sectors-invalid-reference=0
err-discs-without-blocks=0
total-errors=2
total-invalid-discs=2
 
[error]
program=wwt
command=CHECK
code=19
name=INVALID WBFS
text=Invalid WBFS


Hi Wiimm, this looks great. The only flags I use for printing are --scan-progress and --progress.

I received a report from a user of Witgui who says that double layer discs can't be converted. In fact, I tried converting "Disney Infinity" and an "end of data behind end of file"-error is thrown when trying to list it or to convert it.
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
I received a report from a user of Witgui who says that double layer discs can't be converted. In fact, I tried converting "Disney Infinity" and an "end of data behind end of file"-error is thrown when trying to list it or to convert it.
Please send me the output of "wit dump IMAGE"
 

Nickkk

Well-Known Member
Newcomer
Joined
May 25, 2012
Messages
61
Trophies
0
Website
desairem.altervista.org
XP
159
Country
Swaziland
Please send me the output of "wit dump IMAGE"


!! wit: ERROR #14 [INVALID WII PARTITION] in wd_check_part_offset() @ src/libwbfs/wiidisc.c#1930
!! Partition 0 [DATA]: End of data (0x1fa550000) behind end of file
!! (0x118240000): /Users/nicolaskick/Downloads/Disney Infinity.iso

Dump of file /Users/nicolaskick/Downloads/Disney Infinity.iso

ISO file size: 118240000/hex = 4699979776 = 4482 MiB
Scrubbed size: aa30000/hex = 178454528 = 170 MiB, 3.80%, 5446*32K
File & disc type: ISO/WII & Wii
Disc & part IDs: disc=SQIP4Q, ticket=.UPP, tmd=.UPP, boot=RELSAB
Disc name: Disney Infinity
ID Region: PAL [PAL ]
Region setting: 2 [Europe] / Jap=128 USA=128 ?=128 Eur=6,7,7,6,7,7 Kor=128
System menu: v514 = ?
System version: 00000001-00000004 = IOS 0x04 = IOS 4
Partitions: 1 [encrypted, well signed]
Directories: 5
Files: 71

1 partition table with 1 partition:

index type offset .. end off size/hex = size/dec = MiB status
----------------------------------------------------------------------------------------
0 part.tab 40020 .. 40028 8 = 8 1 partition
----------------------------------------------------------------------------------------
0.0 UPDATE 1 50000 .. aa68000 aa18000 = 178356224 = 170 enc,signed
----------------------------------------------------------------------------------------

 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
It's clearly a bad dump (ripping error?):

!! Partition 0 [DATA]: End of data (0x1fa550000) behind end of file
The "End of data" is the assumed end of the image after reading the disc header. 0x1fa550000 is about 7.9 GiB.

ISO file size: 118240000/hex = 4699979776 = 4482 MiB
But the image is to small, because only a single layer disc was ripped.
 

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 v2.25a - 2014-01-03
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:
  • The new (but experimental) option --auto-split enables a feature to detect, if an new image must be split. I hope, that it doesn't slow down the image creation under any circumstances.

    The feature is based on tests with fseek(). First test with Linux are fine. Cygwin reports always SUCCESS, so that the maximum file size can't be estimated. On Macs I had no chance to test it.

    It is planned to enable --auto-split by default in future versions of the tools. You can do it by setting the environment variables WIT_OPT and WWT_OPT to --auto-split.

    If you're using --auto-split, then please tell it me (in this thread). And please tell also, if you found any disadvantages.
    .

Change log:

Code:
wit v2.25a r4825 - 2014-01-03

 - New option --auto-split: If set, the tools try to find out, if an image
   split is needed. The split size is then either below 4 or 2 GiB. Auto-Split
   base on tests with fseek() and works fine under Linux, but it don't work
   with Cygwin. Mac is unknown. In future versions --auto-split is enabled by
   default. It is disabled by any other split option.
 - New option --no-split: Disable file splitting at all. At the moment and in
   old versions of the tools, this is the default.
 - wwt CHECK+REPAIR: Support for option --sections.
 - Windows only: Cygwin update to v1.7.27 2013-12-09.

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.
 

Nickkk

Well-Known Member
Newcomer
Joined
May 25, 2012
Messages
61
Trophies
0
Website
desairem.altervista.org
XP
159
Country
Swaziland
It's clearly a bad dump (ripping error?):

The "End of data" is the assumed end of the image after reading the disc header. 0x1fa550000 is about 7.9 GiB.

But the image is to small, because only a single layer disc was ripped.

Ok, thank you for the hint.

By the way, would it be possible to extend the --sections flag to the verify command of wit?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Sonic Angel Knight @ Sonic Angel Knight: :ninja: