prevnext   » WIT: Wiimms ISO Tools » Guides » Patching and composing options

Patching and composing options

Contents

1.   Introduction

This page describes the options which modify content while composing or copying Wii ISO discs.

After changing a TICKET and/or TMD they are fake signed. To avoid unnecessary signing the old value and the new value are compared and only real changes forces a fake sign. If a TICKET is signed, the decrypted title key is stable and there is no need to encrypt the whole partition again. The TMD must be signed if the partition data is changed.

Use the following table as table of content of this page:

Options
Option Param Description
--modify list This patching option defines the impact of the options --name and --id. It expects a comma separated list of the following keywords (case ignored) as parameter: NONE, DISC, BOOT, TICKET, TMD, WBFS, TT, ALL and AUTO (default).

All keywords can be prefixed by '+' to enable that option, by a '-' to disable it or by a '=' to enable that option and disable all others.

--name name This patching option changes the name (disc title) of the disc to the given parameter. Up to 63 characters are expected. The disc header and boot.bin are objects to modify. The option --modify selects the objects.
--id id This patching option changes the ID of the disc to the given parameter. 1 to 6 characters are expected. Only defined characters not equal '.' are modified. The plus sign '+' is a wildcard for multiple '.' to fill the complete entered ID to 6 characters. The disc header, boot.bin, ticket.bin and tmd.bin are objects to modify. The option --modify selects the objects.
--disc-id id This patching option changes the ID of the disc header to the given parameter. 1 to 6 characters are expected. Only defined characters not equal '.' are modified. The plus sign '+' is a wildcard for multiple '.' to fill the complete entered ID to 6 characters. Option --disc-id overrides the definition of option --id.
--boot-id id This patching option changes the ID of boot.bin to the given parameter. 1 to 6 characters are expected. Only defined characters not equal '.' are modified. The plus sign '+' is a wildcard for multiple '.' to fill the complete entered ID to 6 characters. Option --boot-id overrides the definition of option --id.
--ticket-id id This patching option changes the ID of ticket.bin to the given parameter. 1 to 4 characters are expected. Only defined characters not equal '.' are modified. The plus sign '+' is a wildcard for multiple '.' to fill the complete entered ID to 4 characters. Option --ticket-id overrides the definition of option --id.
--tmd-id id This patching option changes the ID of tmd.bin to the given parameter. 1 to 4 characters are expected. Only defined characters not equal '.' are modified. The plus sign '+' is a wildcard for multiple '.' to fill the complete entered ID to 4 characters. Option --tmd-id overrides the definition of option --id.
--tt-id id This is a short cut for »--ticket id --tmd id«. If TICKET and TMD differ, the game will freeze after loading. So it makes only sense to change TICKET and TMD IDs together.
--wbfs-id id This patching option changes the ID of the WBFS header to the given parameter if adding a file to a WBFS or if creating a WBFS file. 1 to 6 characters are expected. The already patched disc ID of the source is used as base and only defined characters not equal '.' are modified. The plus sign '+' is a wildcard for multiple '.' to fill the complete entered ID to 6 characters. Option --wbfs-id overrides the definition of option --id.
--region region This patching option defines the region of the disc. The region is one of JAPAN, USA, EUROPE, KOREA, FILE or AUTO (default). The case of the keywords is ignored. Unsigned numbers are also accepted.
--common-key index This patching option defines the common key index as part of the TICKET. Keywords 0, STANDARD, 1 and KOREAN are accepted.
--ios ios This patching option defines the system version (IOS to load) within TMD. The format is 'HIGH:LOW' or 'HIGH-LOW' or 'LOW'. If only LOW is set than HIGH is assumed as 1 (standard IOS).
--rm-files ruleset This patching option defines filter rules to remove real files and directories from the FST of the DATA partition. Fake signing of the TMD is necessary. The processing order of file options is: »--rm-files --zero-files --ignore-files«.
--zero-files ruleset This patching option defines filter rules to zero (set size to zero) real files of the FST of the DATA partition. Fake signing of the TMD is necessary. The processing order of file options is: »--rm-files --zero-files --ignore-files«.
--ignore-files ruleset This option defines filter rules to ignore real files of the FST of the DATA partition. Fake signing is not necessary, but the partition becomes invalid, because the content of some files is not copied. If such file is accessed the Wii will halt immediately, because the verification of the checksum calculation fails. The processing order of file options is: »--rm-files --zero-files --ignore-files«.
--enc encoding Define the encoding mode. The mode is one of NONE, HASHONLY, DECRYPT, ENCRYPT, SIGN or AUTO. The case of the keywords is ignored. The default mode is 'AUTO'.

