Hacking wwt+wit: Wiimms WBFS+ISO Tools

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,291
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,467
Country
Germany
Skeeve said:
Wiimm, I'm deeply impressed! Your tool becomes better each time I use it
wink.gif

I know that wit is very powerfull. You can list/compare/copy/scrub/split/rename (and more) many files with one little command line.

Source files are scanned (file names and extensions are irrelevant four source files) for iso format (PLAIN, WBFS, WDF, CISO). If the source is a directory all found ISOs in that directory are used as source. With option --recurse directories are searched recursively. The destination format are controlled by names (example: just put a .ciso at the end of dest file to force CISO) and by options. The dest filenames are controlled by %-escapes.

I know that a good FAQ is needed ... yes I know


QUOTE(Skeeve @ Apr 11 2010, 09:51 PM) You're german (too)?
Ja, ich bin ein alter Sack aus dem Ruhrgebiet.
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,291
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,467
Country
Germany
@sylver78 & other mac developer

Since today I have access to a mac and hope that i can make mac distribs by myself. But the mac is missing the development tools
frown.gif


Can anyone of you explain what and how to install a development tool set for mac?
 

giantpune

Well-Known Member
Member
Joined
Apr 10, 2009
Messages
2,860
Trophies
0
XP
213
Country
United States
i just installed x-code on my mac and nothing else and i was able to build your tool set. i had to sign up for something (free) to get access to the download link.
 

drh

Well-Known Member
Newcomer
Joined
Nov 14, 2009
Messages
76
Trophies
0
XP
81
Country
By the way, I formatted a disk the other day with a new block size using the command:

wwt format /dev/rdisk2s2 --hss 4096 --force

