Hacking wwt+wit: Wiimms WBFS+ISO Tools

mousex

Well-Known Member
Member
Joined
Jan 23, 2009
Messages
986
Trophies
0
XP
115
Country
United States
It's amazing how much work you do to make changes to your code which bring you no benefits, you try to make it compatible with Darwin, with cygwin and it still works on linux, that's great
smile.gif

EDIT:
You have to find references to "-lcrypt". The -lcrypt flag is not supported in Mac OS X. These functions are builtin to the OS and found in unistd.
-lcrypto works
tongue.gif

Looks as its not as easy as one may think to write a multi-platform tool.
Code:
Index: Makefile
===================================================================
--- MakefileÂÂÂÂ(revision 291)
+++ MakefileÂÂÂÂ(working copy)
@@ -84,7 +84,7 @@
#-------------------------------------------------------------------------------

VPATHÂÂÂÂÂÂÂÂ+= libwbfs
-LIBSÂÂÂÂÂÂÂÂ= -lcrypt
+LIBSÂÂÂÂÂÂÂÂ= -lcrypto

DEFINESÂÂÂÂÂÂÂÂ=ÂÂ-DLARGE_FILES -D_FILE_OFFSET_BITS=64
DEFINESÂÂÂÂÂÂÂÂ+= -DWWTÂÂÂÂÂÂÂÂ# enable WWT specific modifications in libwbfs
@@ -104,7 +104,7 @@

DEPFLAGSÂÂÂÂ= -MMD

-LDFLAGSÂÂÂÂÂÂÂÂ= -static-libgcc -Xlinker --strip-all
+LDFLAGSÂÂÂÂÂÂÂÂ= -static-libgcc -Xlinker
#LDFLAGSÂÂÂÂ+= -static
LDFLAGSÂÂÂÂÂÂÂÂ:= $(strip $(LDFLAGS))

@@ -147,6 +147,7 @@
$(ALL_STD_TOOLS): %: %.o $(STD_O) Makefile
ÂÂÂÂ@echo "***ÂÂÂÂtool $@ $(MODE)"
ÂÂÂÂ@$(CC) $(CFLAGS) $(DEFINES) $(LDFLAGS) [email protected] $(STD_O) -o $@
+ÂÂÂÂ@$(STRIP) $@
ÂÂÂÂ@mkdir -p bin/debug
ÂÂÂÂ@cp -p $@ bin
ÂÂÂÂ@if test -s $(MODE_FILE) && grep -Fq -e -DDEBUG $(MODE_FILE); then cp -p $@ bin/debug; fi
@@ -157,6 +158,7 @@
$(ALL_WBFS_TOOLS): %: %.o $(ALL_O) Makefile
ÂÂÂÂ@echo "***ÂÂÂÂtool $@ $(MODE)"
ÂÂÂÂ@$(CC) $(CFLAGS) $(DEFINES) $(LDFLAGS) [email protected] $(ALL_O) $(LIBS) -o $@
+ÂÂÂÂ@$(STRIP) $@
ÂÂÂÂ@mkdir -p bin/debug
ÂÂÂÂ@cp -p $@ bin
ÂÂÂÂ@if test -s $(MODE_FILE) && grep -Fq -e -DDEBUG $(MODE_FILE); then cp -p $@ bin/debug; fi
Now the question is, is there a strip code that works on cygwin and OS X? Maybe cygwin users just have to install a specific packet?
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
wwt: Wiimms WBFS Tool v0.08a - 2009-10-23
A command line WBFS tool set for various os.

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

I have tested this tool very well and the software do what I want but I can't give any warranty. I have made different import and export (ISO and WDF) tests with more than 50 games and the resulting ISO images are absolute identical as the source files.

wwt is now Beta and I'm using it as replacement for the tool 'wbfs'.


Download:Last changes:
Code:
wwt v0.08a r294 - 2009-10-23

