mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Move documentation to this repository
Modified Makefile wwwman target to output files inside docs/. Modified .gitignore to allow *.html files. Update README. Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,5 +4,4 @@ rgbfix
|
||||
rgbgfx
|
||||
*.o
|
||||
*.exe
|
||||
*.html
|
||||
.checkpatch-camelcase.*
|
||||
|
||||
18
Makefile
18
Makefile
@@ -169,15 +169,15 @@ checkpatch:
|
||||
MANDOC := -Thtml -Ios=General -Oman=%N.%S.html -Ostyle=manual.css
|
||||
|
||||
wwwman:
|
||||
$Qmandoc ${MANDOC} src/rgbds.7 > rgbds.7.html
|
||||
$Qmandoc ${MANDOC} src/gbz80.7 > gbz80.7.html
|
||||
$Qmandoc ${MANDOC} src/rgbds.5 > rgbds.5.html
|
||||
$Qmandoc ${MANDOC} src/asm/rgbasm.1 > rgbasm.1.html
|
||||
$Qmandoc ${MANDOC} src/asm/rgbasm.5 > rgbasm.5.html
|
||||
$Qmandoc ${MANDOC} src/fix/rgbfix.1 > rgbfix.1.html
|
||||
$Qmandoc ${MANDOC} src/link/rgblink.1 > rgblink.1.html
|
||||
$Qmandoc ${MANDOC} src/link/rgblink.5 > rgblink.5.html
|
||||
$Qmandoc ${MANDOC} src/gfx/rgbgfx.1 > rgbgfx.1.html
|
||||
$Qmandoc ${MANDOC} src/rgbds.7 > docs/gbds.7.html
|
||||
$Qmandoc ${MANDOC} src/gbz80.7 > docs/gbz80.7.html
|
||||
$Qmandoc ${MANDOC} src/rgbds.5 > docs/rgbds.5.html
|
||||
$Qmandoc ${MANDOC} src/asm/rgbasm.1 > docs/rgbasm.1.html
|
||||
$Qmandoc ${MANDOC} src/asm/rgbasm.5 > docs/rgbasm.5.html
|
||||
$Qmandoc ${MANDOC} src/fix/rgbfix.1 > docs/rgbfix.1.html
|
||||
$Qmandoc ${MANDOC} src/link/rgblink.1 > docs/rgblink.1.html
|
||||
$Qmandoc ${MANDOC} src/link/rgblink.5 > docs/rgblink.5.html
|
||||
$Qmandoc ${MANDOC} src/gfx/rgbgfx.1 > docs/rgbgfx.1.html
|
||||
|
||||
# Targets for the project maintainer to easily create Windows exes.
|
||||
# This is not for Windows users!
|
||||
|
||||
@@ -12,12 +12,11 @@ for the Game Boy and Game Boy Color. It consists of:
|
||||
This is a fork of the original RGBDS which aims to make the programs more like
|
||||
other UNIX tools.
|
||||
|
||||
This toolchain is maintained on `GitHub <https://github.com/rednex/rgbds>`__, as
|
||||
well as its `documentation <https://github.com/rednex/rednex.github.io>`__.
|
||||
This toolchain is maintained on `GitHub <https://github.com/rednex/rgbds>`__.
|
||||
|
||||
The documentation of this toolchain can be viewed online
|
||||
`here <https://rednex.github.io/>`__, it is generated from the man pages found
|
||||
in this repository.
|
||||
`here <https://rednex.github.io/rgbds/>`__, it is generated from the man pages
|
||||
found in this repository.
|
||||
|
||||
1. Installing RGBDS
|
||||
-------------------
|
||||
|
||||
65
docs/gbds.7.html
Normal file
65
docs/gbds.7.html
Normal file
@@ -0,0 +1,65 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<style>
|
||||
table.head, table.foot { width: 100%; }
|
||||
td.head-rtitle, td.foot-os { text-align: right; }
|
||||
td.head-vol { text-align: center; }
|
||||
div.Pp { margin: 1ex 0ex; }
|
||||
</style>
|
||||
<link rel="stylesheet" href="manual.css" type="text/css" media="all"/>
|
||||
<title>RGBDS(7)</title>
|
||||
</head>
|
||||
<body>
|
||||
<table class="head">
|
||||
<tr>
|
||||
<td class="head-ltitle">RGBDS(7)</td>
|
||||
<td class="head-vol">Miscellaneous Information Manual</td>
|
||||
<td class="head-rtitle">RGBDS(7)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="manual-text">
|
||||
<h1 class="Sh" title="Sh" id="NAME"><a class="selflink" href="#NAME">NAME</a></h1>
|
||||
<b class="Nm" title="Nm">rgbds</b> — <span class="Nd" title="Nd">Rednex
|
||||
Game Boy Development System</span>
|
||||
<h1 class="Sh" title="Sh" id="EXAMPLES"><a class="selflink" href="#EXAMPLES">EXAMPLES</a></h1>
|
||||
To get a working ROM image from a single assembly source file:
|
||||
<div class="Pp"></div>
|
||||
<div class="D1">$ rgbasm -o bar.o foo.asm</div>
|
||||
<div class="D1">$ rgblink -o baz.gb bar.o</div>
|
||||
<div class="D1">$ rgbfix -v -p 0 baz.gb</div>
|
||||
<h1 class="Sh" title="Sh" id="SEE_ALSO"><a class="selflink" href="#SEE_ALSO">SEE
|
||||
ALSO</a></h1>
|
||||
<a class="Xr" title="Xr">rgbasm(1)</a>, <a class="Xr" title="Xr">rgbfix(1)</a>,
|
||||
<a class="Xr" title="Xr">rgblink(1)</a>,
|
||||
<a class="Xr" title="Xr">rgbds(5)</a>, <a class="Xr" title="Xr">gbz80(7)</a>
|
||||
<h1 class="Sh" title="Sh" id="HISTORY"><a class="selflink" href="#HISTORY">HISTORY</a></h1>
|
||||
<dl class="Bl-ohang">
|
||||
<dt class="It-ohang"></dt>
|
||||
<dd class="It-ohang">1997, Carsten Sørensen (AKA SurfSmurf) writes
|
||||
ASMotor as a general-purpose assembler/linker system for DOS/Win32.</dd>
|
||||
<dt class="It-ohang"></dt>
|
||||
<dd class="It-ohang">1999, Justin Lloyd (AKA Otaku no Zoku) adapts ASMotor to
|
||||
read and produce GBZ80 assembly/machine code, and releases this version as
|
||||
RGBDS.</dd>
|
||||
<dt class="It-ohang"></dt>
|
||||
<dd class="It-ohang">2009, Vegard Nossum adapts the code to be more UNIX-like
|
||||
and releases this version as rgbds-linux on GitHub.</dd>
|
||||
<dt class="It-ohang"></dt>
|
||||
<dd class="It-ohang">2010, Anthony J. Bentley forks that repository. The fork
|
||||
becomes the reference implementation of rgbds.</dd>
|
||||
<dt class="It-ohang"></dt>
|
||||
<dd class="It-ohang">2017, Bentley's repository is moved to a neutral name. It
|
||||
is now maintained by a number of contributors at
|
||||
<a class="Lk" title="Lk" href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>.</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<table class="foot">
|
||||
<tr>
|
||||
<td class="foot-date">April 17, 2017</td>
|
||||
<td class="foot-os">RGBDS Manual</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
1697
docs/gbz80.7.html
Normal file
1697
docs/gbz80.7.html
Normal file
File diff suppressed because it is too large
Load Diff
32
docs/index.html
Normal file
32
docs/index.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<title>General Information</title>
|
||||
<link rel="stylesheet" type="text/css" href="./style.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>RGBDS — Rednex Game Boy Development System</h1>
|
||||
<h2>Table of Contents</h2>
|
||||
<ul>
|
||||
<li><a href="rgbds.7.html">RGBDS general information</a>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="rgbasm.5.html">RGBASM language description</a>
|
||||
<li><a href="rgblink.5.html">RGBLINK linkerscript language description</a>
|
||||
<li><a href="gbz80.7.html">GBZ80 CPU instruction set description</a>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="rgbasm.1.html">RGBASM command-line usage</a>
|
||||
<li><a href="rgblink.1.html">RGBLINK command-line usage</a>
|
||||
<li><a href="rgbfix.1.html">RGBFIX command-line usage</a>
|
||||
<li><a href="rgbgfx.1.html">RGBGFX command-line usage</a>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="rgbds.5.html">RGBDS object file format</a>
|
||||
</ul>
|
||||
<h3 id="GitHub Repository">GitHub Repository:</h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>
|
||||
</ul>
|
||||
</body>
|
||||
146
docs/rgbasm.1.html
Normal file
146
docs/rgbasm.1.html
Normal file
@@ -0,0 +1,146 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<style>
|
||||
table.head, table.foot { width: 100%; }
|
||||
td.head-rtitle, td.foot-os { text-align: right; }
|
||||
td.head-vol { text-align: center; }
|
||||
div.Pp { margin: 1ex 0ex; }
|
||||
</style>
|
||||
<link rel="stylesheet" href="manual.css" type="text/css" media="all"/>
|
||||
<title>RGBASM(1)</title>
|
||||
</head>
|
||||
<body>
|
||||
<table class="head">
|
||||
<tr>
|
||||
<td class="head-ltitle">RGBASM(1)</td>
|
||||
<td class="head-vol">General Commands Manual</td>
|
||||
<td class="head-rtitle">RGBASM(1)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="manual-text">
|
||||
<h1 class="Sh" title="Sh" id="NAME"><a class="selflink" href="#NAME">NAME</a></h1>
|
||||
<b class="Nm" title="Nm">rgbasm</b> — <span class="Nd" title="Nd">Game
|
||||
Boy assembler</span>
|
||||
<h1 class="Sh" title="Sh" id="SYNOPSIS"><a class="selflink" href="#SYNOPSIS">SYNOPSIS</a></h1>
|
||||
<table class="Nm">
|
||||
<tr>
|
||||
<td><b class="Nm" title="Nm">rgbasm</b></td>
|
||||
<td>[<span class="Op"><b class="Fl" title="Fl">-EhVvw</b></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-b</b>
|
||||
<var class="Ar" title="Ar">chars</var></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-D</b>
|
||||
<var class="Ar" title="Ar">name</var>[<span class="Op">=<var class="Ar" title="Ar">value</var></span>]</span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-g</b>
|
||||
<var class="Ar" title="Ar">chars</var></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-i</b>
|
||||
<var class="Ar" title="Ar">path</var></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-M</b>
|
||||
<var class="Ar" title="Ar">dependfile</var></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-o</b>
|
||||
<var class="Ar" title="Ar">outfile</var></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-p</b>
|
||||
<var class="Ar" title="Ar">pad_value</var></span>]
|
||||
<var class="Ar" title="Ar">file</var></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="Sh" title="Sh" id="DESCRIPTION"><a class="selflink" href="#DESCRIPTION">DESCRIPTION</a></h1>
|
||||
The <b class="Nm" title="Nm">rgbasm</b> program creates an object file from an
|
||||
assembly source file. Its arguments are as follows:
|
||||
<dl class="Bl-tag">
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#b"><b class="Fl" title="Fl" id="b">-b</b></a>
|
||||
<var class="Ar" title="Ar">chars</var></dt>
|
||||
<dd class="It-tag">Change the two characters used for binary constants. The
|
||||
defaults are 01.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#D"><b class="Fl" title="Fl" id="D">-D</b></a>
|
||||
<var class="Ar" title="Ar">name</var>[<span class="Op">=<var class="Ar" title="Ar">value</var></span>]</dt>
|
||||
<dd class="It-tag">Add string symbol to the compiled source code. This is
|
||||
equivalent to <var class="Ar" title="Ar">name</var>
|
||||
<b class="Cm" title="Cm">EQUS</b>
|
||||
“<var class="Ar" title="Ar">value</var>” in code. If a value
|
||||
is not specified, a value of 1 is given.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#E"><b class="Fl" title="Fl" id="E">-E</b></a></dt>
|
||||
<dd class="It-tag">Export all labels, including unreferenced and local
|
||||
labels.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#g"><b class="Fl" title="Fl" id="g">-g</b></a>
|
||||
<var class="Ar" title="Ar">chars</var></dt>
|
||||
<dd class="It-tag">Change the four characters used for binary constants. The
|
||||
defaults are 0123.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#h"><b class="Fl" title="Fl" id="h">-h</b></a></dt>
|
||||
<dd class="It-tag">By default, <b class="Nm" title="Nm">rgbasm</b> inserts a
|
||||
‘nop’ instruction immediately after any ‘halt’
|
||||
instruction. The <b class="Fl" title="Fl">-h</b> option disables this
|
||||
behavior.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#i"><b class="Fl" title="Fl" id="i">-i</b></a>
|
||||
<var class="Ar" title="Ar">path</var></dt>
|
||||
<dd class="It-tag">Add an include path.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#M"><b class="Fl" title="Fl" id="M">-M</b></a>
|
||||
<var class="Ar" title="Ar">dependfile</var></dt>
|
||||
<dd class="It-tag">Print <a class="Xr" title="Xr">make(1)</a> dependencies to
|
||||
<var class="Ar" title="Ar">dependfile</var>.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#o"><b class="Fl" title="Fl" id="o">-o</b></a>
|
||||
<var class="Ar" title="Ar">outfile</var></dt>
|
||||
<dd class="It-tag">Write an object file to the given filename.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#p"><b class="Fl" title="Fl" id="p">-p</b></a>
|
||||
<var class="Ar" title="Ar">pad_value</var></dt>
|
||||
<dd class="It-tag">When padding an image, pad with this value. The default is
|
||||
0x00.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#V"><b class="Fl" title="Fl" id="V">-V</b></a></dt>
|
||||
<dd class="It-tag">Print the version of the program and exit.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#v"><b class="Fl" title="Fl" id="v">-v</b></a></dt>
|
||||
<dd class="It-tag">Be verbose.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#w"><b class="Fl" title="Fl" id="w">-w</b></a></dt>
|
||||
<dd class="It-tag">Disable warning output.</dd>
|
||||
</dl>
|
||||
<h1 class="Sh" title="Sh" id="EXAMPLES"><a class="selflink" href="#EXAMPLES">EXAMPLES</a></h1>
|
||||
Assembling a basic source file is simple:
|
||||
<div class="Pp"></div>
|
||||
<div class="D1">$ rgbasm -o bar.o foo.asm</div>
|
||||
<div class="Pp"></div>
|
||||
The resulting object file is not yet a usable ROM image — it must first
|
||||
be run through <a class="Xr" title="Xr">rgblink(1)</a> and
|
||||
<a class="Xr" title="Xr">rgbfix(1)</a>.
|
||||
<h1 class="Sh" title="Sh" id="SEE_ALSO"><a class="selflink" href="#SEE_ALSO">SEE
|
||||
ALSO</a></h1>
|
||||
<a class="Xr" title="Xr">rgbasm(5)</a>, <a class="Xr" title="Xr">rgbfix(1)</a>,
|
||||
<a class="Xr" title="Xr">rgblink(1)</a>,
|
||||
<a class="Xr" title="Xr">rgbds(5)</a>, <a class="Xr" title="Xr">rgbds(7)</a>,
|
||||
<a class="Xr" title="Xr">gbz80(7)</a>
|
||||
<h1 class="Sh" title="Sh" id="HISTORY"><a class="selflink" href="#HISTORY">HISTORY</a></h1>
|
||||
<b class="Nm" title="Nm">rgbasm</b> was originally written by Carsten
|
||||
Sørensen as part of the ASMotor package, and was later packaged in
|
||||
RGBDS by Justin Lloyd. It is now maintained by a number of contributors at
|
||||
<a class="Lk" title="Lk" href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>.</div>
|
||||
<table class="foot">
|
||||
<tr>
|
||||
<td class="foot-date">April 17, 2017</td>
|
||||
<td class="foot-os">RGBDS Manual</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
1459
docs/rgbasm.5.html
Normal file
1459
docs/rgbasm.5.html
Normal file
File diff suppressed because it is too large
Load Diff
306
docs/rgbds.5.html
Normal file
306
docs/rgbds.5.html
Normal file
@@ -0,0 +1,306 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<style>
|
||||
table.head, table.foot { width: 100%; }
|
||||
td.head-rtitle, td.foot-os { text-align: right; }
|
||||
td.head-vol { text-align: center; }
|
||||
div.Pp { margin: 1ex 0ex; }
|
||||
</style>
|
||||
<link rel="stylesheet" href="manual.css" type="text/css" media="all"/>
|
||||
<title>RGBDS(5)</title>
|
||||
</head>
|
||||
<body>
|
||||
<table class="head">
|
||||
<tr>
|
||||
<td class="head-ltitle">RGBDS(5)</td>
|
||||
<td class="head-vol">File Formats Manual</td>
|
||||
<td class="head-rtitle">RGBDS(5)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="manual-text">
|
||||
<h1 class="Sh" title="Sh" id="NAME"><a class="selflink" href="#NAME">NAME</a></h1>
|
||||
<b class="Nm" title="Nm">rgbds</b> — <span class="Nd" title="Nd">object
|
||||
file format documentation</span>
|
||||
<h1 class="Sh" title="Sh" id="DESCRIPTION"><a class="selflink" href="#DESCRIPTION">DESCRIPTION</a></h1>
|
||||
This is the description of the object files used by
|
||||
<a class="Xr" title="Xr">rgbasm(1)</a> and
|
||||
<a class="Xr" title="Xr">rgblink(1)</a>. Please, note that the specifications
|
||||
may change. This toolchain is in development and new features may require
|
||||
adding more information to the current format, or modifying some fields, which
|
||||
would break compatibility with older versions.
|
||||
<h1 class="Sh" title="Sh" id="FILE_STRUCTURE"><a class="selflink" href="#FILE_STRUCTURE">FILE
|
||||
STRUCTURE</a></h1>
|
||||
The following types are used:
|
||||
<div class="Pp"></div>
|
||||
<var class="Ar" title="Ar">LONG</var> is a 32‐bit integer stored in
|
||||
little‐endian format (Intel). <var class="Ar" title="Ar">BYTE</var> is
|
||||
an 8‐bit integer. <var class="Ar" title="Ar">STRING</var> is a
|
||||
0‐terminated string of <var class="Ar" title="Ar">BYTE</var>.
|
||||
<div class="Pp"></div>
|
||||
<div class="Bd" style="margin-left: 0.00ex;">
|
||||
<pre class="Li">
|
||||
; Header
|
||||
|
||||
BYTE ID[4] ; "RGB6"
|
||||
LONG NumberOfSymbols ; The number of symbols used in this file
|
||||
LONG NumberOfSections ; The number of sections used in this file
|
||||
|
||||
; Symbols
|
||||
|
||||
REPT NumberOfSymbols ; Number of symbols defined in this object file.
|
||||
|
||||
STRING Name ; The name of this symbol. Local symbols are stored
|
||||
; as "Scope.Symbol".
|
||||
|
||||
BYTE Type ; 0 = LOCAL symbol only used in this file.
|
||||
; 1 = IMPORT this symbol from elsewhere (unused).
|
||||
; 2 = EXPORT this symbol to other objects.
|
||||
|
||||
IF Type != 1 ; If symbol is defined in this object file.
|
||||
|
||||
STRING FileName ; File where the symbol is defined.
|
||||
|
||||
LONG LineNum ; Line number in the file where the symbol is defined.
|
||||
|
||||
LONG SectionID ; The section number (of this object file) in which
|
||||
; this symbol is defined.
|
||||
|
||||
LONG Value ; The symbols value. It's the offset into that
|
||||
; symbol's section.
|
||||
|
||||
ENDC
|
||||
|
||||
ENDR
|
||||
|
||||
; Sections
|
||||
|
||||
REPT NumberOfSections
|
||||
STRING Name ; Name of the section
|
||||
|
||||
LONG Size ; Size in bytes of this section
|
||||
|
||||
BYTE Type ; 0 = WRAM0
|
||||
; 1 = VRAM
|
||||
; 2 = ROMX
|
||||
; 3 = ROM0
|
||||
; 4 = HRAM
|
||||
; 5 = WRAMX
|
||||
; 6 = SRAM
|
||||
; 7 = OAM
|
||||
|
||||
LONG Org ; Address to fix this section at. -1 if the linker should
|
||||
; decide (floating address).
|
||||
|
||||
LONG Bank ; Bank to load this section into. -1 if the linker should
|
||||
; decide (floating bank). This field is only valid for ROMX,
|
||||
; VRAM, WRAMX and SRAM sections.
|
||||
|
||||
LONG Align ; Alignment of this section (expressed as number of low bits
|
||||
; to leave as 0). -1 if not defined.
|
||||
|
||||
IF (Type == ROMX) || (Type == ROM0) ; Sections that can contain data.
|
||||
|
||||
BYTE Data[Size] ; Raw data of the section.
|
||||
|
||||
LONG NumberOfPatches ; Number of patches to apply.
|
||||
|
||||
; These types of sections may have patches
|
||||
|
||||
REPT NumberOfPatches
|
||||
|
||||
STRING SourceFile ; Name of the source file (for printing error
|
||||
; messages).
|
||||
|
||||
LONG Line ; The line of the source file.
|
||||
|
||||
LONG Offset ; Offset into the section where patch should
|
||||
; be applied (in bytes).
|
||||
|
||||
BYTE Type ; 0 = BYTE patch.
|
||||
; 1 = little endian WORD patch.
|
||||
; 2 = little endian LONG patch.
|
||||
|
||||
LONG RPNSize ; Size of the buffer with the RPN.
|
||||
; expression.
|
||||
|
||||
BYTE RPN[RPNSize] ; RPN expression. Definition below.
|
||||
|
||||
ENDR
|
||||
|
||||
ENDC
|
||||
|
||||
ENDR
|
||||
</pre>
|
||||
</div>
|
||||
<h2 class="Ss" title="Ss" id="RPN_DATA"><a class="selflink" href="#RPN_DATA">RPN
|
||||
DATA</a></h2>
|
||||
Expressions in the object file are stored as RPN. This is an expression of the
|
||||
form “2 5 +”. This will first push the value “2”
|
||||
to the stack. Then “5”. The “+” operator pops two
|
||||
arguments from the stack, adds them, and then pushes the result on the stack,
|
||||
effectively replacing the two top arguments with their sum. In the RGB format,
|
||||
RPN expressions are stored as BYTEs with some bytes being special prefixes for
|
||||
integers and symbols.
|
||||
<table class="Bl-column" style="margin-left: 6.00ex;">
|
||||
<colgroup>
|
||||
<col style="width: 15.00ex;"/>
|
||||
<col style="min-width: 10.00ex;"/>
|
||||
</colgroup>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><b class="Sy" title="Sy">Value</b></td>
|
||||
<td class="It-column"><b class="Sy" title="Sy">Meaning</b></td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$00"><code class="Li" id="$00">$00</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#+_operator"><code class="Li" id="+_operator">+
|
||||
operator</code></a></td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$01"><code class="Li" id="$01">$01</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#-_operator"><code class="Li" id="-_operator">-
|
||||
operator</code></a></td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$02"><code class="Li" id="$02">$02</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#*_operator"><code class="Li" id="*_operator">*
|
||||
operator</code></a></td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$03"><code class="Li" id="$03">$03</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#/_operator"><code class="Li" id="/_operator">/
|
||||
operator</code></a></td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$04"><code class="Li" id="$04">$04</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#%_operator"><code class="Li" id="%_operator">%
|
||||
operator</code></a></td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$05"><code class="Li" id="$05">$05</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#unary_-"><code class="Li" id="unary_-">unary
|
||||
-</code></a></td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$10"><code class="Li" id="$10">$10</code></a></td>
|
||||
<td class="It-column">|
|
||||
<a class="selflink" href="#operator"><code class="Li" id="operator">operator</code></a></td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$11"><code class="Li" id="$11">$11</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#&_operator"><code class="Li" id="&_operator">&
|
||||
operator</code></a></td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$12"><code class="Li" id="$12">$12</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#^_operator"><code class="Li" id="^_operator">^
|
||||
operator</code></a></td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$13"><code class="Li" id="$13">$13</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#unary_~"><code class="Li" id="unary_~">unary
|
||||
~</code></a></td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$21"><code class="Li" id="$21">$21</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#&&_comparison"><code class="Li" id="&&_comparison">&&
|
||||
comparison</code></a></td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$22"><code class="Li" id="$22">$22</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#||_comparison"><code class="Li" id="||_comparison">||
|
||||
comparison</code></a></td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$23"><code class="Li" id="$23">$23</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#unary"><code class="Li" id="unary">unary</code></a>!</td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$30"><code class="Li" id="$30">$30</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#==_comparison"><code class="Li" id="==_comparison">==
|
||||
comparison</code></a></td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$31"><code class="Li" id="$31">$31</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#!=_comparison"><code class="Li" id="!=_comparison">!=
|
||||
comparison</code></a></td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$32"><code class="Li" id="$32">$32</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#>_comparison"><code class="Li" id=">_comparison">>
|
||||
comparison</code></a></td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$33"><code class="Li" id="$33">$33</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#<_comparison"><code class="Li" id="<_comparison"><
|
||||
comparison</code></a></td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$34"><code class="Li" id="$34">$34</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#>=_comparison"><code class="Li" id=">=_comparison">>=
|
||||
comparison</code></a></td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$35"><code class="Li" id="$35">$35</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#<=_comparison"><code class="Li" id="<=_comparison"><=
|
||||
comparison</code></a></td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$40"><code class="Li" id="$40">$40</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#<<_comparison"><code class="Li" id="<<_comparison"><<
|
||||
comparison</code></a></td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$41"><code class="Li" id="$41">$41</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#>>_comparison"><code class="Li" id=">>_comparison">>>
|
||||
comparison</code></a></td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$50"><code class="Li" id="$50">$50</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#BANK(symbol),"><code class="Li" id="BANK(symbol),">BANK(symbol),</code></a>
|
||||
a <var class="Ar" title="Ar">LONG</var> Symbol ID follows.</td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$51"><code class="Li" id="$51">$51</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#BANK(section_name),"><code class="Li" id="BANK(section_name),">BANK(section_name),</code></a>
|
||||
a null-terminated string follows.</td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$52"><code class="Li" id="$52">$52</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#Current_BANK()"><code class="Li" id="Current_BANK()">Current
|
||||
BANK()</code></a>.</td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$60"><code class="Li" id="$60">$60</code></a></td>
|
||||
<td class="It-column"><a class="selflink" href="#HRAMCheck."><code class="Li" id="HRAMCheck.">HRAMCheck.</code></a>
|
||||
Check if the value is in HRAM, AND it with 0xFF.</td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$80"><code class="Li" id="$80">$80</code></a></td>
|
||||
<td class="It-column"><var class="Ar" title="Ar">LONG</var> integer
|
||||
follows.</td>
|
||||
</tr>
|
||||
<tr class="It-column">
|
||||
<td class="It-column"><a class="selflink" href="#$81"><code class="Li" id="$81">$81</code></a></td>
|
||||
<td class="It-column"><var class="Ar" title="Ar">LONG</var> Symbol ID
|
||||
follows.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="Sh" title="Sh" id="SEE_ALSO"><a class="selflink" href="#SEE_ALSO">SEE
|
||||
ALSO</a></h1>
|
||||
<a class="Xr" title="Xr">rgbasm(1)</a>, <a class="Xr" title="Xr">rgblink(1)</a>,
|
||||
<a class="Xr" title="Xr">rgbds(7)</a>, <a class="Xr" title="Xr">gbz80(7)</a>
|
||||
<h1 class="Sh" title="Sh" id="HISTORY"><a class="selflink" href="#HISTORY">HISTORY</a></h1>
|
||||
<b class="Nm" title="Nm">rgbds</b> was originally written by Carsten
|
||||
Sørensen as part of the ASMotor package, and was later packaged in
|
||||
RGBDS by Justin Lloyd. It is now maintained by a number of contributors at
|
||||
<a class="Lk" title="Lk" href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>.</div>
|
||||
<table class="foot">
|
||||
<tr>
|
||||
<td class="foot-date">January 7, 2018</td>
|
||||
<td class="foot-os">RGBDS Manual</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
187
docs/rgbfix.1.html
Normal file
187
docs/rgbfix.1.html
Normal file
@@ -0,0 +1,187 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<style>
|
||||
table.head, table.foot { width: 100%; }
|
||||
td.head-rtitle, td.foot-os { text-align: right; }
|
||||
td.head-vol { text-align: center; }
|
||||
div.Pp { margin: 1ex 0ex; }
|
||||
</style>
|
||||
<link rel="stylesheet" href="manual.css" type="text/css" media="all"/>
|
||||
<title>RGBFIX(1)</title>
|
||||
</head>
|
||||
<body>
|
||||
<table class="head">
|
||||
<tr>
|
||||
<td class="head-ltitle">RGBFIX(1)</td>
|
||||
<td class="head-vol">General Commands Manual</td>
|
||||
<td class="head-rtitle">RGBFIX(1)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="manual-text">
|
||||
<h1 class="Sh" title="Sh" id="NAME"><a class="selflink" href="#NAME">NAME</a></h1>
|
||||
<b class="Nm" title="Nm">rgbfix</b> — <span class="Nd" title="Nd">Game
|
||||
Boy checksum fixer</span>
|
||||
<h1 class="Sh" title="Sh" id="SYNOPSIS"><a class="selflink" href="#SYNOPSIS">SYNOPSIS</a></h1>
|
||||
<table class="Nm">
|
||||
<tr>
|
||||
<td><b class="Nm" title="Nm">rgbfix</b></td>
|
||||
<td>[<span class="Op"><b class="Fl" title="Fl">-CcjsVv</b></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-i</b>
|
||||
<var class="Ar" title="Ar">game_id</var></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-k</b>
|
||||
<var class="Ar" title="Ar">licensee_str</var></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-l</b>
|
||||
<var class="Ar" title="Ar">licensee_id</var></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-m</b>
|
||||
<var class="Ar" title="Ar">mbc_type</var></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-n</b>
|
||||
<var class="Ar" title="Ar">rom_version</var></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-p</b>
|
||||
<var class="Ar" title="Ar">pad_value</var></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-r</b>
|
||||
<var class="Ar" title="Ar">ram_size</var></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-t</b>
|
||||
<var class="Ar" title="Ar">title_str</var></span>]
|
||||
<var class="Ar" title="Ar">file</var></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="Sh" title="Sh" id="DESCRIPTION"><a class="selflink" href="#DESCRIPTION">DESCRIPTION</a></h1>
|
||||
The <b class="Nm" title="Nm">rgbfix</b> program changes headers of Game Boy ROM
|
||||
images. It also performs other filetype operations, such as truncation. The
|
||||
arguments are as follows:
|
||||
<dl class="Bl-tag">
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#C"><b class="Fl" title="Fl" id="C">-C</b></a></dt>
|
||||
<dd class="It-tag">Set the Game Boy Color–only flag:
|
||||
<i class="Ad">0x143</i> = 0xC0. If both this and the
|
||||
<b class="Fl" title="Fl">-c</b> flag are set, this takes precedence.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#c"><b class="Fl" title="Fl" id="c">-c</b></a></dt>
|
||||
<dd class="It-tag">Set the Game Boy Color–compatible flag:
|
||||
<i class="Ad">0x143</i> = 0x80. If both this and the
|
||||
<b class="Fl" title="Fl">-C</b> flag are set,
|
||||
<b class="Fl" title="Fl">-C</b> takes precedence.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#i"><b class="Fl" title="Fl" id="i">-i</b></a>
|
||||
<var class="Ar" title="Ar">game_id</var></dt>
|
||||
<dd class="It-tag">Set the game ID string
|
||||
(<i class="Ad">0x13F</i>–<i class="Ad">0x142</i>) to a given string
|
||||
of exactly 4 characters. If both this and the title are set, the game ID
|
||||
will overwrite the overlapping portion of the title.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#j"><b class="Fl" title="Fl" id="j">-j</b></a></dt>
|
||||
<dd class="It-tag">Set the non-Japanese region flag: <i class="Ad">0x14A</i> =
|
||||
1.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#k"><b class="Fl" title="Fl" id="k">-k</b></a>
|
||||
<var class="Ar" title="Ar">licensee_str</var></dt>
|
||||
<dd class="It-tag">Set the new licensee string
|
||||
(<i class="Ad">0x144</i>–<i class="Ad">0x145</i>) to a given
|
||||
string, truncated to at most two characters.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#l"><b class="Fl" title="Fl" id="l">-l</b></a>
|
||||
<var class="Ar" title="Ar">licensee_id</var></dt>
|
||||
<dd class="It-tag">Set the old licensee code, <i class="Ad">0x14B</i>, to a
|
||||
given value from 0 to 0xFF. This value is deprecated and should be set to
|
||||
0x33 in all new software.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#m"><b class="Fl" title="Fl" id="m">-m</b></a>
|
||||
<var class="Ar" title="Ar">mbc_type</var></dt>
|
||||
<dd class="It-tag">Set the MBC type, <i class="Ad">0x147</i>, to a given value
|
||||
from 0 to 0xFF.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#n"><b class="Fl" title="Fl" id="n">-n</b></a>
|
||||
<var class="Ar" title="Ar">rom_version</var></dt>
|
||||
<dd class="It-tag">Set the ROM version, <i class="Ad">0x14C</i>, to a given
|
||||
value from 0 to 0xFF.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#p"><b class="Fl" title="Fl" id="p">-p</b></a>
|
||||
<var class="Ar" title="Ar">pad_value</var></dt>
|
||||
<dd class="It-tag">Pad the image to a valid size with a given pad value from 0
|
||||
to 0xFF. <b class="Nm" title="Nm">rgbfix</b> will automatically pick a
|
||||
size from 32KiB, 64KiB, 128KiB, ..., 8192KiB and give a warning
|
||||
thereafter. The cartridge size byte (<i class="Ad">0x148</i>) will be
|
||||
changed to reflect this new size.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#r"><b class="Fl" title="Fl" id="r">-r</b></a>
|
||||
<var class="Ar" title="Ar">ram_size</var></dt>
|
||||
<dd class="It-tag">Set the RAM size, <i class="Ad">0x149</i>, to a given value
|
||||
from 0 to 0xFF.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#s"><b class="Fl" title="Fl" id="s">-s</b></a></dt>
|
||||
<dd class="It-tag">Set the SGB flag: <i class="Ad">0x146</i> = 3.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#t"><b class="Fl" title="Fl" id="t">-t</b></a>
|
||||
<var class="Ar" title="Ar">title</var></dt>
|
||||
<dd class="It-tag">Set the title string
|
||||
(<i class="Ad">0x134</i>–<i class="Ad">0x143</i>) to a given
|
||||
string, truncated to at most 16 characters. It is recommended to use 15
|
||||
characters instead, to avoid clashing with the CGB flag
|
||||
(<b class="Fl" title="Fl">-c</b> or <b class="Fl" title="Fl">-C</b>). If
|
||||
both this and the game ID are set, the game ID will overwrite the
|
||||
overlapping portion of the title.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#V"><b class="Fl" title="Fl" id="V">-V</b></a></dt>
|
||||
<dd class="It-tag">Print the version of the program and exit.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#v"><b class="Fl" title="Fl" id="v">-v</b></a></dt>
|
||||
<dd class="It-tag">Validate the header and fix checksums: the Nintendo
|
||||
character area (<i class="Ad">0x104</i>–<i class="Ad">0x133</i>),
|
||||
the header checksum (<i class="Ad">0x14D</i>), and the global checksum
|
||||
(<i class="Ad">0x14E</i>–<i class="Ad">0x14F</i>).</dd>
|
||||
</dl>
|
||||
<h1 class="Sh" title="Sh" id="EXAMPLES"><a class="selflink" href="#EXAMPLES">EXAMPLES</a></h1>
|
||||
Most values in the ROM header are only cosmetic. The bare minimum requirements
|
||||
for a workable image are checksums, the Nintendo logo, and (if needed) the
|
||||
CGB/SGB flags. It is a good idea to pad the image to a valid size as well
|
||||
(“valid” meaning a multiple of 32KiB).
|
||||
<div class="Pp"></div>
|
||||
The following will make a plain, no-color Game Boy game without checking for a
|
||||
valid size:
|
||||
<div class="Pp"></div>
|
||||
<div class="D1">$ rgbfix -v foo.gb</div>
|
||||
<div class="Pp"></div>
|
||||
The following will make a SGB-enabled, color-enabled game with a title of
|
||||
“foobar”, and pad it to a multiple of 32KiB. (The Game Boy
|
||||
itself does not use the title, but some emulators or ROM managers might.)
|
||||
<div class="Pp"></div>
|
||||
<div class="D1">$ rgbfix -vcs -l 0x33 -p 0 -t foobar baz.gb</div>
|
||||
<div class="Pp"></div>
|
||||
The following will duplicate the header (sans global checksum) of the game
|
||||
“Survival Kids”:
|
||||
<div class="Pp"></div>
|
||||
<div class="D1">$ rgbfix -cjsv -k A4 -l 0x33 -m 0x1B -p 0xFF -r 3 -t
|
||||
SURVIVALKIDAVKE SurvivalKids.gbc</div>
|
||||
<h1 class="Sh" title="Sh" id="SEE_ALSO"><a class="selflink" href="#SEE_ALSO">SEE
|
||||
ALSO</a></h1>
|
||||
<a class="Xr" title="Xr">rgbasm(1)</a>, <a class="Xr" title="Xr">rgblink(1)</a>,
|
||||
<a class="Xr" title="Xr">rgbds(7)</a>
|
||||
<h1 class="Sh" title="Sh" id="HISTORY"><a class="selflink" href="#HISTORY">HISTORY</a></h1>
|
||||
<b class="Nm" title="Nm">rgbfix</b> was originally released by Carsten
|
||||
Sørensen as a standalone program called gbfix, and was later packaged
|
||||
in RGBDS by Justin Lloyd. It is now maintained by a number of contributors at
|
||||
<a class="Lk" title="Lk" href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>.</div>
|
||||
<table class="foot">
|
||||
<tr>
|
||||
<td class="foot-date">April 17, 2017</td>
|
||||
<td class="foot-os">RGBDS Manual</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
153
docs/rgbgfx.1.html
Normal file
153
docs/rgbgfx.1.html
Normal file
@@ -0,0 +1,153 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<style>
|
||||
table.head, table.foot { width: 100%; }
|
||||
td.head-rtitle, td.foot-os { text-align: right; }
|
||||
td.head-vol { text-align: center; }
|
||||
div.Pp { margin: 1ex 0ex; }
|
||||
</style>
|
||||
<link rel="stylesheet" href="manual.css" type="text/css" media="all"/>
|
||||
<title>RGBGFX(1)</title>
|
||||
</head>
|
||||
<body>
|
||||
<table class="head">
|
||||
<tr>
|
||||
<td class="head-ltitle">RGBGFX(1)</td>
|
||||
<td class="head-vol">General Commands Manual</td>
|
||||
<td class="head-rtitle">RGBGFX(1)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="manual-text">
|
||||
<h1 class="Sh" title="Sh" id="NAME"><a class="selflink" href="#NAME">NAME</a></h1>
|
||||
<b class="Nm" title="Nm">rgbgfx</b> — <span class="Nd" title="Nd">Game
|
||||
Boy graphics converter</span>
|
||||
<h1 class="Sh" title="Sh" id="SYNOPSIS"><a class="selflink" href="#SYNOPSIS">SYNOPSIS</a></h1>
|
||||
<table class="Nm">
|
||||
<tr>
|
||||
<td><b class="Nm" title="Nm">rgbgfx</b></td>
|
||||
<td>[<span class="Op"><b class="Fl" title="Fl">-DfFhPTVv</b></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-o</b>
|
||||
<var class="Ar" title="Ar">outfile</var></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-d</b>
|
||||
<var class="Ar" title="Ar">depth</var></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-p</b>
|
||||
<var class="Ar" title="Ar">palfile</var></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-t</b>
|
||||
<var class="Ar" title="Ar">mapfile</var></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-x</b>
|
||||
<var class="Ar" title="Ar">tiles</var></span>]
|
||||
<var class="Ar" title="Ar">file</var></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="Sh" title="Sh" id="DESCRIPTION"><a class="selflink" href="#DESCRIPTION">DESCRIPTION</a></h1>
|
||||
The <b class="Nm" title="Nm">rgbgfx</b> program converts PNG images into the
|
||||
Nintendo Game Boy's planar tile format. The arguments are as follows:
|
||||
<dl class="Bl-tag">
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#D"><b class="Fl" title="Fl" id="D">-D</b></a></dt>
|
||||
<dd class="It-tag">Debug features are enabled.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#f"><b class="Fl" title="Fl" id="f">-f</b></a></dt>
|
||||
<dd class="It-tag">Fix the input PNG file to be a correctly indexed
|
||||
image.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#F"><b class="Fl" title="Fl" id="F">-F</b></a></dt>
|
||||
<dd class="It-tag">Same as <b class="Fl" title="Fl">-f</b>, but additionally,
|
||||
the input PNG file is fixed to have its parameters match the command
|
||||
line's parameters.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#d"><b class="Fl" title="Fl" id="d">-d</b></a>
|
||||
<var class="Ar" title="Ar">depth</var></dt>
|
||||
<dd class="It-tag">The bitdepth of the output image (either 1 or 2). By
|
||||
default, the bitdepth is 2 (two bits per pixel).</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#h"><b class="Fl" title="Fl" id="h">-h</b></a></dt>
|
||||
<dd class="It-tag">Lay out tiles horizontally rather than vertically.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#o"><b class="Fl" title="Fl" id="o">-o</b></a>
|
||||
<var class="Ar" title="Ar">outfile</var></dt>
|
||||
<dd class="It-tag">The name of the output file.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#p"><b class="Fl" title="Fl" id="p">-p</b></a>
|
||||
<var class="Ar" title="Ar">palfile</var></dt>
|
||||
<dd class="It-tag">Raw bytes (8 bytes for two bits per pixel, 4 bytes for one
|
||||
bit per pixel) containing the RGB15 values in the little-endian byte order
|
||||
and then ordered from lightest to darkest.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#P"><b class="Fl" title="Fl" id="P">-P</b></a></dt>
|
||||
<dd class="It-tag">Same as <b class="Fl" title="Fl">-p</b>, but the pallete
|
||||
file output name is made by taking the input filename, removing the file
|
||||
extension, and appending <i class="Pa" title="Pa">.pal</i>.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#t"><b class="Fl" title="Fl" id="t">-t</b></a>
|
||||
<var class="Ar" title="Ar">mapfile</var></dt>
|
||||
<dd class="It-tag">If any tiles are the same, don't place the repeat tiles in
|
||||
the output file, and make a tilemap file.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#T"><b class="Fl" title="Fl" id="T">-T</b></a></dt>
|
||||
<dd class="It-tag">Same as <b class="Fl" title="Fl">-t</b>, but the tilemap
|
||||
file output name is made by taking the input filename, removing the file
|
||||
extension, and appending <i class="Pa" title="Pa">.tilemap</i>.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#u"><b class="Fl" title="Fl" id="u">-u</b></a></dt>
|
||||
<dd class="It-tag">Truncate repeated tiles. Useful with tilemaps.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#V"><b class="Fl" title="Fl" id="V">-V</b></a></dt>
|
||||
<dd class="It-tag">Print the version of the program and exit.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#v"><b class="Fl" title="Fl" id="v">-v</b></a></dt>
|
||||
<dd class="It-tag">Verbose. Print errors when the command line parameters and
|
||||
the parameters in the PNG file don't match.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#x"><b class="Fl" title="Fl" id="x">-x</b></a>
|
||||
<var class="Ar" title="Ar">tiles</var></dt>
|
||||
<dd class="It-tag">Trim the end of the output file by this many tiles.</dd>
|
||||
</dl>
|
||||
<h1 class="Sh" title="Sh" id="EXAMPLES"><a class="selflink" href="#EXAMPLES">EXAMPLES</a></h1>
|
||||
The following will take a PNG file with a bitdepth of 1, 2, or 8, and output
|
||||
planar 2bpp data:
|
||||
<div class="Pp"></div>
|
||||
<div class="D1">$ rgbgfx -o out.2bpp in.png</div>
|
||||
<div class="Pp"></div>
|
||||
The following creates a planar 2bpp file with only unique tiles, and its tilemap
|
||||
<i class="Pa" title="Pa">out.tilemap</i>:
|
||||
<div class="Pp"></div>
|
||||
<div class="D1">$ rgbgfx -T -u -o out.2bpp in.png</div>
|
||||
<div class="Pp"></div>
|
||||
The following will do nothing:
|
||||
<div class="Pp"></div>
|
||||
<div class="D1">$ rgbgfx in.png</div>
|
||||
<h1 class="Sh" title="Sh" id="SEE_ALSO"><a class="selflink" href="#SEE_ALSO">SEE
|
||||
ALSO</a></h1>
|
||||
<a class="Xr" title="Xr">rgbds(7)</a>, <a class="Xr" title="Xr">rgbasm(1)</a>,
|
||||
<a class="Xr" title="Xr">rgblink(1)</a>,
|
||||
<a class="Xr" title="Xr">rgbfix(1)</a>, <a class="Xr" title="Xr">gbz80(7)</a>
|
||||
<h1 class="Sh" title="Sh" id="HISTORY"><a class="selflink" href="#HISTORY">HISTORY</a></h1>
|
||||
<b class="Nm" title="Nm">rgbgfx</b> was created by
|
||||
<span class="An" title="An">stag019</span> to be included in RGBDS. It is now
|
||||
maintained by a number of contributors at
|
||||
<a class="Lk" title="Lk" href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>.</div>
|
||||
<table class="foot">
|
||||
<tr>
|
||||
<td class="foot-date">April 17, 2017</td>
|
||||
<td class="foot-os">RGBDS Manual</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
161
docs/rgblink.1.html
Normal file
161
docs/rgblink.1.html
Normal file
@@ -0,0 +1,161 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<style>
|
||||
table.head, table.foot { width: 100%; }
|
||||
td.head-rtitle, td.foot-os { text-align: right; }
|
||||
td.head-vol { text-align: center; }
|
||||
div.Pp { margin: 1ex 0ex; }
|
||||
</style>
|
||||
<link rel="stylesheet" href="manual.css" type="text/css" media="all"/>
|
||||
<title>RGBLINK(1)</title>
|
||||
</head>
|
||||
<body>
|
||||
<table class="head">
|
||||
<tr>
|
||||
<td class="head-ltitle">RGBLINK(1)</td>
|
||||
<td class="head-vol">General Commands Manual</td>
|
||||
<td class="head-rtitle">RGBLINK(1)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="manual-text">
|
||||
<h1 class="Sh" title="Sh" id="NAME"><a class="selflink" href="#NAME">NAME</a></h1>
|
||||
<b class="Nm" title="Nm">rgblink</b> — <span class="Nd" title="Nd">Game
|
||||
Boy linker</span>
|
||||
<h1 class="Sh" title="Sh" id="SYNOPSIS"><a class="selflink" href="#SYNOPSIS">SYNOPSIS</a></h1>
|
||||
<table class="Nm">
|
||||
<tr>
|
||||
<td><b class="Nm" title="Nm">rgblink</b></td>
|
||||
<td>[<span class="Op"><b class="Fl" title="Fl">-dtVw</b></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-m</b>
|
||||
<var class="Ar" title="Ar">mapfile</var></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-n</b>
|
||||
<var class="Ar" title="Ar">symfile</var></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-O</b>
|
||||
<var class="Ar" title="Ar">overlayfile</var></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-o</b>
|
||||
<var class="Ar" title="Ar">outfile</var></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-p</b>
|
||||
<var class="Ar" title="Ar">pad_value</var></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-s</b>
|
||||
<var class="Ar" title="Ar">symbol</var></span>]
|
||||
[<span class="Op"><b class="Fl" title="Fl">-l</b>
|
||||
<var class="Ar" title="Ar">linkerscript</var></span>]
|
||||
<var class="Ar" title="Ar">file ...</var></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="Sh" title="Sh" id="DESCRIPTION"><a class="selflink" href="#DESCRIPTION">DESCRIPTION</a></h1>
|
||||
The <b class="Nm" title="Nm">rgblink</b> program links objects created by
|
||||
<a class="Xr" title="Xr">rgbasm(1)</a> into a single Game Boy ROM file.
|
||||
<div class="Pp"></div>
|
||||
By default, ROM0 sections created by the assembler are placed in the 16KiB bank
|
||||
0, and ROMX sections are placed in any bank except bank 0. If your ROM will
|
||||
only be 32KiB, you can use the <b class="Fl" title="Fl">-t</b> option to
|
||||
override this.
|
||||
<div class="Pp"></div>
|
||||
Similarly, WRAM0 sections are placed in the first 4KiB of WRAM bank 0 and WRAMX
|
||||
sections are placed in any bank except bank 0. If your ROM doesn't use banked
|
||||
WRAM you can use option <b class="Fl" title="Fl">-w</b> option to override
|
||||
this.
|
||||
<div class="Pp"></div>
|
||||
Also, if your ROM is designed for DMG, you can make sure that you don't use any
|
||||
prohibited section by using the option <b class="Fl" title="Fl">-d</b>, which
|
||||
implies <b class="Fl" title="Fl">-w</b> but also prohibits the use of VRAM
|
||||
bank 1.
|
||||
<div class="Pp"></div>
|
||||
The arguments are as follows:
|
||||
<dl class="Bl-tag">
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#m"><b class="Fl" title="Fl" id="m">-m</b></a>
|
||||
<var class="Ar" title="Ar">mapfile</var></dt>
|
||||
<dd class="It-tag">Write a mapfile to the given filename.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#n"><b class="Fl" title="Fl" id="n">-n</b></a>
|
||||
<var class="Ar" title="Ar">symfile</var></dt>
|
||||
<dd class="It-tag">Write a symbol file to the given filename.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#O"><b class="Fl" title="Fl" id="O">-O</b></a>
|
||||
<var class="Ar" title="Ar">overlayfile</var></dt>
|
||||
<dd class="It-tag">The ROM image to overlay sections over. When an overlay ROM
|
||||
is provided, all sections must be fixed. This may be used to patch an
|
||||
existing binray.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#o"><b class="Fl" title="Fl" id="o">-o</b></a>
|
||||
<var class="Ar" title="Ar">outfile</var></dt>
|
||||
<dd class="It-tag">Write ROM image to the given filename.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#p"><b class="Fl" title="Fl" id="p">-p</b></a>
|
||||
<var class="Ar" title="Ar">pad_value</var></dt>
|
||||
<dd class="It-tag">When padding an image, pad with this value. The default is
|
||||
0x00.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#s"><b class="Fl" title="Fl" id="s">-s</b></a>
|
||||
<var class="Ar" title="Ar">symbol</var></dt>
|
||||
<dd class="It-tag">???</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#w"><b class="Fl" title="Fl" id="w">-w</b></a></dt>
|
||||
<dd class="It-tag">Expand the WRAM0 section size from 4KiB to the full 8KiB
|
||||
assigned to WRAM and prohibit the use of WRAMX sections.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#d"><b class="Fl" title="Fl" id="d">-d</b></a></dt>
|
||||
<dd class="It-tag">Enable DMG mode. Prohibit the use of sections that doesn't
|
||||
exist on a DMG, such as WRAMX and VRAM bank 1. This option automatically
|
||||
enables <b class="Fl" title="Fl">-w</b>.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#t"><b class="Fl" title="Fl" id="t">-t</b></a></dt>
|
||||
<dd class="It-tag">Expand the ROM0 section size from 16KiB to the full 32KiB
|
||||
assigned to ROM and prohibit the use of ROMX sections. Useful for ROMs
|
||||
that fit in 32 KiB.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#l"><b class="Fl" title="Fl" id="l">-l</b></a>
|
||||
<var class="Ar" title="Ar">linkerscript</var></dt>
|
||||
<dd class="It-tag">Specify a linkerscript file that tells the linker how
|
||||
sections must be placed in the ROM. This file has priority over the
|
||||
attributes assigned in the source code, but they have to be consistent.
|
||||
See <a class="Xr" title="Xr">rgblink(5)</a> for more information about its
|
||||
format.</dd>
|
||||
<dt class="It-tag"> </dt>
|
||||
<dd class="It-tag"> </dd>
|
||||
<dt class="It-tag"><a class="selflink" href="#V"><b class="Fl" title="Fl" id="V">-V</b></a></dt>
|
||||
<dd class="It-tag">Print the version of the program and exit.</dd>
|
||||
</dl>
|
||||
<h1 class="Sh" title="Sh" id="EXAMPLES"><a class="selflink" href="#EXAMPLES">EXAMPLES</a></h1>
|
||||
All you need for a basic ROM is an object file, which can be made into a ROM
|
||||
image like so:
|
||||
<div class="Pp"></div>
|
||||
<div class="D1">$ rgblink -o bar.gb foo.o</div>
|
||||
<div class="Pp"></div>
|
||||
The resulting bar.gb will not have correct checksums (unless you put them in the
|
||||
assembly source). You should use <a class="Xr" title="Xr">rgbfix(1)</a> to fix
|
||||
these so that the program will actually run in a Game Boy:
|
||||
<div class="Pp"></div>
|
||||
<div class="D1">$ rgbfix -v bar.gb</div>
|
||||
<h1 class="Sh" title="Sh" id="SEE_ALSO"><a class="selflink" href="#SEE_ALSO">SEE
|
||||
ALSO</a></h1>
|
||||
<a class="Xr" title="Xr">rgbasm(1)</a>, <a class="Xr" title="Xr">rgblink(5)</a>,
|
||||
<a class="Xr" title="Xr">rgbfix(1)</a>, <a class="Xr" title="Xr">rgbds(5)</a>,
|
||||
<a class="Xr" title="Xr">rgbds(7)</a>
|
||||
<h1 class="Sh" title="Sh" id="HISTORY"><a class="selflink" href="#HISTORY">HISTORY</a></h1>
|
||||
<b class="Nm" title="Nm">rgblink</b> was originally written by Carsten
|
||||
Sørensen as part of the ASMotor package, and was later packaged in
|
||||
RGBDS by Justin Lloyd. It is now maintained by a number of contributors at
|
||||
<a class="Lk" title="Lk" href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>.</div>
|
||||
<table class="foot">
|
||||
<tr>
|
||||
<td class="foot-date">April 17, 2017</td>
|
||||
<td class="foot-os">RGBDS Manual</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
105
docs/rgblink.5.html
Normal file
105
docs/rgblink.5.html
Normal file
@@ -0,0 +1,105 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<style>
|
||||
table.head, table.foot { width: 100%; }
|
||||
td.head-rtitle, td.foot-os { text-align: right; }
|
||||
td.head-vol { text-align: center; }
|
||||
div.Pp { margin: 1ex 0ex; }
|
||||
</style>
|
||||
<link rel="stylesheet" href="manual.css" type="text/css" media="all"/>
|
||||
<title>RGBLINK(5)</title>
|
||||
</head>
|
||||
<body>
|
||||
<table class="head">
|
||||
<tr>
|
||||
<td class="head-ltitle">RGBLINK(5)</td>
|
||||
<td class="head-vol">File Formats Manual</td>
|
||||
<td class="head-rtitle">RGBLINK(5)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="manual-text">
|
||||
<h1 class="Sh" title="Sh" id="NAME"><a class="selflink" href="#NAME">NAME</a></h1>
|
||||
<b class="Nm" title="Nm">rgblink</b> —
|
||||
<span class="Nd" title="Nd">linkerscript file format</span>
|
||||
<h1 class="Sh" title="Sh" id="DESCRIPTION"><a class="selflink" href="#DESCRIPTION">DESCRIPTION</a></h1>
|
||||
The linkerscript is an external file that allows the user to specify the order
|
||||
of sections without the need for doing so before assembling each object file.
|
||||
<div class="Pp"></div>
|
||||
The placement of sections specified in the linkerscript is done before the
|
||||
sections whose placement is defined in the source code.
|
||||
<div class="Pp"></div>
|
||||
A linkerscript consists on a series of banks followed by a list of sections and,
|
||||
optionally, commands. They can be lowercase or uppercase, it is ignored. Any
|
||||
line can contain a comment starting with
|
||||
‘<code class="Li">;</code>’ that ends at the end of the line:
|
||||
<div class="Pp"></div>
|
||||
<div class="Bd" style="margin-left: 5.00ex;">
|
||||
<pre class="Li">
|
||||
ROMX $F ; This is a comment
|
||||
"Functions to read array"
|
||||
ALIGN 8
|
||||
"Array aligned to 256 bytes"
|
||||
|
||||
WRAMX 2
|
||||
"Some variables"
|
||||
</pre>
|
||||
</div>
|
||||
<div class="Pp"></div>
|
||||
Numbers can be in decimal or hexadecimal format (the prefix is
|
||||
‘<code class="Li">$</code>’). It is an error if any bank or
|
||||
command is found before setting a bank.
|
||||
<div class="Pp"></div>
|
||||
Files can be included by using the <var class="Ar" title="Ar">INCLUDE</var>
|
||||
keyword followed by a string with the path of the file that has to be
|
||||
included.
|
||||
<div class="Pp"></div>
|
||||
The possible bank types are: <b class="Sy" title="Sy">ROM0</b>,
|
||||
<b class="Sy" title="Sy">ROMX</b>, <b class="Sy" title="Sy">VRAM</b>,
|
||||
<b class="Sy" title="Sy">WRAM0</b>, <b class="Sy" title="Sy">WRAMX</b>,
|
||||
<b class="Sy" title="Sy">OAM</b> and <b class="Sy" title="Sy">HRAM</b>. Types
|
||||
<b class="Sy" title="Sy">ROMX</b>, <b class="Sy" title="Sy">VRAM</b>,
|
||||
<b class="Sy" title="Sy">WRAMX</b> and <b class="Sy" title="Sy">SRAM</b> are
|
||||
banked, which means that it is needed to specify a bank after the type.
|
||||
<div class="Pp"></div>
|
||||
When a new bank statement is found, sections found after it will be placed right
|
||||
from the beginning of that bank. If the linkerscript switches to a different
|
||||
bank and then it comes back to the previous one it will continue from the last
|
||||
address that was used.
|
||||
<div class="Pp"></div>
|
||||
The only two commands are <var class="Ar" title="Ar">ORG</var> and
|
||||
<var class="Ar" title="Ar">ALIGN</var>:
|
||||
<ul class="Bl-bullet">
|
||||
<li class="It-bullet"><var class="Ar" title="Ar">ORG</var> sets the address in
|
||||
which new sections will be placed. It can not be lower than the current
|
||||
address.</li>
|
||||
<li class="It-bullet"><var class="Ar" title="Ar">ALIGN</var> will increase the
|
||||
address until it is aligned to the specified boundary (it tries to set to
|
||||
0 the number of bits specified after the command:
|
||||
<b class="Sy" title="Sy">ALIGN 8</b> will align to $100).</li>
|
||||
</ul>
|
||||
<div class="Pp"></div>
|
||||
Note: The bank, alignment, address and type of sections can be specified both in
|
||||
the source code and in the linkerscript. For a section to be able to be placed
|
||||
with the linkerscript the bank must be left unassigned in the source code or
|
||||
be the same as the one specified in the linkerscript. The address and
|
||||
alignment musn't be set.
|
||||
<h1 class="Sh" title="Sh" id="SEE_ALSO"><a class="selflink" href="#SEE_ALSO">SEE
|
||||
ALSO</a></h1>
|
||||
<a class="Xr" title="Xr">rgbasm(1)</a>, <a class="Xr" title="Xr">rgblink(1)</a>,
|
||||
<a class="Xr" title="Xr">rgbfix(1)</a>, <a class="Xr" title="Xr">rgbds(5)</a>,
|
||||
<a class="Xr" title="Xr">rgbds(7)</a>
|
||||
<h1 class="Sh" title="Sh" id="HISTORY"><a class="selflink" href="#HISTORY">HISTORY</a></h1>
|
||||
<b class="Nm" title="Nm">rgblink</b> was originally written by Carsten
|
||||
Sørensen as part of the ASMotor package, and was later packaged in
|
||||
RGBDS by Justin Lloyd. It is now maintained by a number of contributors at
|
||||
<a class="Lk" title="Lk" href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>.</div>
|
||||
<table class="foot">
|
||||
<tr>
|
||||
<td class="foot-date">April 17, 2017</td>
|
||||
<td class="foot-os">RGBDS Manual</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user