The option --psel is also a patching option, but has its own article: Scrubbing of Wii ISO images.

2.   Disc title and ID

Use options »--name new_title« and »--id new_id« to modify disc title and disc ID. Use option --modify to select the objects for modifiying.

The alternative options --disc-id, --boot-id, --ticket-id, --tmd-id, --tt-id and --wbfs-id allow too modify the specific ID in different ways.

2.1   --modify list

This patching option defines the impact of the options --name and --id. It expects a comma separated list of the following keywords (case ignored) as parameter: NONE, DISC, BOOT, TICKET, TMD, WBFS, TT, ALL and AUTO (default). All keywords can be prefixed by '+' to enable that option, by a '-' to disable it or by a '=' to enable that option and disable all others.
This options selects the patch objects for options --name and --id. A comma separated list of keywords is expected. All keywords are case insensitive and non ambiguous abbreviations are allowed. Each keyword can be prefixed by a plus ('+') to enable that opton, by a minus ('-') to disable it or by a equal sign ('=') to enable that option and disable all others.

Parameters of option --modify
Parameter Description
NONE Disable all patching objects. This is needed to disable all and then enable some, like: NONE,DISC,BOOT
DISC Allow to patch the ID6 and the NAME of the disc header (first 128 bytes of a Wii disc).
BOOT Allow to patch the ID6 and the NAME of the disc header of the system file boot.bin.
TICKET Allow to patch the ID4 of the TICKET (ticket.bin).
TMD Allow to patch the ID4 of the TMD (tmd.bin).
WBFS Allow to patch the ID6 and the NAME of the inode of a WBFS. This value is not used if composing a Wii discs.
ALL Enable all.
AUTO Let the command decide what to do. While composing it is equal to ALL. This is the default setting.
Example:
If you want to modify only TICKET and TMD you can use one of this: NONE,TICKET,TMD or =TICKET,TMD or =TICKET,+TMD or ALL,-WBFS,-BOOT,-DISC.

Command reference

»wit convert«,   »wit copy«,   »wit dump«,   »wit edit«,   »wit extract«,   »wit id6«,   »wit id8«,   »wwt add«,   »wwt extract«,   »wwt new«,   »wwt scrub«,   »wwt sync«,   »wwt update«.

2.2   --name name

This patching option changes the name (disc title) of the disc to the given parameter. Up to 63 characters are expected. The disc header and boot.bin are objects to modify. The option --modify selects the objects.
Change the disc title of the disc. Only the first 63 characters are used.

Patch objects are the disc header (header.bin) and boot.bin. The option --modify selects the objects to patch. The default is to patch both objects.

Command reference

»wit convert«,   »wit copy«,   »wit dump«,   »wit edit«,   »wit extract«,   »wit mix«,   »wwt add«,   »wwt extract«,   »wwt new«,   »wwt scrub«,   »wwt sync«,   »wwt update«.

2.3   --id id

This patching option changes the ID of the disc to the given parameter. 1 to 6 characters are expected. Only defined characters not equal '.' are modified. The plus sign '+' is a wildcard for multiple '.' to fill the complete entered ID to 6 characters. The disc header, boot.bin, ticket.bin and tmd.bin are objects to modify. The option --modify selects the objects.
Change the ID of the disc (header,boot,ticket,tmd and may be wbfs) to the entered parameter. 1 to 6 characters are expected. Only defined characters not equal '.' are modified.

Examples: --id=K will only change the first character to 'K' and --id=...P only the fourth character to 'P' (like PAL).

Patch objects are the disc header (header.bin), boot.bin, ticket.bin and tmd.bin. If creating a WBFS file or adding a disc to a WBFS partition, this ID is also used for the WBFS directory. The option --modify selects the objects to patch. The default is to patch all four objects.

Command reference

»wit convert«,   »wit copy«,   »wit create«,   »wit dump«,   »wit edit«,   »wit extract«,   »wit id6«,   »wit id8«,   »wit mix«,   »wwt add«,   »wwt extract«,   »wwt new«,   »wwt scrub«,   »wwt sync«,   »wwt update«.

2.4   --disc-id id