- iso2wdf + wdf2iso: new options: --dest dir_or_file, --overwrite
- The documentation is now divided into more files: Each tool has its own one.
- Some minor bug fixes in libwbfs.
- Option --remove: short option is now -R.
- New options: --exclude and --exclude-path: exclude discs from operation.
- New command: EXCLUDE: print the results of --exclude and --exclude-path.
- New tool: wit = Wiimms ISO Tool. (empty framework yet)
- Scan environment variables 'WWT_OPT' and 'WIT_OPT' for predefined options.
- CYGWIN bug fix: WDF support failed because of non packed data structure.
- CYGWIN: I have done a little test serie without failures.
- Allow the wbfs subsystem to read behind end of file marker (print a warning).

Sources comes with GPL2. Checkout the sources directly from the SVN repository or browse the source with any browser.

The new feature --exclude-path is very nice.
Example:
You want to make a backup from all new discs of 2 USB drives. The new backups should be stored info the sub directory 'new-backup'. The existing backups are stored in 'old-backup'. The file names of the old backups does not matter:
Code:
# wwt extract -aA --dest new-backup --exclude-path old-backup
 

W hat

Rhythm Heaven Fan
Member
Joined
Feb 28, 2007
Messages
632
Trophies
1
XP
697
Country
United States
What's the likelihood of this being implemented into something with a GUI? I just spent 1/2 hour getting a WDF of Wii Play. I did get it, but it took far too long to figure out.
smile.gif
Nothing against you.
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
W hat said:
What's the likelihood of this being implemented into something with a GUI? I just spent 1/2 hour getting a WDF of Wii Play. I did get it, but it took far too long to figure out.
smile.gif
Nothing against you.
Which System? cygwin seems to be very slow but the linux version is fast. 2-3 seconds for adding or extracting Wii Play on my linux NAS with VIA Esther processor 1200MHz

P.S.:
The same system with a no name USB device:
CODE - ADD [R3MP01,7571M] ./Metroid Prime Trilogy [R3MP01].wdf
ÂÂÂÂ 7564 MiB copied in 5:38, 22.3 MiB/sec
 

W hat

Rhythm Heaven Fan
Member
Joined
Feb 28, 2007
Messages
632
Trophies
1
XP
697
Country
United States
Sorry for not being clear. It took me 1/2 hour because I was reading through your documentation on the Cygwin version on how to use ISO2WDF. I don't mind it taking time when the program is running, it took me long to get to that point.
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
W hat said:
Sorry for not being clear. It took me 1/2 hour because I was reading through your documentation on the Cygwin version on how to use ISO2WDF. I don't mind it taking time when the program is running, it took me long to get to that point.
OK
smile.gif


ISO2WDF works only fine if the ISO is already scrubbed and the holes are field with zeros. This is true for discs extracted from an WBFS and for almost all wbfs managers.
 

Blue-K

No right of appeal.
Member
Joined
Jun 21, 2008
Messages
2,572
Trophies
0
Location
Helvetica
XP
209
Country
Swaziland
Two things:

-This copies all the Partitions of the game, right? Including Update, VC, etc...? I'm realy looking for this...
frown.gif

-What about a simple GUI-Wrapper, like here? I'm not realy in love with commands
tongue.gif
...would be realy, realy nice...
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
Blue-K said:
Two things:

-This copies all the Partitions of the game, right? Including Update, VC, etc...? I'm realy looking for this...
frown.gif
The current release copies only games partitions. But the next one will copy all partitions by default . The new option --psel may change this behavior. it's already implemented. Extract from the docu:

CODEThe option --psel defines the partition selector while copying games discs:

ÂÂSyntax: --psel partition_selector

'partition_selector' is one of the following keywords:

ÂÂÂÂGAMEÂÂÂÂÂÂ: use only the game partitionÂÂÂÂ( partition type = 0 )
ÂÂÂÂUPDATEÂÂÂÂ: use only the update partitionÂÂ( partition type = 1 )
ÂÂÂÂCHANNELÂÂ : use only the channel partition ( partition type = 2 )

