ISO Patcher

From Custom Mario Kart
Revision as of 22:45, 6 February 2021 by Cealgair (talk | contribs) (→‎Wiimms ISO Patcher: Grammar)
Jump to navigation Jump to search

ISO Patcher is a tool to change then content of ISO image (copy of a DVD). There are 2 different kinds of ISO patcher:

  • Sector or RAW Patcher
  • File Level Patcher

A Sector Patcher patches a disc on sector level without any knowledge of the content. It simply replaces bytes at predefined offsets. A File Level Patcher analyze the image directory structure and replace single files.

Wiimms ISO Patcher

Wiimm has written a generic Wii Image Patcher based on his Wiimms ISO Tools. It also uses Wiimms SZS Tools to patch single files of Mario Kart Wii. It was written for his Mario Kart distributions but can also used to patch any other game. The patcher works on file level in the following general steps:

  1. Extract all files of the original game image.
  2. Replace files (like Riivolution do it in real time).
  3. Call post processing scripts if available.
  4. Create a new image.

Wiimms ISO Patcher uses GNU-Tools and runs under Linux, Mac and Windows. For Windows some Cygwin tools are used.

The great advantage is that the user has a complete independent image and that the game can be loaded by any USB loader. The disadvantage is that the Wii must be hacked and the trucha bug (fake sign bug) must be enabled, or a cIOS must be installed.

How does the MKW patcher work?

The Mario Kart Wii Patcher uses different SZS tools to optimize the patching procedure:

  1. First it extract a copy of a original MKW DVD (=image). For time optimization some not needed files are not extracted.
  2. The patch file patch.tar is extracted. For space reduction the archive contains hard links for identical files. It replaces files in the image file structure and extract additionally files for post processing.
  3. The post processing is started:
    • All files in /Scene/UI with messages in it are patched. For the PAL version these are 50 files for 5 languages. The advantage is, that only the track names and some messages are replaced and the basic messages are not touched. The second advantage is, that this works for all 4 original MKW images.
    • The image files for the very first start screens are patched by some PNG files.
    • The title screens (profile selection) are patched by other PNG files.
    • To reduce the size from 2.8 to 1.4 GB some videos (trailer and more) are removed and replaced by hard links to a smaller video.
    • Some sound files are copied or swapped.
  4. The new image is created with hard link support for duplicate files to reduce the image size. While creating the new game title and the new IDs are set.

If creating a Riivolution template, the steps are nearly the same with 2 differences.

  • Step 1: Much less files are extracted.
  • Step 4: Instead of creating an images, only files needed for Riivolution are used. Files with identical content are only copied once. The XML file is generated with respect to identical files.

References