Hacking wwt+wit: Wiimms WBFS+ISO Tools

SuperrSonic

Well-Known Member
Member
Joined
Dec 9, 2011
Messages
807
Trophies
1
XP
2,323
Country
Puerto Rico
I extracted SSBB with wit extract, now I'm trying to build it again but it's only copying the game partition.

I used "wit copy (folder) --psel -update --split RSBE01.wbfs" also tried "--psel data,ptab1" to no avail.
 

SuperrSonic

Well-Known Member
Member
Joined
Dec 9, 2011
Messages
807
Trophies
1
XP
2,323
Country
Puerto Rico
For two reasons: remove the dummy files to save space, and to add a modified dol+brsar for dual audio. I've had this setup for a long time, I just want to fix the masterpieces.
 

shadow256

Well-Known Member
Member
Joined
Sep 30, 2017
Messages
188
Trophies
0
Age
38
XP
1,349
Country
France
Helo,

At first, I want to say a big thank you for this great set of very useful tools.

I'm trying to use Wit in a batch script but I have a problem with accents. For example:

Code:
@echo off
set gamepath=testé.iso
IF EXIST "%gamepath%" wit DUMP "%gamepath%"
pause

I've tried with the --no-utf-8 option, I have tried to change the active code page with "chcp 65001" and "chcp 1252" but same error:

Code:
!! wit: ERROR #74 [CAN'T OPEN FILE] in SetupReadSF() @ src/lib-sf.c#447
!!      Can't open file: "testé.iso"

I'm sure that the file exist and I'm also sure that the file haven't any problem because if I try to do the same thing with the same file but renamed to "test.iso", it works.

I'm runing it on a french Windows 7 X64.

Thanks for your help.

PS: This problem also appears when there are accents in a dirrectory into the path. I don't know if this problem is on the destination path because I've only test this with source path.
 
Last edited by shadow256,

shadow256

Well-Known Member
Member
Joined
Sep 30, 2017
Messages
188
Trophies
0
Age
38
XP
1,349
Country
France
I use the ANSI encoding file for my script but I've tried UTF-8 also to see if it's work and no, it doesn't.

If I do something like that:

Code:
@echo off
chcp 65001
set /p gamepath=Enter the path of your game:
IF EXIST "%gamepath%" wit DUMP "%gamepath%"
pause

If I enter "testé" in my keyboard into the path of the file, it doesn't work aloso, whatever is the encoding of the file or the chcp value. I've also tested to do this directly in the cmd:

Code:
chcp 65001
wit DUMP "testé.iso"
But the problem was the same, doesn't work.

I've made some other tests:
- Encoding the script to UTF-8: doesn't work.
- Exporting the variable to a text file in UTF-8 and call it it to replace wit source path: doesn't work.
- Try to change encoding of chcp: doesn't work.
- Try to mix encoding of the script and the chcp: doesn't work.
- Try to enter the unicode char for the "é" "é": doesn't work but the char could be converted to a real "é" if I set the chcp to 65001.
- Differents combinations of these tests: doesn't work.
I start to think that this is unsolvable. If you have something to suggest to me I'll listen because I have no more ideas for testing?