ÂÂÂÂNO-GAMEÂÂÂÂ: use all partitions but not the Game partition.
ÂÂÂÂ NOGAMEÂÂÂÂ: alternative for 'NO-GAME'
ÂÂÂÂNO-UPDATEÂÂ: use all partitions but not the update partition.
ÂÂÂÂ NOUPDATEÂÂ: alternative for 'NO-UPDATE'
ÂÂÂÂNO-CHANNEL : use all partitions but not the channel partition.
ÂÂÂÂ NOCHANNEL : alternative for 'NO-CHANNEL'

ÂÂÂÂALLÂÂÂÂÂÂ : use all partitions (the default)
ÂÂÂÂ *ÂÂÂÂÂÂÂÂ: short cut for 'ALL'

ÂÂÂÂÂÂ : any decimal number to specify the partition type directly.

Abbreviations are allowed as long as they are unique.


QUOTE(Blue-K @ Oct 26 2009, 05:45 PM) -What about a simple GUI-Wrapper, like here? I'm not realy in love with commands
tongue.gif
...would be realy, realy nice...
Sorry, but I don't need a gui. But I will support everyone who will build a gui around.
 

mousex

Well-Known Member
Member
Joined
Jan 23, 2009
Messages
986
Trophies
0
XP
115
Country
United States
@Wiim: Do you know about the differences between your format and .wbfs and why they couldn't use your format in the conf. loader?
I asked a few days ago but was just ignored
tongue.gif

By the way the latest revisions compiled fine without issues on my Mac, maybe the issues with strip where caused by an outdated macports which I updated.

@Blue-K: I wrote a small Applescript which supports some basic commands like iso2wdf, wdf2iso and extract/import from/to WBFS drive, no listing yet as I just wanted to write something quick for drag'n'drop but I guess this doesn't help you much^^ Couldn't you write a small GUi in vbscript which just starts the tools. At least I read something about vbscript in the past and this should fit such a simple task.
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
mousex said:
@Wiim: Do you know about the differences between your format and .wbfs and why they couldn't use your format in the conf. loader?
I asked a few days ago but was just ignored
tongue.gif

By the way the latest revisions compiled fine without issues on my Mac, maybe the issues with strip where caused by an outdated macports which I updated.
I have not yet dealt with it. But I think libwbfs just needs the WBFS data structures. And read the wrapper function then decides where the data comes from (partition, file or splitted files):
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
wwt: Wiimms WBFS Tool v0.09a - 2009-10-27
A command line WBFS tool set for various os.

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

I have tested this tool very well and the software do what I want but I can't give any warranty. I have made different import and export (ISO and WDF) tests with more than 50 games and the resulting ISO images are absolute identical as the source files.

wwt is now Beta and I'm using it as replacement for the tool 'wbfs'.


Download:Last changes:
Code:
wwt v0.09a r310 - 2009-10-27

- Bug fix: progress counter was only shown for first job.
- Hidden option --hole-size removed.
- Option --sort: keyword scanning enabled.
- New option --psel: define a partition selector.
- New option --update for ADD+EXTRACT: copy only new files.
- New wwt command UPDATE: short cut for 'ADD --update'.
- wit commands: VERSION, HELP, ERROR, TITLES, EXCLUDE, FILELIST, FILETYPE,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ ID6, LIST, LIST-L, LIST-LL.
- Title files for: de en es fr it ja ko nl pt (loaded from WiiTDB.com).

Sources comes with GPL2. Checkout the sources directly from the SVN repository or browse the source with any browser.

The new feature --exclude-path is very nice.
Example:
You want to make a backup from all new discs of 2 USB drives. The new backups should be stored info the sub directory 'new-backup'. The existing backups are stored in 'old-backup'. The file names of the old backups does not matter:
Code:
# wwt extract -aA --dest new-backup --exclude-path old-backup
 

otti17

Member
Newcomer
Joined
Oct 28, 2009
Messages
8
Trophies
0
XP
32
Country
Gambia, The
verstehe ich dich richtich. mit diesem tool kann ich isos auf die grösse bringen, die sie aufm wbfs-drive beanspruchen. und ist es damit möglich diese dateien dann auf ner normalen FAT-Partition über den SD/USB CFGLoader laufen zu lassen (soll ja jetzt auch FAT unterstuetzen)?
 

