RGBFix Documentation


Table of Contents




History

The history of RGBFix
Version Dated Release notes
1.0 1 Oct. 96 First release
1.01 3 Dec. 96 -t didn't Work. Fixed.
1.02 20 July 1997 RGBFix can now also truncate the ROM-images to a valid size.
1.02-Lmod-00 2 Sep. 2008 New options and bugfixes



Usage


    rgbfix [options] image[.gb[c]]

Options are preceded by a dash (-) and go as follows:

    tname   : Change title field of image
    p[hx]   : Pad image to valid size with optional value (default is 0xFF)
    v       : Validate header
    d       : Debug, don't change image
    r       : Truncate image to valid size
    mhx     : Change RAM size
    bhx     : Change MBC type
    c       : Change to Game Boy color compatibility mode (0x143 = 0x80)
    o       : Change to Game Boy color only mode (0x143 = 0xC0)
    q       : Execute quietly
    h       : Short help text

Note: RGBFix was previously released by me as a standalone program known as GBFix. I have chosen to release it in the ASMotor package instead from now on. Its usage has changed a bit from that of GBFix for the sake of consistence with the other ASMotor tools. Being part of RGBDS means RGBFix' distribution now follows the same rules as the rest of the ASMotor package. GBFix still follows its own rules.



Options

How to use the various options.


Titlefield

This option changes the titlefield of the image to the string you specify truncated to a maximum of 16 characters. No uppercase conversion is performed. If string is less than 16 characters it will be extended with spaces.

    rgbfix -tASMOTOR foobar.gb


Pad Image

Pad the image to a valid size. 32Kb, 64Kb, 128Kb, 256Kb and 512Kb. RGBFix intelligently decides which one to use. You can choose which byte value to pad the image with by appending it to the options. The default pad value is as 0xFF. The cartridge size byte in the image header is left unchanged. If you find this undesireable use the Validate Header option.

    rgbfix -p foobar.gb
    rgbfix -p5A foobar.gb


Truncate Image

Truncates the image to a valid size. 32Kb, 64Kb, 128Kb, 256Kb and 512Kb. RGBFix intelligently decides which one to use. The cartridge size byte in the image header is left unchanged. If you find this undesireable use the Validate Header option.

    rgbfix -r foobar.gb


Validate Header

Examines the header for errors and validates them if any.

Areas examined:


    rgbfix -v foobar.gb


Change RAM size

Changes the byte at offset 0x149 of the image.

    rgbfix -m01 foobar.gb


Change MBC type

Changes the byte at offset 0x147 of the image.

    rgbfix -b19 foobar.gb


Change image to Game Boy Color compatibility mode

Changes the byte at offset 0x143 of the image to 0x80.

    rgbfix -o foobar.gb


Change image to Game Boy Color only mode

Changes the byte at offset 0x143 of the image to 0xC0.

    rgbfix -c foobar.gb


Quiet mode

Suppresses all text except errors.

    rgbfix -tASMOTOR -p -v -q foobar.gb


Debug

Pretends it performs the desired changes.

    rgbfix -tASMOTOR -p -v -d foobar.gb


Last updated 18 July 1997 by Carsten Sorensen

Last updated 2 September 2008 by lai