RGBLINK(1) General Reference Manual RGBLINK(1)

NAME

rgblinkGame Boy linker

SYNOPSIS

rgblink [-t] [-l library] [-m mapfile] [-n symfile] [-o outfile] [-p pad_value] [-s symbol] file ...

DESCRIPTION

The rgblink program links objects created by rgbasm(1) into a single Game Boy ROM file.

By default, HOME sections created by the assembler are placed in the 16KiB bank 0, and CODE/DATA sections are placed in any bank except bank 0. If your ROM will only be 32KiB, you can use the -t option to override this.

The arguments are as follows:

-l library
Include a referenced library module created with rgblib(1). Note that specified libraries will be included only if needed—that is, if a SECTION from a library is referenced by an object file. Only the relevant SECTION will be included, rather than the entire module.
-m mapfile
Write a mapfile to the given filename.
-n symfile
Write a symbol file to the given filename.
-o outfile
Write ROM image to the given filename.
-p pad_value
When padding an image, pad with this value. The default is 0x00.
-s symbol
???
-t
Write a tiny (32KiB) ROM file. This forces all DATA/CODE sections to be of type HOME, and increases the HOME section size from 16KiB to 32KiB.

EXAMPLES

All you need for a basic ROM is an object file, which can be made into a ROM image like so:

$ rgblink -o bar.gb foo.o

The resulting bar.gb will not have correct checksums (unless you put them in the assembly source). You should use rgbfix(1) to fix these so that the program will actually run in a Game Boy:

$ rgbfix -v bar.gb

SEE ALSO

rgbds(7), rgbasm(1), rgbfix(1), rgblib(1), gbz80(7)

HISTORY

rgblink was originally written by Carsten Sørensen as part of the ASMotor package, and was later packaged in RGBDS by Justin Lloyd.
April 11, 2013 RGBDS Manual