This patching option changes the ID of the disc header to the given parameter. 1 to 6 characters are expected. Only defined characters not equal '.' are modified. The plus sign '+' is a wildcard for multiple '.' to fill the complete entered ID to 6 characters. Option --disc-id overrides the definition of option --id.
This option changes the ID of the disc header to the entered parameter. 1 to 6 characters are expected. Only defined characters not equal '.' are modified. Option --id is executed first.

If changing one of the first 4 characters of the disc ID, some games loses its capability to play online.

Command reference

»wit convert«,   »wit copy«,   »wit dump«,   »wit edit«,   »wit extract«,   »wit id6«,   »wit id8«,   »wwt add«,   »wwt extract«,   »wwt new«,   »wwt scrub«,   »wwt sync«,   »wwt update«.

2.5   --boot-id id

This patching option changes the ID of boot.bin to the given parameter. 1 to 6 characters are expected. Only defined characters not equal '.' are modified. The plus sign '+' is a wildcard for multiple '.' to fill the complete entered ID to 6 characters. Option --boot-id overrides the definition of option --id.
This option changes the ID of the system file boot.bin of the main partition to the entered parameter. 1 to 6 characters are expected. Only defined characters not equal '.' are modified. The plus sign '+' is a wildcard for multiple '.' to fill the complete entered ID to 6 characters.

It seems, that there is not any imapact of the boot ID.

Option --boot-id overrides the definition of option --id.

Command reference

»wit convert«,   »wit copy«,   »wit dump«,   »wit edit«,   »wit extract«,   »wit id6«,   »wit id8«,   »wwt add«,   »wwt extract«,   »wwt new«,   »wwt scrub«,   »wwt sync«,   »wwt update«.

2.6   --ticket-id id

This patching option changes the ID of ticket.bin to the given parameter. 1 to 4 characters are expected. Only defined characters not equal '.' are modified. The plus sign '+' is a wildcard for multiple '.' to fill the complete entered ID to 4 characters. Option --ticket-id overrides the definition of option --id.
This option changes the ID of the TICKET of the main partition to the entered parameter. 1 to 4 characters are expected. Only defined characters not equal '.' are modified. The plus sign '+' is a wildcard for multiple '.' to fill the complete entered ID to 4 characters.

If TICKET and TMD have a different ID, a game will freeze after loading. The ID4 itself defines the filename of the internal save game file. If changing it, the game becomes a clone with a new save game ID.

Option --ticket-id overrides the definition of option --id.

Command reference

»wit convert«,   »wit copy«,   »wit dump«,   »wit edit«,   »wit extract«,   »wit id6«,   »wit id8«,   »wwt add«,   »wwt extract«,   »wwt new«,   »wwt scrub«,   »wwt sync«,   »wwt update«.

2.7   --tmd-id id

This patching option changes the ID of tmd.bin to the given parameter. 1 to 4 characters are expected. Only defined characters not equal '.' are modified. The plus sign '+' is a wildcard for multiple '.' to fill the complete entered ID to 4 characters. Option --tmd-id overrides the definition of option --id.
This option changes the ID of the TMD of the main partition to the entered parameter. 1 to 4 characters are expected. Only defined characters not equal '.' are modified. The plus sign '+' is a wildcard for multiple '.' to fill the complete entered ID to 4 characters.

If TICKET and TMD have a different ID, a game will freeze after loading. The ID4 itself defines the filename of the internal save game file. If changing it, the game becomes a clone with a new save game ID.

Option --tmd-id overrides the definition of option --id.

Command reference

»wit convert«,   »wit copy«,   »wit dump«,   »wit edit«,   »wit extract«,   »wit id6«,   »wit id8«,   »wwt add«,   »wwt extract«,   »wwt new«,   »wwt scrub«,   »wwt sync«,   »wwt update«.

2.8   --tt-id id

This is a short cut for »--ticket id --tmd id«. If TICKET and TMD differ, the game will freeze after loading. So it makes only sense to change TICKET and TMD IDs together.
Option --tt-id ID4 is a short cut for »--ticket ID4 --tmd ID4« and overrides the definition of option --id. If TICKET and TMD have a different ID, a game will freeze after loading. So it makes sense to allow a short cut to modify both ids together.

The ID4 itself defines the filename of the internal save game file. If changing it, the game becomes a clone with a new save game ID.

Command reference

»wit convert«,   »wit copy«,   »wit dump«,   »wit edit«,   »wit extract«,   »wit id6«,   »wit id8«,   »wwt add«,   »wwt extract«,   »wwt new«,   »wwt scrub«,   »wwt sync«,   »wwt update«.

2.9   --wbfs-id id