Edit: I found that in a cmd console, if I try:
Code:
wit DUMP "testé.iso"
it doesn't work but if I do that:
Code:
wit DUMP testé.iso
it work and I don't need to enable UTF-8 with chcp. Now it's not a solution because I use a script witch require user entries and without the ("), the script will not work properly. I continue to search...
 
Last edited by shadow256,

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 tested it by myself and can confirm the issues. I've found some similar Cygwin problems and description how to fix it. For the moment it simply don't work .

Workarounds for the moment:
- use linux
- rename the image
 

shadow256

Well-Known Member
Member
Joined
Sep 30, 2017
Messages
188
Trophies
0
Age
38
XP
1,349
Country
France
I have tested it by myself and can confirm the issues. I've found some similar Cygwin problems and description how to fix it. For the moment it simply don't work .

Workarounds for the moment:
- use linux
- rename the image
OK, thanks. That's what I have done in my script, I temporarily copy the image to a location without accents.
 

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 v3.01a - 2017-12-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 https://wit.wiimm.de/features.html for more details.

Download of the current version:

There are also some GUI available:

Change log:

Code:
wit v3.01a r7464 - 2017-12-03

 - New option: --dsync: The option enables the usage of flag O_DSYNC when
   opening a partition at a hard drive. With activated flag, writing an image
   is some percent slower, but the progress counters are exact again.

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

johnsanc

Well-Known Member
Newcomer
Joined
Sep 27, 2016
Messages
46
Trophies
0
Age
40
XP
812
Country
United States
Maybe I’m doing something wrong... but how do you get wit MIX to create an ISO with the data partition starting at 0xf80000?
When I use the mix function the memory maps show the data partition starts immediately after the update partition ends instead of having unused space between. I checked this by using wit DUMP on my mixed file with verbose logging.
 
Last edited by johnsanc,

ibizaman

New Member
Newbie
Joined
Dec 26, 2017
Messages
1
Trophies
0
Age
34
XP
51
Country
United States
Just wanted to share this two-liner that allows a two-way sync between a hard drive and a folder on my laptop:
sudo wwt LIST | head -n-3 | tail -n+4 | cut -d' ' -f1 | sudo xargs -n1 -I. wwt EXTRACT --auto --update .=/home/me/folder
sudo wwt ADD --recurse /home/me/folder --auto
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
Use a point "." as ID selector and your first command becomes easier:
sudo wwt EXTRACT --auto --update -i . -d /home/me/folder --test
Remove --test to disable test mode.
 

Ebola16

Member
Newcomer
Joined
Jun 1, 2017
Messages
9
Trophies
0
Age
30
XP
49
Country
United States
Hello,

I'm using an unedited WBFS of Super Smash Bros Brawl (NTSC-U, dumped from USB Loader GX, split at 4GB, game partition only). I want to generate an ISO. I tried two different methods:

Method 1
Code:
wit copy ssbb.wbfs ssbb.iso --raw
I get an ISO

Method 2
Code:
wit extract ssbb.wbfs ssbb --raw
then
Code:
wit copy ssbb ssbb.iso --raw
I get a non-identical ISO

I'm dealing with a temperamental code that works with Method 1's ISO but not Method 2's ISO. Shouldn't the ISOs be identical? If not, how do I get Method 2's ISO to match Method 1's ISO? Ideally I'd like use Method 2's extract to filesystem directory then copy to ISO in the future to make mass editing easier.

Thanks!
 
Last edited by Ebola16,

Ebola16

Member
Newcomer
Joined
Jun 1, 2017
Messages
9
Trophies
0
Age
30
XP
49
Country
United States
I can try a different method for ripping. I'll try Clean Rip. Let me know if there's a new preferred way to rip ISOs now. Otherwise I'll report back later.
 

Ebola16

Member
Newcomer
Joined
Jun 1, 2017
Messages
9
Trophies
0
Age
30
XP
49
Country
United States
There still appears to be a problem. I'm using wit-v3.00a-r7387-cygwin.

Whole ISO generated by CleanRip's MD5: 52ce7160ced2505ad5e397477d0ea4fe

ISO generated by Method 2
Code:
wit extract ssbb.iso ssbb --raw
then
Code:
wit copy ssbb new.iso --raw
Method 2's new.iso MD5: 18ab5fd6978f1b2f79c3dcf194b1ca06
New.iso only contains partitions 0 and 1. The extracted filesystem directory appears to contain more partitions. --raw, --psel all, and --psel whole all generate ISOs of the same size. I think ignoring the other partitions is a bug.

Shouldn't the ISOs be identical? If not, how do I get Method 2's ISO to match CleanRip? Ideally I'd like use Method 2's "extract to filesystem directory then copy to ISO" in the future to make mass editing easier.
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
  1. If you don't use the raw options, you get the same result. --raw is only important for binary copies.
  2. The composing part can only handle UPDATE, DATA and CHANNEL partitions. See https://wit.wiimm.de/info/composing.html#disc . So the extra partitions can't be handled. However a workaround is to use "wit MIX" and to tell wit about each partition. MIX was created for a special purpose years ago and I don't remember the details.
  3. I don't see any benefit to at the advertising channels to the game again.
  4. I don't see it not as bug, because I think supporting other partitions is useless.
 

GreyWolf

Well-Known Member
Member
Joined
Mar 2, 2015
Messages
5,399
Trophies
0
Age
54
XP
1,516
Country
United States
The only reason I kept the demo partition on mine is so the console doesn't crash if I accidentally click on the menu option for them. :P

WIT handles the SSBB partition table properly. It's WBM that screws it up.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: bc of shame