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

wit diff

DIFF compares ISO images in scrubbed or raw mode or on file level. Images, WBFS partitions and directories are accepted as source. DIFF works like COPY but comparing source and destination.

Contents

1.   Syntax

wit DIFF source dest
wit DIFF [[--source|--recurse] source]... [-d|-D] dest

2.   Options

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

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

-F --files ruleset Enter file mode (compare file by file) and append file select rules. This option can be used multiple times to extend the rule list. Rules beginning with a '+' or a '-' are allow or deny rules rules. Rules beginning with a ':' are macros for predefined rule sets.
-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.
-a --auto Search WBFS partitions using '/proc/partitions' or searching hard disks in '/dev/' and use all readable as source. This works like »wwt --auto --all«.
-s --source path Use the entered file or directory as source.

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.

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.
--ignore-fst Disable composing and ignore FST directories as input.
--ignore-setup While composing ignore the file 'setup.txt', which defines some partition parameters.
--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«.
--pmode p-mode This options set the prefix mode for listed or extracted files. One of the following values is allowed: AUTO, NONE, POINT, ID, NAME, INDEX, COMBI. The default value is 'AUTO'.
--flat While extracting a disc image strip all path names of the source file and store all files in the same directory. This option sets the default for --pmode to NONE.
--copy-gc If extracting a GameCube disc image, don't extract the real files to '/files/...'. Instead create a copy of the source image and store it as 'game.iso'. If the source image is already in this format, try to create a hard link and copy only if it fails.
--neek Abbreviation of »--psel data --pmode none --files :neek --copy-gc«. The old name --sneek is accepted too.
-q --quiet Be quiet and print only error messages and failure messages on mismatch. The comparison is aborted at the first mismatch for each source image. If set twice print nothing and report the diff result only as exit status and the complete comparison is aborted at the first mismatch at all.
-v --verbose The default is to print only differ messages. If set success messages and summaries are printed too. If set at least twice, a progress counter is printed too.
-P --progress Print progress counter independent of verbose level.
--scan-progress Print a message for each found image while scanning the file system.
--file-limit size This option is only used if comparing discs on file level. If not set or set to null, then all files will be compared. If set to a value greater than comparison is aborted for the current source image if the entered number of files differ. This option is ignored in quiet mode.
--limit num If not set, the comparison of the current file is aborted if a mismatch is found. If set, the comparison is aborted after 'limit' mismatches. To compare the whole file use the special value 0. This option is ignored in quiet mode.
-l --long If set, a status line with the offset is printed for each found mismatch. If set twice, an additional hex dump of the first bytes is printed. If set 3 or 4 times, the limit is set to 10 or unlimited if option --limit is not already set. This option is ignored in quiet mode.
--block-size size If a mismatch is found in raw or disc mode then the comparison is continued with the next block. This option sets the block size. The default value is 32K (Wii sector size). This option is ignored in quiet mode.
--sections Print in machine readable sections and parameter lines.
-L --logging This debug option enables the logging of internal memory maps. If set twice second level memory maps are printed too.
-d --dest path Define a destination path (directory or file). The destination path is scanned for escape sequences (see option --esc) to allow generic paths.
-D --DEST path Like --dest, but create the directory path automatically.
-E --esc char Define an alternative escape character for destination files. The default is '%'. For Windows (CYGWIN) it is a good choice to set '-E$' to avoid conflicts with command shell variables.
-W --wdf [=param] Set the image output file type to WDF (Wii Disc Format). The output format is either WDFv1 or WDFv2. It depends of the input file format and of the aligning. --wdf=param is a short cut for »--wdf --align-wdf=param«.
--wdf1 [=param] Set image output file type to WDF and force version 1. --wdf1=param is a short cut for »--wdf1 --align-wdf=param«.
--wdf2 [=param] Set image output file type to WDF and force version 2. --wdf2=param is a short cut for »--wdf2 --align-wdf=param«.
--align-wdf [align][,minhole] Parameter align defines the aligning factor for new WDF images. It must be a power of 2 and smaller or equal than 1 GiB. The default WDF alignment is 1 for WDF v1 and 4 for WDF v2. Usual values are 1, 512, 4K and 32K.

The optional parameter minhole defines the minimal hole size, before a new chunk is created. If NULL, an internal value is used to minimize the total file size. minhole can't be smaller than align.

-I --iso Set image output file type to PLAIN ISO.
-C --ciso Set image output file type to CISO (Compact ISO, same as WBI).
-B --wbfs Set image output file type to WBFS (Wii Backup File System, default).
--wia [=compr] Set image output file type to WIA (Wii ISO Archive). The optional parameter is a compression mode and --wia=mode is a shortcut for »--wia --compression mode«.
-G --gcz Set image output file type to GCZ (Dolphins GameCube Zip).
--gcz-zip If creating a GCZ image, a blockwise z-compression is tried. If the compressed data is larger than 98.5%, the uncompressed data is stored. Encrypted blocks are stored directly as uncompressed data, because the 98.5% test fails all the time.

Option --gcz-zip disables this optimization for encrypted data and makes the creation process slower.

--gcz-block size The value defines the block size, if creating a GCZ image. The default is 16K (also Dolphins default). Smaller values enlarge the managment data and reduce the compression ratio. Use the option with caution!
--fst Set image output mode to 'file system' (extracted ISO).

2.1   See also

»wit VERIFY«