This patching option changes the ID of the WBFS header to the given parameter if adding a file to a WBFS or if creating a WBFS file. 1 to 6 characters are expected. The already patched disc ID of the source is used as base and only defined characters not equal '.' are modified. The plus sign '+' is a wildcard for multiple '.' to fill the complete entered ID to 6 characters. Option --wbfs-id overrides the definition of option --id.
This option is only relevant if creating a WBFS file or adding a disc to a WBFS partition. It changes the ID of the WBFS directory to the entered parameter. 1 to 6 characters are expected. Only defined characters not equal '.' are modified. The plus sign '+' is a wildcard for multiple '.' to fill the complete entered ID to 6 characters.

Option --wbfs-id overrides the definition of option --id.

Command reference

»wit convert«,   »wit copy«,   »wit dump«,   »wit edit«,   »wit extract«,   »wit id6«,   »wit id8«,   »wwt add«,   »wwt extract«,   »wwt new«,   »wwt scrub«,   »wwt sync«,   »wwt update«.

3.   Other settings

3.1   --region region

This patching option defines the region of the disc. The region is one of JAPAN, USA, EUROPE, KOREA, FILE or AUTO (default). The case of the keywords is ignored. Unsigned numbers are also accepted.
This option set the region mode for a disc. This region setting is independent from the disc ID (forth letter). GameCube discs stores the region code as 32 bit big endian integer at offset 0x458. Wii Disc use a data structure in the disc header at offset 0x4e000 with size 0x20. If the region setting of a Wii disc is modified, all bytes of the data structure are cleared (set to zero) and the first 4 bytes (32 bit big endian integer) are set to the new region code.

Parameters of option --region
Parameter Description
JAPAN Set the region code to 0 for Japan.
USA Set the region code to 1 for USA.
EUROPE Set the region code to 2 for Europe.
KOREA Set the region code to 4 for Korea.
FILE Try to read file ./disc/region.bin and use it as region setting. For non composing or if this fails, switch to AUTO mode.
AUTO Examine the fourth character of the new disc ID. If the region is mandatory, use it. If not, try to load ./disc/region.bin (see FILE). If this fails make a second unsure decision by using the fourth character of the new disc ID.

This is the default setting.

<number> Set the region code to the entered decimal number. The number can be prefixed by 0x to set a hexadecimal value.
All keywords are case insensitive and non ambiguous abbreviations are allowed.

Command reference

»wit convert«,   »wit copy«,   »wit dump«,   »wit edit«,   »wit extract«,   »wit mix«,   »wwt add«,   »wwt extract«,   »wwt new«,   »wwt scrub«,   »wwt sync«,   »wwt update«.

3.2   --common-key index

This patching option defines the common key index as part of the TICKET. Keywords 0, STANDARD, 1 and KOREAN are accepted.
Set the field common_key_index in the TICKET in all partitions (fake sign necessary). The option expects one of the keys STANDARD or KOREAN or a numeric value as parameter.

Command reference

»wit convert«,   »wit copy«,   »wit dump«,   »wit edit«,   »wit extract«,   »wwt add«,   »wwt extract«,   »wwt new«,   »wwt scrub«,   »wwt sync«,   »wwt update«.

3.3   --ios ios

This patching option defines the system version (IOS to load) within TMD. The format is 'HIGH:LOW' or 'HIGH-LOW' or 'LOW'. If only LOW is set than HIGH is assumed as 1 (standard IOS).
Set the field system_version in the TMD (fake sign necessary). The value is one of HIGH:LOW, HIGH-LOW or only LOW. Both numbers (HIGH and LOW) are unsigned 32 bit decimal numbers. The numbers can be prefixed by 0x to set a hexadecimal value. If HIGH is missing, a value of 1 (standard for IOS) is assumed.

It is standard to set a value between 1 and 255 to select a standard IOS. All other values are for experimental usage only.

Command reference

»wit convert«,   »wit copy«,   »wit create«,   »wit dump«,   »wit edit«,   »wit extract«,   »wwt add«,   »wwt extract«,   »wwt new«,   »wwt scrub«,   »wwt sync«,   »wwt update«.

4.   Select files

4.1   --rm-files ruleset

This patching option defines filter rules to remove real files and directories from the FST of the DATA partition. Fake signing of the TMD is necessary. The processing order of file options is: »--rm-files --zero-files --ignore-files«.
Each appearance defines pattern rules. ruleset is a list of rules described in »File Filters«.