I filled the 1tb drive (why didn't I test it first with just 1 file) and the drive is not recognised by my loader :-(

I'm using WiiFlow, so I'm guessing its a problem with WiiFlow recognising the WBFS partition with the larger block size, because the drive worked fine before with the default block size :-(
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,291
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,467
Country
Germany
drh said:
http://developer.apple.com/technologies/xcode.html
Thanx, I have already found this.

QUOTE(drh @ Apr 13 2010, 07:33 PM) By the way, I formatted a disk the other day with a new block size using the command:

wwt format /dev/rdisk2s2 --hss 4096 --force

I filled the 1tb drive (why didn't I test it first with just 1 file) and the drive is not recognised by my loader :-(

I'm using WiiFlow, so I'm guessing its a problem with WiiFlow recognising the WBFS partition with the larger block size, because the drive worked fine before with the default block size :-(
Someone told me that GX can handle larger block size. Most loaders ignore the block size parameter and always load 512 bytes instead
frown.gif
 

sylver78

Well-Known Member
Member
Joined
Oct 16, 2006
Messages
110
Trophies
0
Website
Visit site
XP
258
Country
France
Wiimm said:
@sylver78 & other mac developer

Since today I have access to a mac and hope that i can make mac distribs by myself. But the mac is missing the development tools
frown.gif


Can anyone of you explain what and how to install a development tool set for mac?
drh said it : register on apple dev site (it's free), get xcode, install it (don't forget to enable 10.4 SDK) and the Mac will be ready to build wwt
wink.gif

BTW, when using my 10.4 makefile, building a ppc64 target is working great (but need someone to test it ...)
 

wishmasterf

Well-Known Member
Member
Joined
Apr 20, 2009
Messages
167
Trophies
0
Location
Austria
Website
Visit site
XP
92
Country
Australia
Wiimm said:
Someone told me that GX can handle larger block size. Most loaders ignore the block size parameter and always load 512 bytes instead
frown.gif

Would be great if you could help them to implement the support for other block size than 512 bytes. They are all OSS so helping should be easy for you ;-)
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,291
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,467
Country
Germany
wishmasterf said:
Wiimm said:
Someone told me that GX can handle larger block size. Most loaders ignore the block size parameter and always load 512 bytes instead
frown.gif

Would be great if you could help them to implement the support for other block size than 512 bytes. They are all OSS so helping should be easy for you ;-)
Here is my help: http://gbatemp.net/index.php?showtopic=185428
But is there a real need to support this? Are 500 possible games not much more than enough?
 

drh

Well-Known Member
Newcomer
Joined
Nov 14, 2009
Messages
76
Trophies
0
XP
81
Country
Wiimm said:
Are 500 possible games not much more than enough?
It is whilst the largest WD passport is still 1tb.

I could really do with a 1.5tb at the moment, but no-one makes one.
I don't want to go down the road of the larger form-factor drives or even non-usb powered drives, so come on WD the world is waiting.......
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,291
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,467
Country
Germany
giantpune said:
can you not set the block size parameter when you create the partition?
With wwt use --hss= to define the "Hd Sector Size" (default=512) and/or --wss to define the "Wbfs Sector Size" (default is calculated, standard=2M,4M,8M, ...). The --wss is only needed for recovery.
 

Skeeve

Well-Known Member
Newcomer
Joined
Jan 1, 2010
Messages
75
Trophies
0
XP
146
Country
Gambia, The
Wiimm said:
If using --DEST (or -D) instead of --dest (or -d) then the missing directories are created automatically. (this is valid for all tools)
Unfortunately not:
CODE/usr/local/bin/wit copy --wbfs su-opoona.iso --DEST '/Volumes/HOMEBREW/wbfs/%T [%I]/'
*****ÂÂwit: Wiimms ISO Tool v0.40a r799M mac - Dirk Clemens - 2010-04-11ÂÂ*****
* wit SCRUB 1/1 ISO:su-opoona.iso -> WBFS:/Volumes/WIIDISK/wbfs/Opoona [RPOPC8]/RPOPC8.wbfs
!! wit: ERROR #17 [CAN'T CREATE DIRECTORY] in CreatePath() @ lib-std.c#3034
!!ÂÂÂÂÂÂCan't create directory:
!!ÂÂÂÂÂÂ-> No such file or directory
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,291
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,467
Country
Germany
@Skeeve:
a bug?
try: --DEST '/Volumes/HOMEBREW/wbfs/%T [%I]' (without trailing slash)


EDIT:
There is a problem with absolute paths
frown.gif



EDIT 2: fixed in CreatePath()

Code:
--- lib-std.cÂÂ (revision 811)
+++ lib-std.cÂÂ (working copy)
@@ -3010,6 +3010,10 @@
ÂÂÂÂ char buf[PATH_MAX], *dest = buf;
ÂÂÂÂ StringCopyS(buf,sizeof(buf),fname);

+ÂÂÂÂ// skip root directory
+ÂÂÂÂwhile ( *dest == '/' )
+ÂÂÂÂÂÂ dest++;
+
ÂÂÂÂ for(;;)
ÂÂÂÂ {
ÂÂÂÂÂÂÂÂwhile ( *dest && *dest != '/' )
 

Skeeve

Well-Known Member
Newcomer
Joined
Jan 1, 2010
Messages
75
Trophies
0
XP
146
Country
Gambia, The
But I don't see it in the repository yet, do I?

Update: I think you should put the while inside the for. Compare the difference when feeding a (stupid but legal) path like '//Volumes//WIIDISK//wbfs/test/path/file'.

While outside:
Code:
mkdir //Volumes
mkdir //Volumes/
mkdir //Volumes//WIIDISK
mkdir //Volumes//WIIDISK/
mkdir //Volumes//WIIDISK//wbfs
mkdir //Volumes//WIIDISK//wbfs/test
mkdir //Volumes//WIIDISK//wbfs/test/path


While inside:
Code:
mkdir //Volumes
mkdir //Volumes//WIIDISK
mkdir //Volumes//WIIDISK//wbfs
mkdir //Volumes//WIIDISK//wbfs/test
mkdir //Volumes//WIIDISK//wbfs/test/path


So I suggest:
Code:
--- lib-std.cÂÂ (revision 811)
+++ lib-std.cÂÂ (working copy)
@@ -3010,6 +3010,10 @@
ÂÂÂÂ char buf[PATH_MAX], *dest = buf;
ÂÂÂÂ StringCopyS(buf,sizeof(buf),fname);

ÂÂÂÂ for(;;)
ÂÂÂÂ {
+ÂÂÂÂÂÂÂÂ// skip double slashes
+ÂÂÂÂÂÂÂÂwhile ( *dest == '/' )
+ÂÂÂÂÂÂÂÂÂÂ dest++;
+
ÂÂÂÂÂÂÂÂwhile ( *dest && *dest != '/' )
 

zon7

Active Member
Newcomer
Joined
Oct 1, 2005
Messages
38
Trophies
0
XP
96
Country
Hi Wiimms.
I've tried today the linux version to add it to WiiJManager, but have come to a problem. My partition is not recognized on Ubuntu 9.10.
The disk has 2 partitions, one FAT and the other is WBFS formatted. Right now I have it recognized on windows and osx, but linux fail to recognize it. Any help?

BTW: I'll love to have a parameter in wit, when doing --recurse, to limit the tree exploration, in case the user choose /windows or something like this. It'll be useful to can limit it to for example 2-3 levels.
Thanks
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,291
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,467
Country
Germany
Skeeve said:
But I don't see it in the repository yet, do I?
No. It's only in my private branch because developing extracting of files from ISO. And this is on work and not testet yet. A commit into the main trunk will come today or tomorrow.

And yes: I will move the while loop into the for loop. Thanx.


zon7 said:
Hi Wiimms.
I've tried today the linux version to add it to WiiJManager, but have come to a problem. My partition is not recognized on Ubuntu 9.10.
The disk has 2 partitions, one FAT and the other is WBFS formatted. Right now I have it recognized on windows and osx, but linux fail to recognize it. Any help?
What is the output of: wwt find -l

QUOTE(zon7 @ Apr 16 2010, 09:06 AM)
BTW: I'll love to have a parameter in wit, when doing --recurse, to limit the tree exploration, in case the user choose /windows or something like this. It'll be useful to can limit it to for example 2-3 levels.
Thanks
I think about that request. A internal max_depth param already exists and set to 15 on --recurse and to 1 for others. So it should be easy to implement.
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,291
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,467
Country
Germany
wwt: Wiimms WBFS Tool v0.41a - 2010-04-16
A command line WBFS tool set for various os.

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

Download of the current stable version:Download of the previous stable version:
There is also a GUI available:
Highlights/bug fixes of this release:
  • The command "wit DUMP" is able to dump a file list. The list is controlled by the new option --files=.
    .
  • The new command "wit ILIST" (or short "wit IL") will list all files of all given ISO images. Output can be controlled by --long and --no-header. The new option --files= controlls which files are listed. The option --psel selects partitions.
    .
  • The new command "wit EXTRACT" (or short "wit X") will extract all files of all given ISO images. Define a destination directory with --dest or --DEST. The new option --files= controlls which files are extracted. The option --psel selects partitions.
    .
  • The new wit option --files=list (-F list) define allow and deny rules for selecting files. The list is separatied by semicolons into items. Each item must be begin with as plus sign (allow) or a minus sign (deny) followed by a pattern. The patterns have rsync like style. For a detailed description see file "wit.txt" section "Selecting files with --files=rules".

    Examples:
    Code:
    # list all files of all ISO in current directory
    wit il .
    
    # list all *.wad files of all ISO in current directory
    wit il . -F+.wad
    
    # list all IOS*.wad files of all ISO in current directory
    # don't print headers
    # (escape param to permit shell to interprete '*')
    wit il . -H '-F+IOS*.wad'
    .
Last changes:
Code:
wwt v0.40a r790 - 2010-03-31

ÂÂ- Cache handling (pipe support) improved. Discs with update partitons are
ÂÂÂÂproblematic (some discs needs a 256 MiB cache). Try --psel=game to ignore
ÂÂÂÂupdate partitions. The CYGWIN version has real problems with pipes.
ÂÂ- Bug fix: Option "--ciso" was not recognized.
ÂÂ- New test script: scripts/test-wwt+wit.sh
ÂÂÂÂ- test "wwt INIT" with different HD sector sizes
ÂÂÂÂ- test "wwt ADD" with ISO, CISO, WDF, WBFS
ÂÂÂÂ- test "wwt EXTRACT" to ISO, CISO, WDF, WBFS
ÂÂÂÂ- test "wit COPY" (convert) to ISO, CISO, WDF, WBFS

wwt v0.41a r824 - 2010-04-16

ÂÂ- New escape sequence for output file names:
ÂÂÂÂ%Y = Extended filename: A short cut for '%T [%I]' (no file extension)
ÂÂ- New command: wit ILIST: List all files from ISO images.
ÂÂ- New command: wit EXTRACT: Extract all files from ISO images.
ÂÂÂÂThis is a first implementation or better a proof of concept.
ÂÂ- New option: --files=rules: Define a rule list as selector for ISO
ÂÂÂÂfile operations. A semicolon separate single items. Each item must begin
ÂÂÂÂwith '+' (allow) or '-' (deny). Multiple usage of the option is allowed.
ÂÂÂÂThis options is used by the commands DUMP, ILIST and EXTRACT. See file
ÂÂÂÂ"wit.txt" section "Selecting files with --files=rules" for more details.
ÂÂ- Bug fix: Creating directories (--DEST) with absoulte paths will now work.
ÂÂ- New wit option: --rdepth: Set the maximum recurse depth for option
ÂÂÂÂ--recurse in the range 0..100. The default depth is 10.
ÂÂ- New param for wwt+wit LIST --section: used_blocks= (1 block = 32 KiB)

Sources comes with GPL2. Checkout the sources directly from the SVN repository or browse the source.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
    A @ abraarukuk: :rofl2: