Hacking wwt+wit: Wiimms WBFS+ISO Tools

Alopexau

Member
Newcomer
Joined
Jul 2, 2019
Messages
16
Trophies
0
Location
Earth
XP
154
Country
Australia
As well as WIT breaking the apploader in Rogue Leader previously mentioned, I seem to be unable to scrub Gamecube ISOs in WIT 3.02a. It works just fine in 3.01a but the last release gives me the following error on any GC game:

!! wit: ERROR #126 [FATAL ERROR] in wd_read_part() @ src/libwbfs/wiidisc.c#865
!! ASSERTION FAILED !!!
 
Last edited by Alopexau,
  • Like
Reactions: NNN1590

guitaristtom

New Member
Newbie
Joined
May 20, 2014
Messages
4
Trophies
0
Age
29
XP
130
Country
Canada
As well as WIT breaking the apploader in Rogue Leader previously mentioned, I seem to be unable to scrub Gamecube ISOs in WIT 3.02a. It works just fine in 3.01a but the last release gives me the following error on any GC game:

!! wit: ERROR #126 [FATAL ERROR] in wd_read_part() @ src/libwbfs/wiidisc.c#865
!! ASSERTION FAILED !!!
I'm getting that same issue...

I'm just trying to compress down a full 1:1 Gamecube ISO to a CISO file so it doesn't take up as much space on my Wii's hard drive.
 
Last edited by guitaristtom,
  • Like
Reactions: NNN1590

kimotori

Well-Known Member
Member
Joined
Nov 28, 2012
Messages
168
Trophies
0
Age
50
Location
Europa
XP
200
Country
Antarctica
@Wiimm i try this operation:

Wii Sports Resort (Europe) (En,Fr,De,Es,It) (v1.01).iso -- in wbfs --> Wii Sports Resort (Europe) (En,Fr,De,Es,It) (v1.01).wbfs....

wit COPY .. /iso/Wii Sports Resort (Europe) (En,Fr,De,Es,It) (v1.01).iso --wbfs --dest /wbfs --psel ALL --section --long --progress

GAMEID it is not present... too many empty spaces?


use Wiimms ISO Tool v3.01a r7464 x86_64 - Dirk Clemens - 2018-04-10
 
Last edited by kimotori,

teapot9

New Member
Newbie
Joined
Jul 5, 2020
Messages
1
Trophies
0
Location
Gensokyo
XP
56
Country
United States
wit fails to build with CFLAGS="-fno-common".
gcc-10 and above flipped a default from -fcommon to -fno-common, see gcc bug 85678.

This patch seems to fix the error:
Code:
diff --git a/dclib/dclib-basics.c b/dclib/dclib-basics.c
index 4a338e0..f1a6ada 100644
--- a/dclib/dclib-basics.c
+++ b/dclib/dclib-basics.c
@@ -4603,7 +4603,7 @@ enumError Command_TESTCOLORS ( int argc, char ** argv )
 //
 ///////////////////////////////////////////////////////////////////////////////
 