Each real file and directory of the FST ('files/') of the first DATA partition, that matches the rule set, is removed. Only empty directories are removed. If at least one file or directory is removed, the TMD will be fake signed.

Command reference

»wit convert«,   »wit copy«,   »wit dump«,   »wit edit«,   »wit extract«,   »wwt add«,   »wwt extract«,   »wwt new«,   »wwt scrub«,   »wwt sync«,   »wwt update«.

4.2   --zero-files ruleset

This patching option defines filter rules to zero (set size to zero) real files of the FST of the DATA partition. Fake signing of the TMD is necessary. The processing order of file options is: »--rm-files --zero-files --ignore-files«.
Each appearance defines pattern rules. ruleset is a list of rules described in »File Filters«.

Each real file of the FST ('files/') of the first DATA partition, that matches the rule set, is zeroed, its offset and size is set to 0. If at least one file is zeroed, the TMD will be fake signed.

Command reference

»wit convert«,   »wit copy«,   »wit dump«,   »wit edit«,   »wit extract«,   »wwt add«,   »wwt extract«,   »wwt new«,   »wwt scrub«,   »wwt sync«,   »wwt update«.

4.3   --ignore-files ruleset

This option defines filter rules to ignore real files of the FST of the DATA partition. Fake signing is not necessary, but the partition becomes invalid, because the content of some files is not copied. If such file is accessed the Wii will halt immediately, because the verification of the checksum calculation fails. The processing order of file options is: »--rm-files --zero-files --ignore-files«.
Each appearance defines pattern rules. ruleset is a list of rules described in »File Filters«.

Option --ignore-files is not really a patching option, because nothing of the disc or partitions is changed. It works in the same way as the »wit MIX« qualifier ignore.

When copying in scrubbing mode the system checks which sectors are used by a file. Each system and real file of the FST ('sys/...' and 'files/...') of the first DATA partition, that matches the rule set, is ignored for this sector search.

This means that the partition becomes invalid, because the content of some files is not copied. If such file is accessed the Wii will halt immediately, because the verification of the checksum calculation fails.

The advantage is to reduce the size of the image without a need to fake sign the partition. When using »wit MIX ... ignore« to create tricky combinations of partitions it may help to reduce the size of the output image dramatically.

Command reference

»wit convert«,   »wit copy«,   »wit dump«,   »wit extract«,   »wit files«,   »wit files-l«,   »wit files-ll«,   »wit verify«,   »wwt add«,   »wwt new«,   »wwt sync«,   »wwt update«,   »wwt verify«.

4.4   Differences between remove, zeroing and ignoring files

If you remove a file, it was removed from the FST (file system) and the storage of the content is ignored for copying (like scrubbing). Because changing the FST fake signing is necessary. If you list the FST you don't see the removed files.

If you zero a file, it is still in the FST, but its size is set to 0 bytes. The storage of the content is ignored for copying (like scrubbing). Because changing the FST fake signing is necessary. If you list the FST you see the zeroed files.

If you ignore a file it is still in the FST, but the storage of the content is ignored for copying. If you list the FST you see the ignored files and they can be accessed, but the content of the files is invalid. It's tricky, but there is no need to fake sign.

All three variants can be mixed. Conclusion:

5.   etc...

5.1   --enc encoding

Define the encoding mode. The mode is one of NONE, HASHONLY, DECRYPT, ENCRYPT, SIGN or AUTO. The case of the keywords is ignored. The default mode is 'AUTO'.
This option set the level of hash calcualtion, encryption and signing:

Parameters of option --enc
Parameter Description
NONE Do not calculate hash value neither encrypt nor sign the disc. This make the operation fast, but the Image can't be run a Wii.

Listing commands and wit DUMP use this value in AUTO mode, because they have no interests in signing or hash values.

HASHONLY Calculate the hash values but do not encrypt nor sign the disc.
DECRYPT Decrypt the partitions. While composing this is the same as HASHONLY.
ENCRYPT Calculate hash value and encrypt the partitions.
SIGN Calculate hash value, encrypt and sign the partitions. This is the default AUTO mode for all copying commands.
AUTO Let the command the choice which method is the best. This is the default setting.
All keywords are case insensitive and non ambiguous abbreviations are allowed.

Command reference

»wit convert«,   »wit copy«,   »wit dump«,   »wit edit«,   »wit extract«,   »wwt add«,   »wwt extract«,   »wwt new«,   »wwt scrub«,   »wwt sync«,   »wwt update«.