1RGBFIX(1)                 BSD General Commands Manual                RGBFIX(1)
2

NAME

4     rgbfix — Game Boy checksum fixer
5

SYNOPSIS

7     rgbfix [-Ccjsv] [-i game_id] [-k licensee_str] [-l licensee_id]
8            [-m mbc_type] [-n rom_version] [-p pad_value] [-r ram_size]
9            [-t title_str] file
10

DESCRIPTION

12     The rgbfix program changes headers of Game Boy ROM images.  It also per‐
13     forms other filetype operations, such as truncation.  The arguments are
14     as follows:
15
16     -C      Set the Game Boy Color–only flag: 0x143 = 0xC0.  If both this and
17             the -c flag are set, this takes precedence.
18
19     -c      Set the Game Boy Color–compatible flag: 0x143 = 0x80.  If both
20             this and the -C flag are set, -C takes precedence.
21
22     -i game_id
23             Set the game ID string (0x13F0x142) to a given string of exactly
24             4 characters.  If both this and the title are set, the game ID
25             will overwrite the overlapping portion of the title.
26
27     -j      Set the non-Japanese region flag: 0x14A = 1.
28
29     -k licensee_str
30             Set the new licensee string (0x1440x145) to a given string,
31             truncated to at most two characters.
32
33     -l licensee_id
34             Set the old licensee code, 0x14B, to a given value from 0 to
35             0xFF.  This value is deprecated and should be set to 0x33 in all
36             new software.
37
38     -m mbc_type
39             Set the MBC type, 0x147, to a given value from 0 to 0xFF.
40
41     -n rom_version
42             Set the ROM version, 0x14C, to a given value from 0 to 0xFF.
43
44     -p pad_value
45             Pad the image to a valid size with a given pad value from 0 to
46             0xFF.  rgbfix will automatically pick a size from 32KiB, 64KiB,
47             128KiB, ..., 8192KiB and give a warning thereafter.  The car‐
48             tridge size byte (0x148) will be changed to reflect this new
49             size.
50
51     -r ram_size
52             Set the RAM size, 0x149, to a given value from 0 to 0xFF.
53
54     -s      Set the SGB flag: 0x146 = 3.
55
56     -t title
57             Set the title string (0x1340x143) to a given string, truncated
58             to at most 16 characters.  It is recommended to use 15 characters
59             instead, to avoid clashing with the CGB flag (-c or -C).  If both
60             this and the game ID are set, the game ID will overwrite the
61             overlapping portion of the title.
62
63     -v      Validate the header and fix checksums: the Nintendo character
64             area (0x1040x133), the header checksum (0x14D), and the global
65             checksum (0x14E0x14F).
66

EXAMPLES

68     Most values in the ROM header are only cosmetic.  The bare minimum
69     requirements for a workable image are checksums, the Nintendo logo, and
70     (if needed) the CGB/SGB flags.  It is a good idea to pad the image to a
71     valid size as well (“valid” meaning a multiple of 32KiB).
72
73     The following will make a plain, no-color Game Boy game without checking
74     for a valid size:
75
76           $ rgbfix -v foo.gb
77
78     The following will make a SGB-enabled, color-enabled game with a title of
79     “foobar”, and pad it to a multiple of 32KiB.  (The Game Boy itself does
80     not use the title, but some emulators or ROM managers might.)
81
82           $ rgbfix -vcs -l 0x33 -p 0 -t foobar baz.gb
83
84     The following will duplicate the header (sans global checksum) of the
85     game “Survival Kids”:
86
87           $ rgbfix -cjsv -k A4 -l 0x33 -m 0x1B -p 0xFF -r 3 -t
88           SURVIVALKIDAVKE SurvivalKids.gbc
89

SEE ALSO

91     rgbasm(1), rgblink(1), rgbds(7)
92

HISTORY

94     rgbfix was originally released by Carsten Sørensen as a standalone pro‐
95     gram called gbfix, and was later packaged in RGBDS by Justin Lloyd. It is
96     now maintained by a number of contributors at .:
97           https://github.com/rednex/rgbds
98
99RGBDS Manual                    April 17, 2017                    RGBDS Manual
Impressum