prevnext   » WIT: Wiimms ISO Tools » wit: Wiimms ISO Tool » wit edit

wit edit

Edit an existing Wii and GameCube ISO image and patch some values. Images, WBFS partitions and directories are accepted as source.

Contents

1.   Syntax

wit EDIT source
wit EDIT [[--source|--recurse] source]...

2.   Options

Options
Option Param Description
-t --test Run in test mode, modify nothing.

>>> USE THIS OPTION IF UNSURE! <<<

-T --titles file Read file for disc titles. -T/ disables automatic search for title files.
--utf-8 Enables UTF-8 support for filenames (default).
--no-utf-8 Disables UTF-8 support for filenames.
--lang lang Define the language for titles.
-s --source path Use the entered file or directory as source.

If parameter PATH contains at least one wildcard (e.g. '*.wbfs'), then PATH is used as search pattern and all found files are added. In order to use this variant, the calling shell must not interpret the wildcards. Therefore, the parameter must usually be enclosed in single or double quotes.

Directories are expanded to all containing files but hidden files (file names begins with a point) are ignored. If a command needs only images then non image files of the directory are ignored without notification. The option --no-expand suppress the directory expansion.

--no-expand Do not expand directories to the containing files or images. This option does not change the behavior of --recurse.
-r --recurse path If path is not a directory, then it is used as a simple source file like --source.

If parameter PATH contains at least one wildcard (e.g. '*.wbfs'), then PATH is used as search pattern and all found files are added. In order to use this variant, the calling shell must not interpret the wildcards. Therefore, the parameter must usually be enclosed in single or double quotes.

Directories are scanned for source files recursively. The option --rdepth limits the search depth. Hidden files and hidden sub directories (file names begins with a point) and files with non supported file types (non ISO files for most commands) are ignored without notification.

--rdepth depth Set the maximum recurse depth for option --recurse. The default search depth is 10.
-x --exclude id A comma separated list with ID4 and ID6 values is expected. '.' is a wildcard for exact 1 character and '+' is a wildcard for any number characters. If the parameter begins with a '@' the given file is read and each line is scanned for one ID. Images with the given ID are excluded from operation. Each use of this option expands the exclude list. See --include-first for precedence issues.
-X --exclude-path file_or_dir Scan the ID of the source and add it to the exclude list. If the source is a directory then scan all images of the directory. Images with the given ID are excluded from operation. Each use of this option expands the exclude list. See --include-first for precedence issues.
-n --include id A comma separated list with ID values is expected. '.' is a wildcard for exact 1 character and '+' is a wildcard for any number characters. If the parameter begins with a '@' the given file is read and each line is scanned for one ID. Only images with the given ID are included into the operation. Each use of this option expands the include list. See --include-first for precedence issues.
-N --include-path file_or_dir Scan the ID of the source and add it to the include list. If the source is a directory then scan all images of the directory. Only images with the given ID are included into the operation. Each use of this option expands the include list. See --include-first for precedence issues.
--include-first The options --include, --include-path, --exclude and --exclude-path decide which discs are included into the operation. If neither include nor exclude options are used, than all disc are included into the operation. If only include options are used, than only the specified discs are operated. If only exclude options are used, than all all discs but not the excluded are operated.

If include and exclude options are used together and --include-first is not set, than all discs are operated that are specified by any include option and not by any exclude option. If --include-first is set, than all discs are ignored that are specified by any exclude option and not by any include option.

-1 --one-job Execute only the first job and exit. This is a shortcut for »--job-limit 1«.
--job-limit num Execute only the first 'num' jobs and exit. If done without errors the exit status is OK (zero).
-i --ignore Ignore non existing files/discs without warning. If set twice then all non Wii and GameCube ISO images are ignored too.
-q --quiet Be quiet and print only error messages.
-v --verbose Be verbose and print more progress information. Multiple usage is possible: Progress counter is enabled if set at least two times. Extended logging is enabled if set at least four times. The impact of the other verbose levels are command dependent.
--sections Print in machine readable sections and parameter lines.
-p --preserve Preserve file times (atime+mtime) while copying an image. This option is enabled by default if an unmodified disc image is copied.
--psel list This option set the scrubbing mode and defines, which disc partitions are handled. It expects a comma separated list of keywords, numbers and names; all together called parameter. All parameters are case insensitive and non ambiguous abbreviations of keywords are allowed.

Each parameter becomes a rule and each rule is appended to a rule list. Rules prefixed by a minus sign are DENY rules. Rules prefixed by a plus sign or without a prefix are ALLOW rules. Each partition is compared with each rule until a rule matches the partition. If a match it found, the partition is enabled for a ALLOW rule or disabled for a DENY rule.

The allowed keywords are: DATA, UPDATE, CHANNEL, PTAB0 .. PTAB3, ID, ALL, WHOLE and RAW. The following input formats are accepted too: ptype, #index, #<index, #<=index, #>index, #>=index and #tab_index.part_index.

--raw Abbreviation of »--psel RAW«.
--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'.
--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).
--http This patching option replaces 'https' request to 'http' in the files 'main.dol' and 'rel/StaticR.rel', if the files exist. It also replaces the sub-domain 'naswii' to 'nas'.
--domain domain This patching option replaces the domain 'nintendowifi.net' by the new domain. The length of the new domain must not be larger than the old length (16 characters).

If the new domain length is not larger than 11, then 'gamespy.com' of 'sake.gamespy.com' is replaced too. This is a special support for 'Super Smash Bros. Brawl'.

--security-fix Try to fix a security bug in the game. This is game dependent.
--wiimmfi Patch the images for Wiimmfi, the new custom server. It is a short cut for »--http --domain wiimmfi.de --security-fix«.
--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«.
--wdf1 [=param] If the image format is WDF, then force WDF version 1. The optional aligning factor is ignored.
--wdf2 [=param] If the image format is WDF, then force WDF version 2. The optional aligning factor is ignored.

3.   Description

The command EDIT patches ISO images in place. This is much faster than copying + patching.

The option --psel can remove partitions. The options --id, --name, --region, --ios and --common-key change importand values of the disc and of the data partition. The options --rm-files and --zero-files manipulate the filesystem of the data partition. The option --enc controls the encryption of all partitions. See »Patching and composing options« for details.

The command »wit COPY« can patch a image while copying.

3.1   See also

»wit COPY«   »wit CONVERT«

4.   Usual error/exit codes:

0 == OK      : all done without errors.
SYNTAX ERROR : at least one syntax error in command line found.
READ ERROR   : error while reading a file.
WRITE ERROR  : error while writing a file.