otti17

Member
Newcomer
Joined
Oct 28, 2009
Messages
8
Trophies
0
XP
32
Country
Gambia, The
Wiimm said:
Blue-K said:
-What about a simple GUI-Wrapper, like here? I'm not realy in love with commands
tongue.gif
...would be realy, realy nice...
Sorry, but I don't need a gui. But I will support everyone who will build a gui around.

schade
frown.gif
, hab leider zu wenig ahnung and my english is not perfect to write here comments, who will understand from other members.
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
otti17 said:
verstehe ich dich richtich. mit diesem tool kann ich isos auf die grösse bringen, die sie aufm wbfs-drive beanspruchen. und ist es damit möglich diese dateien dann auf ner normalen FAT-Partition über den SD/USB CFGLoader laufen zu lassen (soll ja jetzt auch FAT unterstuetzen)?
Wird eine WDF über ADD/EXTARCT erzeugt, dann hat sie auch nur die Größe wie im WBFS. CFG-Loader nutzen aber (bisher?) WDF nicht.
 

otti17

Member
Newcomer
Joined
Oct 28, 2009
Messages
8
Trophies
0
XP
32
Country
Gambia, The
danke für die antwort. vllt passierts ja doch irgendwann mal mit der integration in cfg-loadern
smile.gif
respekt an deine arbeit und know how
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
wwt: Wiimms WBFS Tool v0.10a - 2009-10-31
A command line WBFS tool set for various os.

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

I have tested this tool very well and the software do what I want but I can't give any warranty. I have made different import and export (ISO and WDF) tests with more than 50 games and the resulting ISO images are absolute identical as the source files.

wwt is now Beta and I'm using it as replacement for the tool 'wbfs'.


Download:Last changes:
Code:
wwt v0.10a r325 - 2009-10-31

- wwt+wit DUMP: Output expanded.
- ADD --trunc: WBFS will be truncated/trimmed to minimal size after adding.
- New wwt command: TRUNCATE: truncate/trim a WBFS to minimal size.
- Size options: advanced arguments -> see section "Processing size options".
- All tools: EXPERIMENTAL support of splitted WBFS, WDF and ISO files:
ÂÂÂÂ- While generating a file use --split and --split-size to force splitting.
ÂÂÂÂ- While reading existing files splitted files are detected automatically.

Sources comes with GPL2. Checkout the sources directly from the SVN repository or browse the source with any browser.
 

Blue-K

No right of appeal.
Member
Joined
Jun 21, 2008
Messages
2,572
Trophies
0
Location
Helvetica
XP
209
Country
Swaziland
Ok, since this has now the ability to copy all the Partitions from the ISO, I realy need this. And I think I have an Idea to make it a bit simpler for me (and others) which are still a bit afraid of the terminal...Nautilus-Scripts! So you only have to right-klick the ISO, and select the skript, which will do the rest. I did some research, and found that one:
QUOTE said:
#!/bin/bash
gnome-terminal --window-with-profile=default -x abgx360 -af3 “$1?
The underlined part is the part that has to be changed with the commands of the WBFS Tool, I guess...can anybody help me here a bit? Would be realy nice if we could get this to work...
 

W hat

Rhythm Heaven Fan
Member
Joined
Feb 28, 2007
Messages
632
Trophies
1
XP
697
Country
United States
I am a total failure with the command line. I am trying to make a (windows) batch file to automate the process a little bit. Even with "The Google" I cannot do this.
frown.gif
Anybody know how to compose batch files? Should be pretty simple, don't know where I'm going wrong. If the batch file was set up right, it should allow you to just drag an ISO onto it and ISO2WDF just does its thing... right?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    BigOnYa @ BigOnYa: I played the intro to far cry 5, that is like some crazy Jim Jones cult shit. Still its petty...