-u32 ColorTab_M0_M15[16] =
+extern u32 ColorTab_M0_M15[16] =
 {
     0x000000, 0x800000, 0x008000, 0x808000,
     0x000080, 0x800080, 0x008080, 0xc0c0c0,
diff --git a/dclib/dclib-color.h b/dclib/dclib-color.h
index 552cbb3..799af91 100644
--- a/dclib/dclib-color.h
+++ b/dclib/dclib-color.h
@@ -535,7 +535,7 @@ void PrintColorSetHelper
 ///////////////            color helpers            ///////////////
 ///////////////////////////////////////////////////////////////////////////////
 
-u32 ColorTab_M0_M15[16]; // first 16 colors of "\e[m"
+extern u32 ColorTab_M0_M15[16]; // first 16 colors of "\e[m"
 
 // return a m256 index
 u8 ConvertColorRGB3ToM256 ( u8 r, u8 g, u8 b );
 
  • Like
Reactions: Wiimm

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.03a - 2020-08-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.03a r8245 - 2020-08-03

 - Windows version only: Update to Cygwin DLL 3.0.7 / 2019-04-30.

 - wit COPY accpets patch options now.

 - Option --domain=DOMAIN: Bug fixed if DOMAIN contains exactly 16 characters.

 - Bug fix: Gamecube games are accessible again.

 - Bug fix for command wit CERT: Correct algorithm to verify signatures of
   type 'Elliptic Curve'.

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.
 

SuperrSonic

Well-Known Member
Member
Joined
Dec 9, 2011
Messages
807
Trophies
1
XP
2,296
Country
Puerto Rico
I'd like to share the solution I found for Another Code R crashing at the title screen. I wanted to add a few files to the game so that I could use a code to make the game read that file instead and keep the original files still present in the game. For instance. Converting iso to wbfs works, but extracting and then rebuilding is where it fails.

The rebuilt wbfs file seems to have no issues, I can extract files from it from Dolphin normally and the extracted files match the originals.
Yet it always crashes when booted in Dolphin or Wii, it goes as far as the title screen.

So I checked every file that gets loaded at boot and eventually found a file called MEMORY.dat, this file gets copied to memory at start, it contains a few text strings so it differs between languages. The file path depends on the system language set. (REVOLUTION/LANG/ENG/SCRIPT/)

Basically what I did was replace this file with the one from another language that works and the game didn't crash!
In order to keep those strings in the language I want, I had to expand the original file (by appending 00s to the end of the file.)
I still haven't finished the game like this so I can't guarantee this is the only problem area. And it unfortunately doesn't tell me anything about why wit is failing.

Unrelated, this game is single layer but it exceeds 3.99 GB so it has to be split for fat32 drives, but if you remove the unused video files(FlashBackSample.thp, output.thp) and lower the sample rate of at least one song (STRM_BGM_15 sucks) you can bring it to just under 3.98 GB
 
  • Like
Reactions: SaulFabre

XFlak

Wiitired but still kicking
Member
Joined
Sep 12, 2009
Messages
13,809
Trophies
3
Age
38
Location
Cyprus, originally from Toronto
Website
modmii.github.io
XP
9,800
Country
Cyprus
@Wiimm (or anyone else that may know the answer),
The following command works using an older version of wit.exe (wit: Wiimms ISO Tool v2.01a r3138 cygwin - Dirk Clemens - 2011-10-27).
Code:
wit x --neek --recurse "%ISOFOLDER%" --DEST "%DRIVE%"/games/%%I --progress

I'm now using the latest version (wit: Wiimms ISO Tool v3.03a r8245 cygwin - Dirk Clemens - 2020-08-03), and using the same command no longer works, and I get the following error

Code:
*****  wit: Wiimms ISO Tool v3.03a r8245 cygwin - Dirk Clemens - 2020-08-03  *****
!! wit: ERROR #108 [SYNTAX ERROR] in cmd_extract() @ src/wit.c#2830
!!      Syntax:
!!         wit EXTRACT source dest
!!         wit EXTRACT [[--source|--recurse] source]... [-d|-D] dest

I'm fairly certain I'm doing something wrong and there's nothing wrong with wit, but if someone can help me tweak the old command to accomplish the same thing using the latest wit I would greatly appreciate it!

Thanks!

Edit: I'm still curious but I got everything working with an older version anyway so will probably just leave it that way
 
Last edited by XFlak,
  • Like
Reactions: ca032769

Mutty99

New Member
Newbie
Joined
Mar 11, 2021
Messages
3
Trophies
0
Age
24
XP
91
Country
Italy
Hi, first post I'm ever doing on this site.

I'm currently trying to extract all files and folders from the Smash Bros Brawl PAL Iso file, with the WIT tool.
Every time I activate it through cmd, I type in this command line:

wit extract RSBP01.iso --dest=Smash/

Smash is a folder on my desktop with the iso inside. When I press enter though, I get:

ERROR #76: Can't open RSBP01.iso

Edit: [RESOLVED]
 
Last edited by Mutty99,

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.04a - 2021-04-18
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:

There are also some GUI available:

Change log:

Code:
wit v3.04a r8427 - 2021-04-18

 - Windows only: 32 bit and 64 bit versions of Cygwin are supported now.
   The 64 bit version is recommended.
    - 32 bit version: Cygwin DLL 3.0.7 / 2019-04-30
    - 64 bit version: Cygwin DLL 3.1.7 / 2020-08-22

 - wit CERT: Management of certificates improved.

 - Patching domains: Added special string replacements for different game
   variants of "Call of Duty" and "Band Hero".

 - Mac support improved. Universal binaries for x86_64 and arm64.

 - Patch option --wiimmfi supports the new patches required since March.

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.
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
@All
In the last few years I have only visited GBAtemp very seldom. That's why I only saw all the error messages today. I will go through these one by one over the next few days.

@Wiimm (or anyone else that may know the answer),
The following command works using an older version of wit.exe (wit: Wiimms ISO Tool v2.01a r3138 cygwin - Dirk Clemens - 2011-10-27).
Code:
wit x --neek --recurse "%ISOFOLDER%" --DEST "%DRIVE%"/games/%%I --progress
Curious. Anyway, I would change the quotes to "%DRIVE%/games/%%I" (don't know, what %%I is exactly).


EDIT:
If you have installed my SZS tools to, then you can test the param transfer if replacing "wit" by "wszst argtest". I plan to add the ARGTEST command to wit and wwt.
 
Last edited by Wiimm,

NoobletCheese

Well-Known Member
Member
Joined
Aug 12, 2018
Messages
533
Trophies
0
Age
25
XP
1,083
Country
United States
Just wanted to report that in version 2.00b the following command works, as per the documentation:
Code:
wit extract --source "C:\Games\Game.wbfs" --dest "C:\Games" --files +/sys/main.dol --overwrite --flat


However in the current version (3.04a) the same command produces a syntax error:
Code:
*****  wit: Wiimms ISO Tool v3.04a r8427 cygwin32 - Dirk Clemens - 2021-04-18  *****
!! wit: ERROR #108 [SYNTAX ERROR] in cmd_extract() @ src/wit.c#3037
!!      Syntax:
!!         wit EXTRACT source dest
!!         wit EXTRACT [[--source|--recurse] source]... [-d|-D] dest


To workaround it I must remove the --source and --dest options:
Code:
wit extract "C:\Games\Game.wbfs" "C:\Games" --files +/sys/main.dol --overwrite --flat


Running it on Windows 7 from command prompt.
 
Last edited by NoobletCheese,
  • Like
Reactions: XFlak

NoobletCheese

Well-Known Member
Member
Joined
Aug 12, 2018
Messages
533
Trophies
0
Age
25
XP
1,083
Country
United States
Also 3.04a's /bin/titles.txt doesn't have Mario Kart Wii in it (RMCE01) but the old version does.

edit: calling wit gettitles and wit titles >out.txt is still missing RMCE01.

edit2: oh we can just get it straight from gametdb.com/titles.txt (which contains RMCE01)
 
Last edited by NoobletCheese,
  • Like
Reactions: XFlak

XFlak

Wiitired but still kicking
Member
Joined
Sep 12, 2009
Messages
13,809
Trophies
3
Age
38
Location
Cyprus, originally from Toronto
Website
modmii.github.io
XP
9,800
Country
Cyprus
Just wanted to report that in version 2.00b the following command works, as per the documentation:
Code:
wit extract --source "C:\Games\Game.wbfs" --dest "C:\Games" --files +/sys/main.dol --overwrite --flat


However in the current version (3.04a) the same command produces a syntax error:
Code:
*****  wit: Wiimms ISO Tool v3.04a r8427 cygwin32 - Dirk Clemens - 2021-04-18  *****
!! wit: ERROR #108 [SYNTAX ERROR] in cmd_extract() @ src/wit.c#3037
!!      Syntax:
!!         wit EXTRACT source dest
!!         wit EXTRACT [[--source|--recurse] source]... [-d|-D] dest


To workaround it I must remove the --source and --dest options:
Code:
wit extract "C:\Games\Game.wbfs" "C:\Games" --files +/sys/main.dol --overwrite --flat


Running it on Windows 7 from command prompt.
Nice! I suspect this may also solve my issue from above, but I haven't been able to confirm yet
 
  • Like
Reactions: ca032769

1ROP

New Member
Newbie
Joined
Apr 27, 2021
Messages
3
Trophies
0
Age
32
XP
33
Country
United States
Can I use these tools for games other than Mario Kart? I downloaded and installed the Linux x64 wit and wstrt tools, and I can extract the main.dol for Paper Mario: TTYD using wit extract, but when I try to analyze it (wstrt analyze main.dol), I get this message: "unknown main.dol found." When I try to patch the .dol with a .gct file (wstrt patch main.dol --add-section G8ME01gct), I get this message: "main.dol not modified."

What am I doing wrong, or is what I'm trying to do not possible for Paper Mario TTYD?
 

1ROP

New Member
Newbie
Joined
Apr 27, 2021
Messages
3
Trophies
0
Age
32
XP
33
Country
United States
First off, WIT doesn't work very well for GC games, and second, for GC games, iirc it is called Start.dol, not main.dol.

Nope. If you extract a Gamecube .iso using Dolphin, you'll get a Start.dol, and the same thing will happen if you use GCRebuilder to extract it. If you use wit, however, it will produce a main.dol. I just did it now with a Paper Mario TTYD .iso to confirm that. Is that not how it's supposed to work? What are my options for patching the .dol file without using wit tools, if they don't work well with Gamecube games?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: But I bet that would be more for a flashcart than a consumer repro board.