Regenerate wwwman

This commit is contained in:
Quint Guvernator
2019-05-20 22:10:08 +02:00
parent 21aea281bd
commit 327582be31
9 changed files with 3102 additions and 3538 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +1,14 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<!-- This is an automatically generated file. Do not edit.
This file is part of RGBDS.
Copyright (c) 2010-2018, Anthony J. Bentley and RGBDS contributors.
SPDX-License-Identifier: MIT
-->
<head> <head>
<meta charset="utf-8"/> <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="mandoc.css" type="text/css" media="all"/> <link rel="stylesheet" href="mandoc.css" type="text/css" media="all"/>
<title>RGBASM(1)</title> <title>RGBASM(1)</title>
</head> </head>
@@ -20,133 +21,105 @@
</tr> </tr>
</table> </table>
<div class="manual-text"> <div class="manual-text">
<h1 class="Sh" title="Sh" id="NAME"><a class="selflink" href="#NAME">NAME</a></h1> <section class="Sh">
<b class="Nm" title="Nm">rgbasm</b> &#x2014; <span class="Nd" title="Nd">Game <h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
Boy assembler</span> <code class="Nm">rgbasm</code> &#x2014;
<h1 class="Sh" title="Sh" id="SYNOPSIS"><a class="selflink" href="#SYNOPSIS">SYNOPSIS</a></h1> <div class="Nd">Game Boy assembler</div>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<table class="Nm"> <table class="Nm">
<tr> <tr>
<td><b class="Nm" title="Nm">rgbasm</b></td> <td><code class="Nm">rgbasm</code></td>
<td>[<span class="Op"><b class="Fl" title="Fl">-EhLVvw</b></span>] <td>[<code class="Fl">-EhLVvw</code>] [<code class="Fl">-b</code>
[<span class="Op"><b class="Fl" title="Fl">-b</b> <var class="Ar">chars</var>] [<code class="Fl">-D</code>
<var class="Ar" title="Ar">chars</var></span>] <var class="Ar">name</var>[=<var class="Ar">value</var>]]
[<span class="Op"><b class="Fl" title="Fl">-D</b> [<code class="Fl">-g</code> <var class="Ar">chars</var>]
<var class="Ar" title="Ar">name</var>[<span class="Op">=<var class="Ar" title="Ar">value</var></span>]</span>] [<code class="Fl">-i</code> <var class="Ar">path</var>]
[<span class="Op"><b class="Fl" title="Fl">-g</b> [<code class="Fl">-M</code> <var class="Ar">dependfile</var>]
<var class="Ar" title="Ar">chars</var></span>] [<code class="Fl">-o</code> <var class="Ar">outfile</var>]
[<span class="Op"><b class="Fl" title="Fl">-i</b> [<code class="Fl">-p</code> <var class="Ar">pad_value</var>]
<var class="Ar" title="Ar">path</var></span>] <var class="Ar">file</var></td>
[<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> </tr>
</table> </table>
<h1 class="Sh" title="Sh" id="DESCRIPTION"><a class="selflink" href="#DESCRIPTION">DESCRIPTION</a></h1> </section>
The <b class="Nm" title="Nm">rgbasm</b> program creates an object file from an <section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The <code class="Nm">rgbasm</code> program creates an object file from an
assembly source file. Its arguments are as follows: assembly source file. Its arguments are as follows:
<dl class="Bl-tag"> <dl class="Bl-tag">
<dt class="It-tag">&#x00A0;</dt> <dt><a class="permalink" href="#b"><code class="Fl" id="b">-b</code></a>
<dd class="It-tag">&#x00A0;</dd> <var class="Ar">chars</var></dt>
<dt class="It-tag"><a class="selflink" href="#b"><b class="Fl" title="Fl" id="b">-b</b></a> <dd>Change the two characters used for binary constants. The defaults are
<var class="Ar" title="Ar">chars</var></dt> 01.</dd>
<dd class="It-tag">Change the two characters used for binary constants. The <dt><a class="permalink" href="#D"><code class="Fl" id="D">-D</code></a>
defaults are 01.</dd> <var class="Ar">name</var>[=<var class="Ar">value</var>]</dt>
<dt class="It-tag">&#x00A0;</dt> <dd>Add string symbol to the compiled source code. This is equivalent to
<dd class="It-tag">&#x00A0;</dd> <var class="Ar">name</var> <code class="Cm">EQUS</code>
<dt class="It-tag"><a class="selflink" href="#D"><b class="Fl" title="Fl" id="D">-D</b></a> &#x201C;<var class="Ar">value</var>&#x201D; in code. If a value is not
<var class="Ar" title="Ar">name</var>[<span class="Op">=<var class="Ar" title="Ar">value</var></span>]</dt> specified, a value of 1 is given.</dd>
<dd class="It-tag">Add string symbol to the compiled source code. This is <dt><a class="permalink" href="#E"><code class="Fl" id="E">-E</code></a></dt>
equivalent to <var class="Ar" title="Ar">name</var> <dd>Export all labels, including unreferenced and local labels.</dd>
<b class="Cm" title="Cm">EQUS</b> <dt><a class="permalink" href="#g"><code class="Fl" id="g">-g</code></a>
&#x201C;<var class="Ar" title="Ar">value</var>&#x201D; in code. If a value <var class="Ar">chars</var></dt>
is not specified, a value of 1 is given.</dd> <dd>Change the four characters used for binary constants. The defaults are
<dt class="It-tag">&#x00A0;</dt> 0123.</dd>
<dd class="It-tag">&#x00A0;</dd> <dt><a class="permalink" href="#h"><code class="Fl" id="h">-h</code></a></dt>
<dt class="It-tag"><a class="selflink" href="#E"><b class="Fl" title="Fl" id="E">-E</b></a></dt> <dd>By default, <code class="Nm">rgbasm</code> inserts a &#x2018;nop&#x2019;
<dd class="It-tag">Export all labels, including unreferenced and local instruction immediately after any &#x2018;halt&#x2019; instruction. The
labels.</dd> <code class="Fl">-h</code> option disables this behavior.</dd>
<dt class="It-tag">&#x00A0;</dt> <dt><a class="permalink" href="#i"><code class="Fl" id="i">-i</code></a>
<dd class="It-tag">&#x00A0;</dd> <var class="Ar">path</var></dt>
<dt class="It-tag"><a class="selflink" href="#g"><b class="Fl" title="Fl" id="g">-g</b></a> <dd>Add an include path.</dd>
<var class="Ar" title="Ar">chars</var></dt> <dt><a class="permalink" href="#L"><code class="Fl" id="L">-L</code></a></dt>
<dd class="It-tag">Change the four characters used for binary constants. The <dd>Disable the optimization that turns loads of the form <b class="Sy">LD
defaults are 0123.</dd> [$FF00+n8],A</b> into the opcode <b class="Sy">LDH [$FF00+n8],A</b> in
<dt class="It-tag">&#x00A0;</dt> order to have full control of the result in the final ROM.</dd>
<dd class="It-tag">&#x00A0;</dd> <dt><a class="permalink" href="#M"><code class="Fl" id="M">-M</code></a>
<dt class="It-tag"><a class="selflink" href="#h"><b class="Fl" title="Fl" id="h">-h</b></a></dt> <var class="Ar">dependfile</var></dt>
<dd class="It-tag">By default, <b class="Nm" title="Nm">rgbasm</b> inserts a <dd>Print <a class="Xr">make(1)</a> dependencies to
&#x2018;nop&#x2019; instruction immediately after any &#x2018;halt&#x2019; <var class="Ar">dependfile</var>.</dd>
instruction. The <b class="Fl" title="Fl">-h</b> option disables this <dt><a class="permalink" href="#o"><code class="Fl" id="o">-o</code></a>
behavior.</dd> <var class="Ar">outfile</var></dt>
<dt class="It-tag">&#x00A0;</dt> <dd>Write an object file to the given filename.</dd>
<dd class="It-tag">&#x00A0;</dd> <dt><a class="permalink" href="#p"><code class="Fl" id="p">-p</code></a>
<dt class="It-tag"><a class="selflink" href="#i"><b class="Fl" title="Fl" id="i">-i</b></a> <var class="Ar">pad_value</var></dt>
<var class="Ar" title="Ar">path</var></dt> <dd>When padding an image, pad with this value. The default is 0x00.</dd>
<dd class="It-tag">Add an include path.</dd> <dt><a class="permalink" href="#V"><code class="Fl" id="V">-V</code></a></dt>
<dt class="It-tag">&#x00A0;</dt> <dd>Print the version of the program and exit.</dd>
<dd class="It-tag">&#x00A0;</dd> <dt><a class="permalink" href="#v"><code class="Fl" id="v">-v</code></a></dt>
<dt class="It-tag"><a class="selflink" href="#L"><b class="Fl" title="Fl" id="L">-L</b></a></dt> <dd>Be verbose.</dd>
<dd class="It-tag">Disable the optimization that turns loads of the form <dt><a class="permalink" href="#w"><code class="Fl" id="w">-w</code></a></dt>
<b class="Sy" title="Sy">LD [$FF00+n8],A</b> into the opcode <dd>Disable warning output.</dd>
<b class="Sy" title="Sy">LDH [$FF00+n8],A</b> in order to have full
control of the result in the final ROM.</dd>
<dt class="It-tag">&#x00A0;</dt>
<dd class="It-tag">&#x00A0;</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">&#x00A0;</dt>
<dd class="It-tag">&#x00A0;</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">&#x00A0;</dt>
<dd class="It-tag">&#x00A0;</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">&#x00A0;</dt>
<dd class="It-tag">&#x00A0;</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">&#x00A0;</dt>
<dd class="It-tag">&#x00A0;</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">&#x00A0;</dt>
<dd class="It-tag">&#x00A0;</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> </dl>
<h1 class="Sh" title="Sh" id="EXAMPLES"><a class="selflink" href="#EXAMPLES">EXAMPLES</a></h1> </section>
<section class="Sh">
<h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1>
Assembling a basic source file is simple: Assembling a basic source file is simple:
<div class="Pp"></div> <div class="Bd Pp Bd-indent">
<div class="Bd" style="margin-left: 5.00ex;"> <pre>
<pre class="Li">
$ rgbasm -o bar.o foo.asm $ rgbasm -o bar.o foo.asm
</pre> </pre>
</div> </div>
<div class="Pp"></div> <p class="Pp">The resulting object file is not yet a usable ROM image &#x2014;
The resulting object file is not yet a usable ROM image &#x2014; it must first it must first be run through <a class="Xr">rgblink(1)</a> and
be run through <a class="Xr" title="Xr">rgblink(1)</a> and <a class="Xr">rgbfix(1)</a>.</p>
<a class="Xr" title="Xr">rgbfix(1)</a>. </section>
<h1 class="Sh" title="Sh" id="SEE_ALSO"><a class="selflink" href="#SEE_ALSO">SEE <section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1> ALSO</a></h1>
<a class="Xr" title="Xr">rgbasm(5)</a>, <a class="Xr" title="Xr">rgbfix(1)</a>, <a class="Xr">rgbasm(5)</a>, <a class="Xr">rgbfix(1)</a>,
<a class="Xr" title="Xr">rgblink(1)</a>, <a class="Xr">rgblink(1)</a>, <a class="Xr">rgbds(5)</a>,
<a class="Xr" title="Xr">rgbds(5)</a>, <a class="Xr" title="Xr">rgbds(7)</a>, <a class="Xr">rgbds(7)</a>, <a class="Xr">gbz80(7)</a>
<a class="Xr" title="Xr">gbz80(7)</a> </section>
<h1 class="Sh" title="Sh" id="HISTORY"><a class="selflink" href="#HISTORY">HISTORY</a></h1> <section class="Sh">
<b class="Nm" title="Nm">rgbasm</b> was originally written by Carsten <h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
S&#x00F8;rensen as part of the ASMotor package, and was later packaged in <code class="Nm">rgbasm</code> was originally written by Carsten S&#x00F8;rensen
RGBDS by Justin Lloyd. It is now maintained by a number of contributors at as part of the ASMotor package, and was later packaged in RGBDS by Justin
<a class="Lk" title="Lk" href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>.</div> Lloyd. It is now maintained by a number of contributors at
<a class="Lk" href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>.
</section>
</div>
<table class="foot"> <table class="foot">
<tr> <tr>
<td class="foot-date">February 24, 2018</td> <td class="foot-date">February 24, 2018</td>

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +1,14 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<!-- This is an automatically generated file. Do not edit.
This file is part of RGBDS.
Copyright (c) 2017-2018, Antonio Nino Diaz and RGBDS contributors.
SPDX-License-Identifier: MIT
-->
<head> <head>
<meta charset="utf-8"/> <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="mandoc.css" type="text/css" media="all"/> <link rel="stylesheet" href="mandoc.css" type="text/css" media="all"/>
<title>RGBDS(5)</title> <title>RGBDS(5)</title>
</head> </head>
@@ -20,124 +21,127 @@
</tr> </tr>
</table> </table>
<div class="manual-text"> <div class="manual-text">
<h1 class="Sh" title="Sh" id="NAME"><a class="selflink" href="#NAME">NAME</a></h1> <section class="Sh">
<b class="Nm" title="Nm">rgbds</b> &#x2014; <span class="Nd" title="Nd">object <h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
file format documentation</span> <code class="Nm">rgbds</code> &#x2014;
<h1 class="Sh" title="Sh" id="DESCRIPTION"><a class="selflink" href="#DESCRIPTION">DESCRIPTION</a></h1> <div class="Nd">object file format documentation</div>
This is the description of the object files used by </section>
<a class="Xr" title="Xr">rgbasm(1)</a> and <section class="Sh">
<a class="Xr" title="Xr">rgblink(1)</a>. Please, note that the specifications <h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
may change. This toolchain is in development and new features may require This is the description of the object files used by <a class="Xr">rgbasm(1)</a>
adding more information to the current format, or modifying some fields, which and <a class="Xr">rgblink(1)</a>. Please, note that the specifications may
would break compatibility with older versions. change. This toolchain is in development and new features may require adding
<h1 class="Sh" title="Sh" id="FILE_STRUCTURE"><a class="selflink" href="#FILE_STRUCTURE">FILE more information to the current format, or modifying some fields, which would
break compatibility with older versions.
</section>
<section class="Sh">
<h1 class="Sh" id="FILE_STRUCTURE"><a class="permalink" href="#FILE_STRUCTURE">FILE
STRUCTURE</a></h1> STRUCTURE</a></h1>
The following types are used: The following types are used:
<div class="Pp"></div> <p class="Pp"><var class="Ar">LONG</var> is a 32&#x2010;bit integer stored in
<var class="Ar" title="Ar">LONG</var> is a 32&#x2010;bit integer stored in little&#x2010;endian format (Intel). <var class="Ar">BYTE</var> is an
little&#x2010;endian format (Intel). <var class="Ar" title="Ar">BYTE</var> is 8&#x2010;bit integer. <var class="Ar">STRING</var> is a 0&#x2010;terminated
an 8&#x2010;bit integer. <var class="Ar" title="Ar">STRING</var> is a string of <var class="Ar">BYTE</var>.</p>
0&#x2010;terminated string of <var class="Ar" title="Ar">BYTE</var>. <div class="Bd Pp">
<div class="Pp"></div> <pre>
<div class="Bd" style="margin-left: 0.00ex;"> ; Header
<pre class="Li">
; Header BYTE ID[4] ; &quot;RGB6&quot;
LONG NumberOfSymbols ; The number of symbols used in this file
BYTE ID[4] ; &quot;RGB6&quot; LONG NumberOfSections ; The number of sections used in this file
LONG NumberOfSymbols ; The number of symbols used in this file
LONG NumberOfSections ; The number of sections used in this file ; Symbols
; Symbols REPT NumberOfSymbols ; Number of symbols defined in this object file.
REPT NumberOfSymbols ; Number of symbols defined in this object file. STRING Name ; The name of this symbol. Local symbols are stored
; as &quot;Scope.Symbol&quot;.
STRING Name ; The name of this symbol. Local symbols are stored
; as &quot;Scope.Symbol&quot;. BYTE Type ; 0 = LOCAL symbol only used in this file.
; 1 = IMPORT this symbol from elsewhere
BYTE Type ; 0 = LOCAL symbol only used in this file. ; 2 = EXPORT this symbol to other objects.
; 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.
IF Type != 1 ; If symbol is defined in this object file. STRING FileName ; File where the symbol is defined.
STRING FileName ; File where the symbol is defined. LONG LineNum ; Line number in the 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. If it doesn't belong to any
LONG SectionID ; The section number (of this object file) in which ; specific section (like a constant), this field has
; this symbol is defined. If it doesn't belong to any ; the value -1.
; specific section (like a constant), this field has
; the value -1. LONG Value ; The symbols value. It's the offset into that
; symbol's section.
LONG Value ; The symbols value. It's the offset into that
; symbol's section. ENDC
ENDC ENDR
ENDR ; Sections
; Sections REPT NumberOfSections
STRING Name ; Name of the section
REPT NumberOfSections
STRING Name ; Name of the section LONG Size ; Size in bytes of this section
LONG Size ; Size in bytes of this section BYTE Type ; 0 = WRAM0
; 1 = VRAM
BYTE Type ; 0 = WRAM0 ; 2 = ROMX
; 1 = VRAM ; 3 = ROM0
; 2 = ROMX ; 4 = HRAM
; 3 = ROM0 ; 5 = WRAMX
; 4 = HRAM ; 6 = SRAM
; 5 = WRAMX ; 7 = OAM
; 6 = SRAM
; 7 = OAM LONG Org ; Address to fix this section at. -1 if the linker should
; decide (floating address).
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,
LONG Bank ; Bank to load this section into. -1 if the linker should ; VRAM, WRAMX and SRAM sections.
; 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.
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.
IF (Type == ROMX) || (Type == ROM0) ; Sections that can contain data. BYTE Data[Size] ; Raw data of the section.
BYTE Data[Size] ; Raw data of the section. LONG NumberOfPatches ; Number of patches to apply.
LONG NumberOfPatches ; Number of patches to apply. ; These types of sections may have patches
; These types of sections may have patches REPT NumberOfPatches
REPT NumberOfPatches STRING SourceFile ; Name of the source file (for printing error
; messages).
STRING SourceFile ; Name of the source file (for printing error
; messages). LONG Line ; The line of the source file.
LONG Line ; The line of the source file. LONG Offset ; Offset into the section where patch should
; be applied (in bytes).
LONG Offset ; Offset into the section where patch should
; be applied (in bytes). BYTE Type ; 0 = BYTE patch.
; 1 = little endian WORD patch.
BYTE Type ; 0 = BYTE patch. ; 2 = little endian LONG patch.
; 1 = little endian WORD patch. ; 3 = JR offset value BYTE patch.
; 2 = little endian LONG patch.
; 3 = JR offset value BYTE patch. LONG RPNSize ; Size of the buffer with the RPN.
; expression.
LONG RPNSize ; Size of the buffer with the RPN.
; expression. BYTE RPN[RPNSize] ; RPN expression. Definition below.
BYTE RPN[RPNSize] ; RPN expression. Definition below. ENDR
ENDR ENDC
ENDC
ENDR ENDR
</pre> </pre>
</div> </div>
<h2 class="Ss" title="Ss" id="RPN_DATA"><a class="selflink" href="#RPN_DATA">RPN <section class="Ss">
<h2 class="Ss" id="RPN_DATA"><a class="permalink" href="#RPN_DATA">RPN
DATA</a></h2> DATA</a></h2>
Expressions in the object file are stored as RPN. This is an expression of the Expressions in the object file are stored as RPN. This is an expression of the
form &#x201C;2 5 +&#x201D;. This will first push the value &#x201C;2&#x201D; form &#x201C;2 5 +&#x201D;. This will first push the value &#x201C;2&#x201D;
@@ -146,159 +150,160 @@ Expressions in the object file are stored as RPN. This is an expression of the
effectively replacing the two top arguments with their sum. In the RGB format, 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 RPN expressions are stored as BYTEs with some bytes being special prefixes for
integers and symbols. integers and symbols.
<table class="Bl-column" style="margin-left: 6.00ex;"> <table class="Bl-column Bd-indent">
<colgroup> <tr>
<col style="width: 15.00ex;"/> <td><b class="Sy">Value</b></td>
<col style="min-width: 10.00ex;"/> <td><b class="Sy">Meaning</b></td>
</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>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$00"><code class="Li" id="$00">$00</code></a></td> <td><a class="permalink" 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">+ <td><a class="permalink" href="#+_operator"><code class="Li" id="+_operator">+
operator</code></a></td> operator</code></a></td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$01"><code class="Li" id="$01">$01</code></a></td> <td><a class="permalink" 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">- <td><a class="permalink" href="#-_operator"><code class="Li" id="-_operator">-
operator</code></a></td> operator</code></a></td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$02"><code class="Li" id="$02">$02</code></a></td> <td><a class="permalink" 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">* <td><a class="permalink" href="#*_operator"><code class="Li" id="*_operator">*
operator</code></a></td> operator</code></a></td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$03"><code class="Li" id="$03">$03</code></a></td> <td><a class="permalink" 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">/ <td><a class="permalink" href="#/_operator"><code class="Li" id="/_operator">/
operator</code></a></td> operator</code></a></td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$04"><code class="Li" id="$04">$04</code></a></td> <td><a class="permalink" 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">% <td><a class="permalink" href="#__operator"><code class="Li" id="__operator">%
operator</code></a></td> operator</code></a></td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$05"><code class="Li" id="$05">$05</code></a></td> <td><a class="permalink" 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 <td><a class="permalink" href="#unary_-"><code class="Li" id="unary_-">unary
-</code></a></td> -</code></a></td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$10"><code class="Li" id="$10">$10</code></a></td> <td><a class="permalink" href="#$10"><code class="Li" id="$10">$10</code></a></td>
<td class="It-column">| <td>|
<a class="selflink" href="#operator"><code class="Li" id="operator">operator</code></a></td> <a class="permalink" href="#operator"><code class="Li" id="operator">operator</code></a></td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$11"><code class="Li" id="$11">$11</code></a></td> <td><a class="permalink" href="#$11"><code class="Li" id="$11">$11</code></a></td>
<td class="It-column"><a class="selflink" href="#&amp;_operator"><code class="Li" id="&amp;_operator">&amp; <td><a class="permalink" href="#&amp;_operator"><code class="Li" id="&amp;_operator">&amp;
operator</code></a></td> operator</code></a></td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$12"><code class="Li" id="$12">$12</code></a></td> <td><a class="permalink" 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">^ <td><a class="permalink" href="#__operator_2"><code class="Li" id="__operator_2">^
operator</code></a></td> operator</code></a></td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$13"><code class="Li" id="$13">$13</code></a></td> <td><a class="permalink" 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 <td><a class="permalink" href="#unary_~"><code class="Li" id="unary_~">unary
~</code></a></td> ~</code></a></td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$21"><code class="Li" id="$21">$21</code></a></td> <td><a class="permalink" href="#$21"><code class="Li" id="$21">$21</code></a></td>
<td class="It-column"><a class="selflink" href="#&amp;&amp;_comparison"><code class="Li" id="&amp;&amp;_comparison">&amp;&amp; <td><a class="permalink" href="#&amp;&amp;_comparison"><code class="Li" id="&amp;&amp;_comparison">&amp;&amp;
comparison</code></a></td> comparison</code></a></td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$22"><code class="Li" id="$22">$22</code></a></td> <td><a class="permalink" 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">|| <td><a class="permalink" href="#___comparison"><code class="Li" id="___comparison">||
comparison</code></a></td> comparison</code></a></td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$23"><code class="Li" id="$23">$23</code></a></td> <td><a class="permalink" 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> <td><a class="permalink" href="#unary"><code class="Li" id="unary">unary</code></a>!</td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$30"><code class="Li" id="$30">$30</code></a></td> <td><a class="permalink" 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">== <td><a class="permalink" href="#==_comparison"><code class="Li" id="==_comparison">==
comparison</code></a></td> comparison</code></a></td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$31"><code class="Li" id="$31">$31</code></a></td> <td><a class="permalink" 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">!= <td><a class="permalink" href="#!=_comparison"><code class="Li" id="!=_comparison">!=
comparison</code></a></td> comparison</code></a></td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$32"><code class="Li" id="$32">$32</code></a></td> <td><a class="permalink" href="#$32"><code class="Li" id="$32">$32</code></a></td>
<td class="It-column"><a class="selflink" href="#&gt;_comparison"><code class="Li" id="&gt;_comparison">&gt; <td><a class="permalink" href="#__comparison"><code class="Li" id="__comparison">&gt;
comparison</code></a></td> comparison</code></a></td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$33"><code class="Li" id="$33">$33</code></a></td> <td><a class="permalink" href="#$33"><code class="Li" id="$33">$33</code></a></td>
<td class="It-column"><a class="selflink" href="#&lt;_comparison"><code class="Li" id="&lt;_comparison">&lt; <td><a class="permalink" href="#__comparison_2"><code class="Li" id="__comparison_2">&lt;
comparison</code></a></td> comparison</code></a></td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$34"><code class="Li" id="$34">$34</code></a></td> <td><a class="permalink" href="#$34"><code class="Li" id="$34">$34</code></a></td>
<td class="It-column"><a class="selflink" href="#&gt;=_comparison"><code class="Li" id="&gt;=_comparison">&gt;= <td><a class="permalink" href="#_=_comparison"><code class="Li" id="_=_comparison">&gt;=
comparison</code></a></td> comparison</code></a></td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$35"><code class="Li" id="$35">$35</code></a></td> <td><a class="permalink" href="#$35"><code class="Li" id="$35">$35</code></a></td>
<td class="It-column"><a class="selflink" href="#&lt;=_comparison"><code class="Li" id="&lt;=_comparison">&lt;= <td><a class="permalink" href="#_=_comparison_2"><code class="Li" id="_=_comparison_2">&lt;=
comparison</code></a></td> comparison</code></a></td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$40"><code class="Li" id="$40">$40</code></a></td> <td><a class="permalink" href="#$40"><code class="Li" id="$40">$40</code></a></td>
<td class="It-column"><a class="selflink" href="#&lt;&lt;_comparison"><code class="Li" id="&lt;&lt;_comparison">&lt;&lt; <td><a class="permalink" href="#___operator"><code class="Li" id="___operator">&lt;&lt;
comparison</code></a></td> operator</code></a></td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$41"><code class="Li" id="$41">$41</code></a></td> <td><a class="permalink" href="#$41"><code class="Li" id="$41">$41</code></a></td>
<td class="It-column"><a class="selflink" href="#&gt;&gt;_comparison"><code class="Li" id="&gt;&gt;_comparison">&gt;&gt; <td><a class="permalink" href="#___operator_2"><code class="Li" id="___operator_2">&gt;&gt;
comparison</code></a></td> operator</code></a></td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$50"><code class="Li" id="$50">$50</code></a></td> <td><a class="permalink" 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> <td><a class="permalink" 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> a <var class="Ar">LONG</var> Symbol ID follows.</td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$51"><code class="Li" id="$51">$51</code></a></td> <td><a class="permalink" 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> <td><a class="permalink" href="#BANK(section_name),"><code class="Li" id="BANK(section_name),">BANK(section_name),</code></a>
a null-terminated string follows.</td> a null-terminated string follows.</td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$52"><code class="Li" id="$52">$52</code></a></td> <td><a class="permalink" 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 <td><a class="permalink" href="#Current_BANK()"><code class="Li" id="Current_BANK()">Current
BANK()</code></a>.</td> BANK()</code></a>.</td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$60"><code class="Li" id="$60">$60</code></a></td> <td><a class="permalink" 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> <td><a class="permalink" href="#HRAMCheck."><code class="Li" id="HRAMCheck.">HRAMCheck.</code></a>
Check if the value is in HRAM, AND it with 0xFF.</td> Check if the value is in HRAM, AND it with 0xFF.</td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$80"><code class="Li" id="$80">$80</code></a></td> <td><a class="permalink" href="#$80"><code class="Li" id="$80">$80</code></a></td>
<td class="It-column"><var class="Ar" title="Ar">LONG</var> integer <td><var class="Ar">LONG</var> integer follows.</td>
follows.</td>
</tr> </tr>
<tr class="It-column"> <tr>
<td class="It-column"><a class="selflink" href="#$81"><code class="Li" id="$81">$81</code></a></td> <td><a class="permalink" href="#$81"><code class="Li" id="$81">$81</code></a></td>
<td class="It-column"><var class="Ar" title="Ar">LONG</var> Symbol ID <td><var class="Ar">LONG</var> Symbol ID follows.</td>
follows.</td>
</tr> </tr>
</table> </table>
<h1 class="Sh" title="Sh" id="SEE_ALSO"><a class="selflink" href="#SEE_ALSO">SEE </section>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1> ALSO</a></h1>
<a class="Xr" title="Xr">rgbasm(1)</a>, <a class="Xr" title="Xr">rgblink(1)</a>, <a class="Xr">rgbasm(1)</a>, <a class="Xr">rgblink(1)</a>,
<a class="Xr" title="Xr">rgbds(7)</a>, <a class="Xr" title="Xr">gbz80(7)</a> <a class="Xr">rgbds(7)</a>, <a class="Xr">gbz80(7)</a>
<h1 class="Sh" title="Sh" id="HISTORY"><a class="selflink" href="#HISTORY">HISTORY</a></h1> </section>
<b class="Nm" title="Nm">rgbds</b> was originally written by Carsten <section class="Sh">
S&#x00F8;rensen as part of the ASMotor package, and was later packaged in <h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
RGBDS by Justin Lloyd. It is now maintained by a number of contributors at <code class="Nm">rgbds</code> was originally written by Carsten S&#x00F8;rensen
<a class="Lk" title="Lk" href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>.</div> 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" href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>.
</section>
</div>
<table class="foot"> <table class="foot">
<tr> <tr>
<td class="foot-date">January 26, 2018</td> <td class="foot-date">January 26, 2018</td>

View File

@@ -1,13 +1,14 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<!-- This is an automatically generated file. Do not edit.
This file is part of RGBDS.
Copyright (c) 2010-2018, Anthony J. Bentley and RGBDS contributors.
SPDX-License-Identifier: MIT
-->
<head> <head>
<meta charset="utf-8"/> <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="mandoc.css" type="text/css" media="all"/> <link rel="stylesheet" href="mandoc.css" type="text/css" media="all"/>
<title>RGBDS(7)</title> <title>RGBDS(7)</title>
</head> </head>
@@ -20,46 +21,52 @@
</tr> </tr>
</table> </table>
<div class="manual-text"> <div class="manual-text">
<h1 class="Sh" title="Sh" id="NAME"><a class="selflink" href="#NAME">NAME</a></h1> <section class="Sh">
<b class="Nm" title="Nm">rgbds</b> &#x2014; <span class="Nd" title="Nd">Rednex <h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
Game Boy Development System</span> <code class="Nm">rgbds</code> &#x2014;
<h1 class="Sh" title="Sh" id="EXAMPLES"><a class="selflink" href="#EXAMPLES">EXAMPLES</a></h1> <div class="Nd">Rednex Game Boy Development System</div>
</section>
<section class="Sh">
<h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1>
To get a working ROM image from a single assembly source file: To get a working ROM image from a single assembly source file:
<div class="Pp"></div> <div class="Bd Pp Bd-indent">
<div class="Bd" style="margin-left: 5.00ex;"> <pre>
<pre class="Li"> $ rgbasm -o bar.o foo.asm
$ rgbasm -o bar.o foo.asm $ rgblink -o baz.gb bar.o
$ rgblink -o baz.gb bar.o
$ rgbfix -v -p 0 baz.gb $ rgbfix -v -p 0 baz.gb
</pre> </pre>
</div> </div>
<h1 class="Sh" title="Sh" id="SEE_ALSO"><a class="selflink" href="#SEE_ALSO">SEE </section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1> ALSO</a></h1>
<a class="Xr" title="Xr">rgbasm(1)</a>, <a class="Xr" title="Xr">rgbfix(1)</a>, <a class="Xr">rgbasm(1)</a>, <a class="Xr">rgbfix(1)</a>,
<a class="Xr" title="Xr">rgblink(1)</a>, <a class="Xr">rgblink(1)</a>, <a class="Xr">rgbds(5)</a>,
<a class="Xr" title="Xr">rgbds(5)</a>, <a class="Xr" title="Xr">gbz80(7)</a> <a class="Xr">gbz80(7)</a>
<h1 class="Sh" title="Sh" id="HISTORY"><a class="selflink" href="#HISTORY">HISTORY</a></h1> </section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<dl class="Bl-ohang"> <dl class="Bl-ohang">
<dt class="It-ohang"></dt> <dt></dt>
<dd class="It-ohang">1997, Carsten S&#x00F8;rensen (AKA SurfSmurf) writes <dd>1997, Carsten S&#x00F8;rensen (AKA SurfSmurf) writes ASMotor as a
ASMotor as a general-purpose assembler/linker system for DOS/Win32.</dd> general-purpose assembler/linker system for DOS/Win32.</dd>
<dt class="It-ohang"></dt> <dt></dt>
<dd class="It-ohang">1999, Justin Lloyd (AKA Otaku no Zoku) adapts ASMotor to <dd>1999, Justin Lloyd (AKA Otaku no Zoku) adapts ASMotor to read and produce
read and produce GBZ80 assembly/machine code, and releases this version as GBZ80 assembly/machine code, and releases this version as RGBDS.</dd>
RGBDS.</dd> <dt></dt>
<dt class="It-ohang"></dt> <dd>2009, Vegard Nossum adapts the code to be more UNIX-like and releases this
<dd class="It-ohang">2009, Vegard Nossum adapts the code to be more UNIX-like version as rgbds-linux on GitHub.</dd>
and releases this version as rgbds-linux on GitHub.</dd> <dt></dt>
<dt class="It-ohang"></dt> <dd>2010, Anthony J. Bentley forks that repository. The fork becomes the
<dd class="It-ohang">2010, Anthony J. Bentley forks that repository. The fork reference implementation of rgbds.</dd>
becomes the reference implementation of rgbds.</dd> <dt></dt>
<dt class="It-ohang"></dt> <dd>2017, Bentley's repository is moved to a neutral name. It is now
<dd class="It-ohang">2017, Bentley's repository is moved to a neutral name. It maintained by a number of contributors at
is now maintained by a number of contributors at <a class="Lk" href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>.</dd>
<a class="Lk" title="Lk" href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>.</dd> <dt></dt>
<dt class="It-ohang"></dt> <dd>2018, codebase relicensed under the MIT license.</dd>
<dd class="It-ohang">2018, codebase relicensed under the MIT license.</dd>
</dl> </dl>
</section>
</div> </div>
<table class="foot"> <table class="foot">
<tr> <tr>

View File

@@ -1,13 +1,14 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<!-- This is an automatically generated file. Do not edit.
This file is part of RGBDS.
Copyright (c) 2010-2017, Anthony J. Bentley and RGBDS contributors.
SPDX-License-Identifier: MIT
-->
<head> <head>
<meta charset="utf-8"/> <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="mandoc.css" type="text/css" media="all"/> <link rel="stylesheet" href="mandoc.css" type="text/css" media="all"/>
<title>RGBFIX(1)</title> <title>RGBFIX(1)</title>
</head> </head>
@@ -20,189 +21,158 @@
</tr> </tr>
</table> </table>
<div class="manual-text"> <div class="manual-text">
<h1 class="Sh" title="Sh" id="NAME"><a class="selflink" href="#NAME">NAME</a></h1> <section class="Sh">
<b class="Nm" title="Nm">rgbfix</b> &#x2014; <span class="Nd" title="Nd">Game <h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
Boy checksum fixer</span> <code class="Nm">rgbfix</code> &#x2014;
<h1 class="Sh" title="Sh" id="SYNOPSIS"><a class="selflink" href="#SYNOPSIS">SYNOPSIS</a></h1> <div class="Nd">Game Boy checksum fixer</div>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<table class="Nm"> <table class="Nm">
<tr> <tr>
<td><b class="Nm" title="Nm">rgbfix</b></td> <td><code class="Nm">rgbfix</code></td>
<td>[<span class="Op"><b class="Fl" title="Fl">-CcjsVv</b></span>] <td>[<code class="Fl">-CcjsVv</code>] [<code class="Fl">-f</code>
[<span class="Op"><b class="Fl" title="Fl">-f</b> <var class="Ar">fix_spec</var>] [<code class="Fl">-i</code>
<var class="Ar" title="Ar">fix_spec</var></span>] <var class="Ar">game_id</var>] [<code class="Fl">-k</code>
[<span class="Op"><b class="Fl" title="Fl">-i</b> <var class="Ar">licensee_str</var>] [<code class="Fl">-l</code>
<var class="Ar" title="Ar">game_id</var></span>] <var class="Ar">licensee_id</var>] [<code class="Fl">-m</code>
[<span class="Op"><b class="Fl" title="Fl">-k</b> <var class="Ar">mbc_type</var>] [<code class="Fl">-n</code>
<var class="Ar" title="Ar">licensee_str</var></span>] <var class="Ar">rom_version</var>] [<code class="Fl">-p</code>
[<span class="Op"><b class="Fl" title="Fl">-l</b> <var class="Ar">pad_value</var>] [<code class="Fl">-r</code>
<var class="Ar" title="Ar">licensee_id</var></span>] <var class="Ar">ram_size</var>] [<code class="Fl">-t</code>
[<span class="Op"><b class="Fl" title="Fl">-m</b> <var class="Ar">title_str</var>] <var class="Ar">file</var></td>
<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> </tr>
</table> </table>
<h1 class="Sh" title="Sh" id="DESCRIPTION"><a class="selflink" href="#DESCRIPTION">DESCRIPTION</a></h1> </section>
The <b class="Nm" title="Nm">rgbfix</b> program changes headers of Game Boy ROM <section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The <code class="Nm">rgbfix</code> program changes headers of Game Boy ROM
images. It also performs other filetype operations, such as truncation. The images. It also performs other filetype operations, such as truncation. The
arguments are as follows: arguments are as follows:
<dl class="Bl-tag"> <dl class="Bl-tag">
<dt class="It-tag">&#x00A0;</dt> <dt><a class="permalink" href="#C"><code class="Fl" id="C">-C</code></a></dt>
<dd class="It-tag">&#x00A0;</dd> <dd>Set the Game Boy Color&#x2013;only flag: <span class="Ad">0x143</span> =
<dt class="It-tag"><a class="selflink" href="#C"><b class="Fl" title="Fl" id="C">-C</b></a></dt> 0xC0. If both this and the <code class="Fl">-c</code> flag are set, this
<dd class="It-tag">Set the Game Boy Color&#x2013;only flag: takes precedence.</dd>
<i class="Ad">0x143</i> = 0xC0. If both this and the <dt><a class="permalink" href="#c"><code class="Fl" id="c">-c</code></a></dt>
<b class="Fl" title="Fl">-c</b> flag are set, this takes precedence.</dd> <dd>Set the Game Boy Color&#x2013;compatible flag:
<dt class="It-tag">&#x00A0;</dt> <span class="Ad">0x143</span> = 0x80. If both this and the
<dd class="It-tag">&#x00A0;</dd> <code class="Fl">-C</code> flag are set, <code class="Fl">-C</code> takes
<dt class="It-tag"><a class="selflink" href="#c"><b class="Fl" title="Fl" id="c">-c</b></a></dt> precedence.</dd>
<dd class="It-tag">Set the Game Boy Color&#x2013;compatible flag: <dt><a class="permalink" href="#f"><code class="Fl" id="f">-f</code></a>
<i class="Ad">0x143</i> = 0x80. If both this and the <var class="Ar">fix_spec</var></dt>
<b class="Fl" title="Fl">-C</b> flag are set, <dd>Fix certain header values that the Game Boy checks for correctness.
<b class="Fl" title="Fl">-C</b> takes precedence.</dd> Alternatively, intentionally trash these values by writing their binary
<dt class="It-tag">&#x00A0;</dt> inverse instead. <var class="Ar">fix_spec</var> is a string containing any
<dd class="It-tag">&#x00A0;</dd> combination of the following characters:
<dt class="It-tag"><a class="selflink" href="#f"><b class="Fl" title="Fl" id="f">-f</b></a> <p class="Pp"></p>
<var class="Ar" title="Ar">fix_spec</var></dt> <dl class="Bl-tag Bl-compact">
<dd class="It-tag">Fix certain header values that the Game Boy checks for <dt><a class="permalink" href="#l"><code class="Cm" id="l">l</code></a></dt>
correctness. Alternatively, intentionally trash these values by writing <dd>Fix the Nintendo logo
their binary inverse instead. <var class="Ar" title="Ar">fix_spec</var> is (<span class="Ad">0x104</span>&#x2013;<span class="Ad">0x133</span>).</dd>
a string containing any combination of the following characters: <dt><a class="permalink" href="#L"><code class="Cm" id="L">L</code></a></dt>
<div class="Pp"></div> <dd>Trash the Nintendo logo.</dd>
<dl class="Bl-tag Bl-compact" style="margin-left: 5.40ex;"> <dt><a class="permalink" href="#h"><code class="Cm" id="h">h</code></a></dt>
<dt class="It-tag" style="margin-left: -5.40ex;"><a class="selflink" href="#l"><b class="Cm" title="Cm" id="l">l</b></a></dt> <dd>Fix the header checksum (<span class="Ad">0x14D</span>).</dd>
<dd class="It-tag">Fix the Nintendo logo <dt><a class="permalink" href="#H"><code class="Cm" id="H">H</code></a></dt>
(<i class="Ad">0x104</i>&#x2013;<i class="Ad">0x133</i>).</dd> <dd>Trash the header checksum.</dd>
<dt class="It-tag" style="margin-left: -5.40ex;"><a class="selflink" href="#L"><b class="Cm" title="Cm" id="L">L</b></a></dt> <dt><a class="permalink" href="#g"><code class="Cm" id="g">g</code></a></dt>
<dd class="It-tag">Trash the Nintendo logo.</dd> <dd>Fix the global checksum
<dt class="It-tag" style="margin-left: -5.40ex;"><a class="selflink" href="#h"><b class="Cm" title="Cm" id="h">h</b></a></dt> (<span class="Ad">0x14E</span>&#x2013;<span class="Ad">0x14F</span>).</dd>
<dd class="It-tag">Fix the header checksum (<i class="Ad">0x14D</i>).</dd> <dt><a class="permalink" href="#G"><code class="Cm" id="G">G</code></a></dt>
<dt class="It-tag" style="margin-left: -5.40ex;"><a class="selflink" href="#H"><b class="Cm" title="Cm" id="H">H</b></a></dt> <dd>Trash the global checksum.</dd>
<dd class="It-tag">Trash the header checksum.</dd>
<dt class="It-tag" style="margin-left: -5.40ex;"><a class="selflink" href="#g"><b class="Cm" title="Cm" id="g">g</b></a></dt>
<dd class="It-tag">Fix the global checksum
(<i class="Ad">0x14E</i>&#x2013;<i class="Ad">0x14F</i>).</dd>
<dt class="It-tag" style="margin-left: -5.40ex;"><a class="selflink" href="#G"><b class="Cm" title="Cm" id="G">G</b></a></dt>
<dd class="It-tag">Trash the global checksum.</dd>
</dl> </dl>
</dd> </dd>
<dt class="It-tag">&#x00A0;</dt> <dt><a class="permalink" href="#i"><code class="Fl" id="i">-i</code></a>
<dd class="It-tag">&#x00A0;</dd> <var class="Ar">game_id</var></dt>
<dt class="It-tag"><a class="selflink" href="#i"><b class="Fl" title="Fl" id="i">-i</b></a> <dd>Set the game ID string
<var class="Ar" title="Ar">game_id</var></dt> (<span class="Ad">0x13F</span>&#x2013;<span class="Ad">0x142</span>) to a
<dd class="It-tag">Set the game ID string given string of exactly 4 characters. If both this and the title are set,
(<i class="Ad">0x13F</i>&#x2013;<i class="Ad">0x142</i>) to a given string the game ID will overwrite the overlapping portion of the title.</dd>
of exactly 4 characters. If both this and the title are set, the game ID <dt><a class="permalink" href="#j"><code class="Fl" id="j">-j</code></a></dt>
will overwrite the overlapping portion of the title.</dd> <dd>Set the non-Japanese region flag: <span class="Ad">0x14A</span> = 1.</dd>
<dt class="It-tag">&#x00A0;</dt> <dt><a class="permalink" href="#k"><code class="Fl" id="k">-k</code></a>
<dd class="It-tag">&#x00A0;</dd> <var class="Ar">licensee_str</var></dt>
<dt class="It-tag"><a class="selflink" href="#j"><b class="Fl" title="Fl" id="j">-j</b></a></dt> <dd>Set the new licensee string
<dd class="It-tag">Set the non-Japanese region flag: <i class="Ad">0x14A</i> = (<span class="Ad">0x144</span>&#x2013;<span class="Ad">0x145</span>) to a
1.</dd> given string, truncated to at most two characters.</dd>
<dt class="It-tag">&#x00A0;</dt> <dt><a class="permalink" href="#l_2"><code class="Fl" id="l_2">-l</code></a>
<dd class="It-tag">&#x00A0;</dd> <var class="Ar">licensee_id</var></dt>
<dt class="It-tag"><a class="selflink" href="#k"><b class="Fl" title="Fl" id="k">-k</b></a> <dd>Set the old licensee code, <span class="Ad">0x14B</span>, to a given value
<var class="Ar" title="Ar">licensee_str</var></dt> from 0 to 0xFF. This value is deprecated and should be set to 0x33 in all
<dd class="It-tag">Set the new licensee string new software.</dd>
(<i class="Ad">0x144</i>&#x2013;<i class="Ad">0x145</i>) to a given <dt><a class="permalink" href="#m"><code class="Fl" id="m">-m</code></a>
string, truncated to at most two characters.</dd> <var class="Ar">mbc_type</var></dt>
<dt class="It-tag">&#x00A0;</dt> <dd>Set the MBC type, <span class="Ad">0x147</span>, to a given value from 0
<dd class="It-tag">&#x00A0;</dd> to 0xFF.</dd>
<dt class="It-tag"><a class="selflink" href="#l"><b class="Fl" title="Fl" id="l">-l</b></a> <dt><a class="permalink" href="#n"><code class="Fl" id="n">-n</code></a>
<var class="Ar" title="Ar">licensee_id</var></dt> <var class="Ar">rom_version</var></dt>
<dd class="It-tag">Set the old licensee code, <i class="Ad">0x14B</i>, to a <dd>Set the ROM version, <span class="Ad">0x14C</span>, to a given value from
given value from 0 to 0xFF. This value is deprecated and should be set to 0 to 0xFF.</dd>
0x33 in all new software.</dd> <dt><a class="permalink" href="#p"><code class="Fl" id="p">-p</code></a>
<dt class="It-tag">&#x00A0;</dt> <var class="Ar">pad_value</var></dt>
<dd class="It-tag">&#x00A0;</dd> <dd>Pad the image to a valid size with a given pad value from 0 to 0xFF.
<dt class="It-tag"><a class="selflink" href="#m"><b class="Fl" title="Fl" id="m">-m</b></a> <code class="Nm">rgbfix</code> will automatically pick a size from 32KiB,
<var class="Ar" title="Ar">mbc_type</var></dt> 64KiB, 128KiB, ..., 8192KiB and give a warning thereafter. The cartridge
<dd class="It-tag">Set the MBC type, <i class="Ad">0x147</i>, to a given value size byte (<span class="Ad">0x148</span>) will be changed to reflect this
from 0 to 0xFF.</dd> new size.</dd>
<dt class="It-tag">&#x00A0;</dt> <dt><a class="permalink" href="#r"><code class="Fl" id="r">-r</code></a>
<dd class="It-tag">&#x00A0;</dd> <var class="Ar">ram_size</var></dt>
<dt class="It-tag"><a class="selflink" href="#n"><b class="Fl" title="Fl" id="n">-n</b></a> <dd>Set the RAM size, <span class="Ad">0x149</span>, to a given value from 0
<var class="Ar" title="Ar">rom_version</var></dt> to 0xFF.</dd>
<dd class="It-tag">Set the ROM version, <i class="Ad">0x14C</i>, to a given <dt><a class="permalink" href="#s"><code class="Fl" id="s">-s</code></a></dt>
value from 0 to 0xFF.</dd> <dd>Set the SGB flag: <span class="Ad">0x146</span> = 3.</dd>
<dt class="It-tag">&#x00A0;</dt> <dt><a class="permalink" href="#t"><code class="Fl" id="t">-t</code></a>
<dd class="It-tag">&#x00A0;</dd> <var class="Ar">title</var></dt>
<dt class="It-tag"><a class="selflink" href="#p"><b class="Fl" title="Fl" id="p">-p</b></a> <dd>Set the title string
<var class="Ar" title="Ar">pad_value</var></dt> (<span class="Ad">0x134</span>&#x2013;<span class="Ad">0x143</span>) to a
<dd class="It-tag">Pad the image to a valid size with a given pad value from 0 given string, truncated to at most 16 characters. It is recommended to use
to 0xFF. <b class="Nm" title="Nm">rgbfix</b> will automatically pick a 15 characters instead, to avoid clashing with the CGB flag
size from 32KiB, 64KiB, 128KiB, ..., 8192KiB and give a warning (<code class="Fl">-c</code> or <code class="Fl">-C</code>). If both this
thereafter. The cartridge size byte (<i class="Ad">0x148</i>) will be and the game ID are set, the game ID will overwrite the overlapping
changed to reflect this new size.</dd> portion of the title.</dd>
<dt class="It-tag">&#x00A0;</dt> <dt><a class="permalink" href="#V"><code class="Fl" id="V">-V</code></a></dt>
<dd class="It-tag">&#x00A0;</dd> <dd>Print the version of the program and exit.</dd>
<dt class="It-tag"><a class="selflink" href="#r"><b class="Fl" title="Fl" id="r">-r</b></a> <dt><a class="permalink" href="#v"><code class="Fl" id="v">-v</code></a></dt>
<var class="Ar" title="Ar">ram_size</var></dt> <dd>Equivalent to <code class="Fl">-f</code> <code class="Cm">lhg</code>.</dd>
<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">&#x00A0;</dt>
<dd class="It-tag">&#x00A0;</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">&#x00A0;</dt>
<dd class="It-tag">&#x00A0;</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>&#x2013;<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">&#x00A0;</dt>
<dd class="It-tag">&#x00A0;</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">&#x00A0;</dt>
<dd class="It-tag">&#x00A0;</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">Equivalent to <b class="Fl" title="Fl">-f</b>
<b class="Cm" title="Cm">lhg</b>.</dd>
</dl> </dl>
<h1 class="Sh" title="Sh" id="EXAMPLES"><a class="selflink" href="#EXAMPLES">EXAMPLES</a></h1> </section>
<section class="Sh">
<h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1>
Most values in the ROM header are only cosmetic. The bare minimum requirements 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 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 CGB/SGB flags. It is a good idea to pad the image to a valid size as well
(&#x201C;valid&#x201D; meaning a multiple of 32KiB). (&#x201C;valid&#x201D; meaning a multiple of 32KiB).
<div class="Pp"></div> <p class="Pp">The following will make a plain, no-color Game Boy game without
The following will make a plain, no-color Game Boy game without checking for a checking for a valid size:</p>
valid size: <p class="Pp"></p>
<div class="Pp"></div> <div class="Bd Bd-indent">$ rgbfix -v foo.gb</div>
<div class="D1">$ rgbfix -v foo.gb</div> <p class="Pp">The following will make a SGB-enabled, color-enabled game with a
<div class="Pp"></div> title of &#x201C;foobar&#x201D;, and pad it to a multiple of 32KiB. (The
The following will make a SGB-enabled, color-enabled game with a title of Game Boy itself does not use the title, but some emulators or ROM managers
&#x201C;foobar&#x201D;, and pad it to a multiple of 32KiB. (The Game Boy might.)</p>
itself does not use the title, but some emulators or ROM managers might.) <p class="Pp"></p>
<div class="Pp"></div> <div class="Bd Bd-indent">$ rgbfix -vcs -l 0x33 -p 0 -t foobar baz.gb</div>
<div class="D1">$ rgbfix -vcs -l 0x33 -p 0 -t foobar baz.gb</div> <p class="Pp">The following will duplicate the header (sans global checksum) of
<div class="Pp"></div> the game &#x201C;Survival Kids&#x201D;:</p>
The following will duplicate the header (sans global checksum) of the game <p class="Pp"></p>
&#x201C;Survival Kids&#x201D;: <div class="Bd Bd-indent">$ rgbfix -cjsv -k A4 -l 0x33 -m 0x1B -p 0xFF -r 3 -t
<div class="Pp"></div>
<div class="D1">$ rgbfix -cjsv -k A4 -l 0x33 -m 0x1B -p 0xFF -r 3 -t
SURVIVALKIDAVKE SurvivalKids.gbc</div> SURVIVALKIDAVKE SurvivalKids.gbc</div>
<h1 class="Sh" title="Sh" id="SEE_ALSO"><a class="selflink" href="#SEE_ALSO">SEE </section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1> ALSO</a></h1>
<a class="Xr" title="Xr">rgbasm(1)</a>, <a class="Xr" title="Xr">rgblink(1)</a>, <a class="Xr">rgbasm(1)</a>, <a class="Xr">rgblink(1)</a>,
<a class="Xr" title="Xr">rgbds(7)</a> <a class="Xr">rgbds(7)</a>
<h1 class="Sh" title="Sh" id="HISTORY"><a class="selflink" href="#HISTORY">HISTORY</a></h1> </section>
<b class="Nm" title="Nm">rgbfix</b> was originally released by Carsten <section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Nm">rgbfix</code> was originally released by Carsten
S&#x00F8;rensen as a standalone program called gbfix, and was later packaged S&#x00F8;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 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> <a class="Lk" href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>.
</section>
</div>
<table class="foot"> <table class="foot">
<tr> <tr>
<td class="foot-date">March 11, 2018</td> <td class="foot-date">March 11, 2018</td>

View File

@@ -1,13 +1,14 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<!-- This is an automatically generated file. Do not edit.
This file is part of RGBDS.
Copyright (c) 2013-2018, stag019 and RGBDS contributors.
SPDX-License-Identifier: MIT
-->
<head> <head>
<meta charset="utf-8"/> <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="mandoc.css" type="text/css" media="all"/> <link rel="stylesheet" href="mandoc.css" type="text/css" media="all"/>
<title>RGBGFX(1)</title> <title>RGBGFX(1)</title>
</head> </head>
@@ -20,151 +21,153 @@
</tr> </tr>
</table> </table>
<div class="manual-text"> <div class="manual-text">
<h1 class="Sh" title="Sh" id="NAME"><a class="selflink" href="#NAME">NAME</a></h1> <section class="Sh">
<b class="Nm" title="Nm">rgbgfx</b> &#x2014; <span class="Nd" title="Nd">Game <h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
Boy graphics converter</span> <code class="Nm">rgbgfx</code> &#x2014;
<h1 class="Sh" title="Sh" id="SYNOPSIS"><a class="selflink" href="#SYNOPSIS">SYNOPSIS</a></h1> <div class="Nd">Game Boy graphics converter</div>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<table class="Nm"> <table class="Nm">
<tr> <tr>
<td><b class="Nm" title="Nm">rgbgfx</b></td> <td><code class="Nm">rgbgfx</code></td>
<td>[<span class="Op"><b class="Fl" title="Fl">-DfFhPTVv</b></span>] <td>[<code class="Fl">-ADfFhmPTuVv</code>] [<code class="Fl">-o</code>
[<span class="Op"><b class="Fl" title="Fl">-o</b> <var class="Ar">outfile</var>] [<code class="Fl">-a</code>
<var class="Ar" title="Ar">outfile</var></span>] <var class="Ar">attrmap</var>] [<code class="Fl">-d</code>
[<span class="Op"><b class="Fl" title="Fl">-d</b> <var class="Ar">depth</var>] [<code class="Fl">-p</code>
<var class="Ar" title="Ar">depth</var></span>] <var class="Ar">palfile</var>] [<code class="Fl">-t</code>
[<span class="Op"><b class="Fl" title="Fl">-p</b> <var class="Ar">tilemap</var>] [<code class="Fl">-x</code>
<var class="Ar" title="Ar">palfile</var></span>] <var class="Ar">tiles</var>] <var class="Ar">file</var></td>
[<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> </tr>
</table> </table>
<h1 class="Sh" title="Sh" id="DESCRIPTION"><a class="selflink" href="#DESCRIPTION">DESCRIPTION</a></h1> </section>
The <b class="Nm" title="Nm">rgbgfx</b> program converts PNG images into the <section class="Sh">
Nintendo Game Boy's planar tile format. <h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<div style="height: 1.00em;">&#x00A0;</div> The <code class="Nm">rgbgfx</code> program converts PNG images into the Nintendo
The resulting colors and their palette indices are determined differently Game Boy's planar tile format.
depending on the input PNG file: <p class="Pp">The resulting colors and their palette indices are determined
differently depending on the input PNG file:</p>
<ul class="Bl-dash"> <ul class="Bl-dash">
<li class="It-dash">If the file has an embedded palette, that palette's color <li>If the file has an embedded palette, that palette's color and order are
and order are used.</li> used.</li>
<li class="It-dash">If not, and the image only contains shades of gray, rgbgfx <li>If not, and the image only contains shades of gray, rgbgfx maps them to
maps them to the indices appropriate for each shade. Any undetermined the indices appropriate for each shade. Any undetermined indices are set
indices are set to respective default shades of gray. For example: if the to respective default shades of gray. For example: if the bit depth is 2
bit depth is 2 and the image contains light gray and black, they become and the image contains light gray and black, they become the second and
the second and fourth colors - and the first and third colors get set to fourth colors - and the first and third colors get set to default white
default white and dark gray. If the image has multiple shades that map to and dark gray. If the image has multiple shades that map to the same
the same index, the palette is instead determined as if the image had index, the palette is instead determined as if the image had color.</li>
color.</li> <li>If the image has color (or the grayscale method failed), the colors are
<li class="It-dash">If the image has color (or the grayscale method failed), sorted from lightest to darkest.</li>
the colors are sorted from lightest to darkest.</li>
</ul> </ul>
<div style="height: 1.00em;">&#x00A0;</div> <p class="Pp">The input image may not contain more colors than the selected bit
The input image may not contain more colors than the selected bit depth allows. depth allows. Transparent pixels are set to palette index 0.</p>
Transparent pixels are set to palette index 0. </section>
<h1 class="Sh" title="Sh" id="ARGUMENTS"><a class="selflink" href="#ARGUMENTS">ARGUMENTS</a></h1> <section class="Sh">
<h1 class="Sh" id="ARGUMENTS"><a class="permalink" href="#ARGUMENTS">ARGUMENTS</a></h1>
<dl class="Bl-tag"> <dl class="Bl-tag">
<dt class="It-tag">&#x00A0;</dt> <dt><a class="permalink" href="#a"><code class="Fl" id="a">-a</code></a>
<dd class="It-tag">&#x00A0;</dd> <var class="Ar">attrmap</var></dt>
<dt class="It-tag"><a class="selflink" href="#D"><b class="Fl" title="Fl" id="D">-D</b></a></dt> <dd>Generate a file of tile mirroring attributes for OAM or (CGB-only)
<dd class="It-tag">Debug features are enabled.</dd> background tiles. For each tile in the input file, a byte is written
<dt class="It-tag">&#x00A0;</dt> representing the dimensions that the associated tile in the output file
<dd class="It-tag">&#x00A0;</dd> should be mirrored. Useful in combination with <code class="Fl">-m</code>
<dt class="It-tag"><a class="selflink" href="#f"><b class="Fl" title="Fl" id="f">-f</b></a></dt> to keep track the mirror direction of mirrored duplicate tiles.</dd>
<dd class="It-tag">Fix the input PNG file to be a correctly indexed <dt><a class="permalink" href="#A"><code class="Fl" id="A">-A</code></a></dt>
image.</dd> <dd>Same as <code class="Fl">-a</code>, but the attrmap file output name is
<dt class="It-tag">&#x00A0;</dt> made by taking the input filename, removing the file extension, and
<dd class="It-tag">&#x00A0;</dd> appending <span class="Pa">.attrmap</span>.</dd>
<dt class="It-tag"><a class="selflink" href="#F"><b class="Fl" title="Fl" id="F">-F</b></a></dt> <dt><a class="permalink" href="#D"><code class="Fl" id="D">-D</code></a></dt>
<dd class="It-tag">Same as <b class="Fl" title="Fl">-f</b>, but additionally, <dd>Debug features are enabled.</dd>
the supplied command line parameters are saved within the PNG and will be <dt><a class="permalink" href="#f"><code class="Fl" id="f">-f</code></a></dt>
loaded and automatically used next time.</dd> <dd>Fix the input PNG file to be a correctly indexed image.</dd>
<dt class="It-tag">&#x00A0;</dt> <dt><a class="permalink" href="#F"><code class="Fl" id="F">-F</code></a></dt>
<dd class="It-tag">&#x00A0;</dd> <dd>Same as <code class="Fl">-f</code>, but additionally, the supplied command
<dt class="It-tag"><a class="selflink" href="#d"><b class="Fl" title="Fl" id="d">-d</b></a> line parameters are saved within the PNG and will be loaded and
<var class="Ar" title="Ar">depth</var></dt> automatically used next time.</dd>
<dd class="It-tag">The bit depth of the output image (either 1 or 2). By <dt><a class="permalink" href="#d"><code class="Fl" id="d">-d</code></a>
default, the bit depth is 2 (two bits per pixel).</dd> <var class="Ar">depth</var></dt>
<dt class="It-tag">&#x00A0;</dt> <dd>The bit depth of the output image (either 1 or 2). By default, the bit
<dd class="It-tag">&#x00A0;</dd> depth is 2 (two bits per pixel).</dd>
<dt class="It-tag"><a class="selflink" href="#h"><b class="Fl" title="Fl" id="h">-h</b></a></dt> <dt><a class="permalink" href="#h"><code class="Fl" id="h">-h</code></a></dt>
<dd class="It-tag">Lay out tiles horizontally rather than vertically.</dd> <dd>Lay out tiles horizontally rather than vertically.</dd>
<dt class="It-tag">&#x00A0;</dt> <dt><a class="permalink" href="#m"><code class="Fl" id="m">-m</code></a></dt>
<dd class="It-tag">&#x00A0;</dd> <dd>Truncate tiles by checking for tiles that are mirrored versions of others
<dt class="It-tag"><a class="selflink" href="#o"><b class="Fl" title="Fl" id="o">-o</b></a> and omitting these from the output file. Useful with tilemaps and attrmaps
<var class="Ar" title="Ar">outfile</var></dt> together to keep track of the duplicated tiles and the dimension mirrored.
<dd class="It-tag">The name of the output file.</dd> Tiles are checked for horizontal, vertical, and horizontal-vertical
<dt class="It-tag">&#x00A0;</dt> mirroring. Implies <code class="Fl">-u</code>.</dd>
<dd class="It-tag">&#x00A0;</dd> <dt><a class="permalink" href="#o"><code class="Fl" id="o">-o</code></a>
<dt class="It-tag"><a class="selflink" href="#p"><b class="Fl" title="Fl" id="p">-p</b></a> <var class="Ar">outfile</var></dt>
<var class="Ar" title="Ar">palfile</var></dt> <dd>The name of the output file.</dd>
<dd class="It-tag">Output the image's palette in standard GBC palette format - <dt><a class="permalink" href="#p"><code class="Fl" id="p">-p</code></a>
bytes (8 bytes for two bits per pixel, 4 bytes for one bit per pixel) <var class="Ar">palfile</var></dt>
containing the RGB15 values in little-endian byte order. If the palette <dd>Output the image's palette in standard GBC palette format - bytes (8 bytes
contains too few colors, the remaining entries are set to black.</dd> for two bits per pixel, 4 bytes for one bit per pixel) containing the
<dt class="It-tag">&#x00A0;</dt> RGB15 values in little-endian byte order. If the palette contains too few
<dd class="It-tag">&#x00A0;</dd> colors, the remaining entries are set to black.</dd>
<dt class="It-tag"><a class="selflink" href="#P"><b class="Fl" title="Fl" id="P">-P</b></a></dt> <dt><a class="permalink" href="#P"><code class="Fl" id="P">-P</code></a></dt>
<dd class="It-tag">Same as <b class="Fl" title="Fl">-p</b>, but the palette <dd>Same as <code class="Fl">-p</code>, but the palette file output name is
file output name is made by taking the input PNG file's filename, removing made by taking the input PNG file's filename, removing the file extension,
the file extension, and appending <i class="Pa" title="Pa">.pal</i>.</dd> and appending <span class="Pa">.pal</span>.</dd>
<dt class="It-tag">&#x00A0;</dt> <dt><a class="permalink" href="#t"><code class="Fl" id="t">-t</code></a>
<dd class="It-tag">&#x00A0;</dd> <var class="Ar">tilemap</var></dt>
<dt class="It-tag"><a class="selflink" href="#t"><b class="Fl" title="Fl" id="t">-t</b></a> <dd>Generate a file of tile indices. For each tile in the input file, a byte
<var class="Ar" title="Ar">mapfile</var></dt> is written representing the index of the associated tile in the output
<dd class="It-tag">If any tiles are the same, don't place the repeat tiles in file. Useful in combination with <code class="Fl">-u</code> or
the output file, and make a tilemap file.</dd> <code class="Fl">-m</code> to keep track of duplicate tiles.</dd>
<dt class="It-tag">&#x00A0;</dt> <dt><a class="permalink" href="#T"><code class="Fl" id="T">-T</code></a></dt>
<dd class="It-tag">&#x00A0;</dd> <dd>Same as <code class="Fl">-t</code>, but the tilemap file output name is
<dt class="It-tag"><a class="selflink" href="#T"><b class="Fl" title="Fl" id="T">-T</b></a></dt> made by taking the input filename, removing the file extension, and
<dd class="It-tag">Same as <b class="Fl" title="Fl">-t</b>, but the tilemap appending <span class="Pa">.tilemap</span>.</dd>
file output name is made by taking the input filename, removing the file <dt><a class="permalink" href="#u"><code class="Fl" id="u">-u</code></a></dt>
extension, and appending <i class="Pa" title="Pa">.tilemap</i>.</dd> <dd>Truncate tiles by checking for tiles that are exact duplicates of others
<dt class="It-tag">&#x00A0;</dt> and omitting these from the output file. Useful with tilemaps to keep
<dd class="It-tag">&#x00A0;</dd> track of the duplicated tiles.</dd>
<dt class="It-tag"><a class="selflink" href="#u"><b class="Fl" title="Fl" id="u">-u</b></a></dt> <dt><a class="permalink" href="#V"><code class="Fl" id="V">-V</code></a></dt>
<dd class="It-tag">Truncate repeated tiles. Useful with tilemaps.</dd> <dd>Print the version of the program and exit.</dd>
<dt class="It-tag">&#x00A0;</dt> <dt><a class="permalink" href="#v"><code class="Fl" id="v">-v</code></a></dt>
<dd class="It-tag">&#x00A0;</dd> <dd>Verbose. Print errors when the command line parameters and the parameters
<dt class="It-tag"><a class="selflink" href="#V"><b class="Fl" title="Fl" id="V">-V</b></a></dt> in the PNG file don't match.</dd>
<dd class="It-tag">Print the version of the program and exit.</dd> <dt><a class="permalink" href="#x"><code class="Fl" id="x">-x</code></a>
<dt class="It-tag">&#x00A0;</dt> <var class="Ar">tiles</var></dt>
<dd class="It-tag">&#x00A0;</dd> <dd>Trim the end of the output file by this many tiles.</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">&#x00A0;</dt>
<dd class="It-tag">&#x00A0;</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> </dl>
<h1 class="Sh" title="Sh" id="EXAMPLES"><a class="selflink" href="#EXAMPLES">EXAMPLES</a></h1> </section>
<section class="Sh">
<h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1>
The following will take a PNG file with a bit depth of 1, 2, or 8, and output The following will take a PNG file with a bit depth of 1, 2, or 8, and output
planar 2bpp data: planar 2bpp data:
<div class="Pp"></div> <p class="Pp"></p>
<div class="D1">$ rgbgfx -o out.2bpp in.png</div> <div class="Bd Bd-indent">$ rgbgfx -o out.2bpp in.png</div>
<div class="Pp"></div> <p class="Pp">The following creates a planar 2bpp file with only unique tiles,
The following creates a planar 2bpp file with only unique tiles, and its tilemap and its tilemap <span class="Pa">out.tilemap</span>:</p>
<i class="Pa" title="Pa">out.tilemap</i>: <p class="Pp"></p>
<div class="Pp"></div> <div class="Bd Bd-indent">$ rgbgfx -T -u -o out.2bpp in.png</div>
<div class="D1">$ rgbgfx -T -u -o out.2bpp in.png</div> <p class="Pp">The following creates a planar 2bpp file with only unique tiles
<div class="Pp"></div> (accounting for tile mirroring) and its associated tilemap
The following will do nothing: <span class="Pa">out.tilemap</span> and attrmap
<div class="Pp"></div> <span class="Pa">out.attrmap</span>:</p>
<div class="D1">$ rgbgfx in.png</div> <p class="Pp"></p>
<h1 class="Sh" title="Sh" id="SEE_ALSO"><a class="selflink" href="#SEE_ALSO">SEE <div class="Bd Bd-indent">$ rgbgfx -A -T -m -o out.2bpp in.png</div>
<p class="Pp">The following will do nothing:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent">$ rgbgfx in.png</div>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1> ALSO</a></h1>
<a class="Xr" title="Xr">rgbds(7)</a>, <a class="Xr" title="Xr">rgbasm(1)</a>, <a class="Xr">rgbds(7)</a>, <a class="Xr">rgbasm(1)</a>,
<a class="Xr" title="Xr">rgblink(1)</a>, <a class="Xr">rgblink(1)</a>, <a class="Xr">rgbfix(1)</a>,
<a class="Xr" title="Xr">rgbfix(1)</a>, <a class="Xr" title="Xr">gbz80(7)</a> <a class="Xr">gbz80(7)</a>
<h1 class="Sh" title="Sh" id="HISTORY"><a class="selflink" href="#HISTORY">HISTORY</a></h1> </section>
<b class="Nm" title="Nm">rgbgfx</b> was created by <section class="Sh">
<span class="An" title="An">stag019</span> to be included in RGBDS. It is now <h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
maintained by a number of contributors at <code class="Nm">rgbgfx</code> was created by <span class="An">stag019</span> to
<a class="Lk" title="Lk" href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>.</div> be included in RGBDS. It is now maintained by a number of contributors at
<a class="Lk" href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>.
</section>
</div>
<table class="foot"> <table class="foot">
<tr> <tr>
<td class="foot-date">January 26, 2018</td> <td class="foot-date">January 26, 2018</td>

View File

@@ -1,13 +1,14 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<!-- This is an automatically generated file. Do not edit.
This file is part of RGBDS.
Copyright (c) 2010-2018, Anthony J. Bentley and RGBDS contributors.
SPDX-License-Identifier: MIT
-->
<head> <head>
<meta charset="utf-8"/> <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="mandoc.css" type="text/css" media="all"/> <link rel="stylesheet" href="mandoc.css" type="text/css" media="all"/>
<title>RGBLINK(1)</title> <title>RGBLINK(1)</title>
</head> </head>
@@ -20,137 +21,113 @@
</tr> </tr>
</table> </table>
<div class="manual-text"> <div class="manual-text">
<h1 class="Sh" title="Sh" id="NAME"><a class="selflink" href="#NAME">NAME</a></h1> <section class="Sh">
<b class="Nm" title="Nm">rgblink</b> &#x2014; <span class="Nd" title="Nd">Game <h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
Boy linker</span> <code class="Nm">rgblink</code> &#x2014;
<h1 class="Sh" title="Sh" id="SYNOPSIS"><a class="selflink" href="#SYNOPSIS">SYNOPSIS</a></h1> <div class="Nd">Game Boy linker</div>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<table class="Nm"> <table class="Nm">
<tr> <tr>
<td><b class="Nm" title="Nm">rgblink</b></td> <td><code class="Nm">rgblink</code></td>
<td>[<span class="Op"><b class="Fl" title="Fl">-dtVw</b></span>] <td>[<code class="Fl">-dtVw</code>] [<code class="Fl">-m</code>
[<span class="Op"><b class="Fl" title="Fl">-m</b> <var class="Ar">mapfile</var>] [<code class="Fl">-n</code>
<var class="Ar" title="Ar">mapfile</var></span>] <var class="Ar">symfile</var>] [<code class="Fl">-O</code>
[<span class="Op"><b class="Fl" title="Fl">-n</b> <var class="Ar">overlayfile</var>] [<code class="Fl">-o</code>
<var class="Ar" title="Ar">symfile</var></span>] <var class="Ar">outfile</var>] [<code class="Fl">-p</code>
[<span class="Op"><b class="Fl" title="Fl">-O</b> <var class="Ar">pad_value</var>] [<code class="Fl">-s</code>
<var class="Ar" title="Ar">overlayfile</var></span>] <var class="Ar">symbol</var>] [<code class="Fl">-l</code>
[<span class="Op"><b class="Fl" title="Fl">-o</b> <var class="Ar">linkerscript</var>] <var class="Ar">file ...</var></td>
<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> </tr>
</table> </table>
<h1 class="Sh" title="Sh" id="DESCRIPTION"><a class="selflink" href="#DESCRIPTION">DESCRIPTION</a></h1> </section>
The <b class="Nm" title="Nm">rgblink</b> program links objects created by <section class="Sh">
<a class="Xr" title="Xr">rgbasm(1)</a> into a single Game Boy ROM file. <h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<div class="Pp"></div> The <code class="Nm">rgblink</code> program links objects created by
By default, ROM0 sections created by the assembler are placed in the 16KiB bank <a class="Xr">rgbasm(1)</a> into a single Game Boy ROM file.
0, and ROMX sections are placed in any bank except bank 0. If your ROM will <p class="Pp">By default, ROM0 sections created by the assembler are placed in
only be 32KiB, you can use the <b class="Fl" title="Fl">-t</b> option to the 16KiB bank 0, and ROMX sections are placed in any bank except bank 0. If
override this. your ROM will only be 32KiB, you can use the <code class="Fl">-t</code>
<div class="Pp"></div> option to override this.</p>
Similarly, WRAM0 sections are placed in the first 4KiB of WRAM bank 0 and WRAMX <p class="Pp">Similarly, WRAM0 sections are placed in the first 4KiB of WRAM
sections are placed in any bank except bank 0. If your ROM doesn't use banked bank 0 and WRAMX sections are placed in any bank except bank 0. If your ROM
WRAM you can use option <b class="Fl" title="Fl">-w</b> option to override doesn't use banked WRAM you can use option <code class="Fl">-w</code> option
this. to override this.</p>
<div class="Pp"></div> <p class="Pp">Also, if your ROM is designed for DMG, you can make sure that you
Also, if your ROM is designed for DMG, you can make sure that you don't use any don't use any prohibited section by using the option
prohibited section by using the option <b class="Fl" title="Fl">-d</b>, which <code class="Fl">-d</code>, which implies <code class="Fl">-w</code> but
implies <b class="Fl" title="Fl">-w</b> but also prohibits the use of VRAM also prohibits the use of VRAM bank 1.</p>
bank 1. <p class="Pp">The arguments are as follows:</p>
<div class="Pp"></div>
The arguments are as follows:
<dl class="Bl-tag"> <dl class="Bl-tag">
<dt class="It-tag">&#x00A0;</dt> <dt><a class="permalink" href="#m"><code class="Fl" id="m">-m</code></a>
<dd class="It-tag">&#x00A0;</dd> <var class="Ar">mapfile</var></dt>
<dt class="It-tag"><a class="selflink" href="#m"><b class="Fl" title="Fl" id="m">-m</b></a> <dd>Write a mapfile to the given filename.</dd>
<var class="Ar" title="Ar">mapfile</var></dt> <dt><a class="permalink" href="#n"><code class="Fl" id="n">-n</code></a>
<dd class="It-tag">Write a mapfile to the given filename.</dd> <var class="Ar">symfile</var></dt>
<dt class="It-tag">&#x00A0;</dt> <dd>Write a symbol file to the given filename.</dd>
<dd class="It-tag">&#x00A0;</dd> <dt><a class="permalink" href="#O"><code class="Fl" id="O">-O</code></a>
<dt class="It-tag"><a class="selflink" href="#n"><b class="Fl" title="Fl" id="n">-n</b></a> <var class="Ar">overlayfile</var></dt>
<var class="Ar" title="Ar">symfile</var></dt> <dd>The ROM image to overlay sections over. When an overlay ROM is provided,
<dd class="It-tag">Write a symbol file to the given filename.</dd> all sections must be fixed. This may be used to patch an existing
<dt class="It-tag">&#x00A0;</dt> binary.</dd>
<dd class="It-tag">&#x00A0;</dd> <dt><a class="permalink" href="#o"><code class="Fl" id="o">-o</code></a>
<dt class="It-tag"><a class="selflink" href="#O"><b class="Fl" title="Fl" id="O">-O</b></a> <var class="Ar">outfile</var></dt>
<var class="Ar" title="Ar">overlayfile</var></dt> <dd>Write ROM image to the given filename.</dd>
<dd class="It-tag">The ROM image to overlay sections over. When an overlay ROM <dt><a class="permalink" href="#p"><code class="Fl" id="p">-p</code></a>
is provided, all sections must be fixed. This may be used to patch an <var class="Ar">pad_value</var></dt>
existing binary.</dd> <dd>When padding an image, pad with this value. The default is 0x00.</dd>
<dt class="It-tag">&#x00A0;</dt> <dt><a class="permalink" href="#s"><code class="Fl" id="s">-s</code></a>
<dd class="It-tag">&#x00A0;</dd> <var class="Ar">symbol</var></dt>
<dt class="It-tag"><a class="selflink" href="#o"><b class="Fl" title="Fl" id="o">-o</b></a> <dd>???</dd>
<var class="Ar" title="Ar">outfile</var></dt> <dt><a class="permalink" href="#w"><code class="Fl" id="w">-w</code></a></dt>
<dd class="It-tag">Write ROM image to the given filename.</dd> <dd>Expand the WRAM0 section size from 4KiB to the full 8KiB assigned to WRAM
<dt class="It-tag">&#x00A0;</dt> and prohibit the use of WRAMX sections.</dd>
<dd class="It-tag">&#x00A0;</dd> <dt><a class="permalink" href="#d"><code class="Fl" id="d">-d</code></a></dt>
<dt class="It-tag"><a class="selflink" href="#p"><b class="Fl" title="Fl" id="p">-p</b></a> <dd>Enable DMG mode. Prohibit the use of sections that doesn't exist on a DMG,
<var class="Ar" title="Ar">pad_value</var></dt> such as WRAMX and VRAM bank 1. This option automatically enables
<dd class="It-tag">When padding an image, pad with this value. The default is <code class="Fl">-w</code>.</dd>
0x00.</dd> <dt><a class="permalink" href="#t"><code class="Fl" id="t">-t</code></a></dt>
<dt class="It-tag">&#x00A0;</dt> <dd>Expand the ROM0 section size from 16KiB to the full 32KiB assigned to ROM
<dd class="It-tag">&#x00A0;</dd> and prohibit the use of ROMX sections. Useful for ROMs that fit in 32
<dt class="It-tag"><a class="selflink" href="#s"><b class="Fl" title="Fl" id="s">-s</b></a> KiB.</dd>
<var class="Ar" title="Ar">symbol</var></dt> <dt><a class="permalink" href="#l"><code class="Fl" id="l">-l</code></a>
<dd class="It-tag">???</dd> <var class="Ar">linkerscript</var></dt>
<dt class="It-tag">&#x00A0;</dt> <dd>Specify a linkerscript file that tells the linker how sections must be
<dd class="It-tag">&#x00A0;</dd> placed in the ROM. This file has priority over the attributes assigned in
<dt class="It-tag"><a class="selflink" href="#w"><b class="Fl" title="Fl" id="w">-w</b></a></dt> the source code, but they have to be consistent. See
<dd class="It-tag">Expand the WRAM0 section size from 4KiB to the full 8KiB <a class="Xr">rgblink(5)</a> for more information about its format.</dd>
assigned to WRAM and prohibit the use of WRAMX sections.</dd> <dt><a class="permalink" href="#V"><code class="Fl" id="V">-V</code></a></dt>
<dt class="It-tag">&#x00A0;</dt> <dd>Print the version of the program and exit.</dd>
<dd class="It-tag">&#x00A0;</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">&#x00A0;</dt>
<dd class="It-tag">&#x00A0;</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">&#x00A0;</dt>
<dd class="It-tag">&#x00A0;</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">&#x00A0;</dt>
<dd class="It-tag">&#x00A0;</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> </dl>
<h1 class="Sh" title="Sh" id="EXAMPLES"><a class="selflink" href="#EXAMPLES">EXAMPLES</a></h1> </section>
<section class="Sh">
<h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1>
All you need for a basic ROM is an object file, which can be made into a ROM All you need for a basic ROM is an object file, which can be made into a ROM
image like so: image like so:
<div class="Pp"></div> <p class="Pp"></p>
<div class="D1">$ rgblink -o bar.gb foo.o</div> <div class="Bd Bd-indent">$ rgblink -o bar.gb foo.o</div>
<div class="Pp"></div> <p class="Pp">The resulting bar.gb will not have correct checksums (unless you
The resulting bar.gb will not have correct checksums (unless you put them in the put them in the assembly source). You should use <a class="Xr">rgbfix(1)</a>
assembly source). You should use <a class="Xr" title="Xr">rgbfix(1)</a> to fix to fix these so that the program will actually run in a Game Boy:</p>
these so that the program will actually run in a Game Boy: <p class="Pp"></p>
<div class="Pp"></div> <div class="Bd Bd-indent">$ rgbfix -v bar.gb</div>
<div class="D1">$ rgbfix -v bar.gb</div> </section>
<h1 class="Sh" title="Sh" id="SEE_ALSO"><a class="selflink" href="#SEE_ALSO">SEE <section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1> ALSO</a></h1>
<a class="Xr" title="Xr">rgbasm(1)</a>, <a class="Xr" title="Xr">rgblink(5)</a>, <a class="Xr">rgbasm(1)</a>, <a class="Xr">rgblink(5)</a>,
<a class="Xr" title="Xr">rgbfix(1)</a>, <a class="Xr" title="Xr">rgbds(5)</a>, <a class="Xr">rgbfix(1)</a>, <a class="Xr">rgbds(5)</a>,
<a class="Xr" title="Xr">rgbds(7)</a> <a class="Xr">rgbds(7)</a>
<h1 class="Sh" title="Sh" id="HISTORY"><a class="selflink" href="#HISTORY">HISTORY</a></h1> </section>
<b class="Nm" title="Nm">rgblink</b> was originally written by Carsten <section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Nm">rgblink</code> was originally written by Carsten
S&#x00F8;rensen as part of the ASMotor package, and was later packaged in S&#x00F8;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 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> <a class="Lk" href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>.
</section>
</div>
<table class="foot"> <table class="foot">
<tr> <tr>
<td class="foot-date">January 26, 2018</td> <td class="foot-date">January 26, 2018</td>

View File

@@ -1,13 +1,14 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<!-- This is an automatically generated file. Do not edit.
This file is part of RGBDS.
Copyright (c) 2017-2018, Antonio Nino Diaz and RGBDS contributors.
SPDX-License-Identifier: MIT
-->
<head> <head>
<meta charset="utf-8"/> <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="mandoc.css" type="text/css" media="all"/> <link rel="stylesheet" href="mandoc.css" type="text/css" media="all"/>
<title>RGBLINK(5)</title> <title>RGBLINK(5)</title>
</head> </head>
@@ -20,81 +21,80 @@
</tr> </tr>
</table> </table>
<div class="manual-text"> <div class="manual-text">
<h1 class="Sh" title="Sh" id="NAME"><a class="selflink" href="#NAME">NAME</a></h1> <section class="Sh">
<b class="Nm" title="Nm">rgblink</b> &#x2014; <h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<span class="Nd" title="Nd">linkerscript file format</span> <code class="Nm">rgblink</code> &#x2014;
<h1 class="Sh" title="Sh" id="DESCRIPTION"><a class="selflink" href="#DESCRIPTION">DESCRIPTION</a></h1> <div class="Nd">linkerscript file format</div>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The linkerscript is an external file that allows the user to specify the order 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. of sections without the need for doing so before assembling each object file.
<div class="Pp"></div> <p class="Pp">The placement of sections specified in the linkerscript is done
The placement of sections specified in the linkerscript is done before the before the sections whose placement is defined in the source code.</p>
sections whose placement is defined in the source code. <p class="Pp">A linkerscript consists on a series of banks followed by a list of
<div class="Pp"></div> sections and, optionally, commands. They can be lowercase or uppercase, it
A linkerscript consists on a series of banks followed by a list of sections and, is ignored. Any line can contain a comment starting with
optionally, commands. They can be lowercase or uppercase, it is ignored. Any &#x2018;<code class="Li">;</code>&#x2019; that ends at the end of the
line can contain a comment starting with line:</p>
&#x2018;<code class="Li">;</code>&#x2019; that ends at the end of the line: <div class="Bd Pp Bd-indent">
<div class="Pp"></div> <pre>
<div class="Bd" style="margin-left: 5.00ex;"> ROMX $F ; This is a comment
<pre class="Li"> &quot;Functions to read array&quot;
ROMX $F ; This is a comment ALIGN 8
&quot;Functions to read array&quot; &quot;Array aligned to 256 bytes&quot;
ALIGN 8
&quot;Array aligned to 256 bytes&quot; WRAMX 2
WRAMX 2
&quot;Some variables&quot; &quot;Some variables&quot;
</pre> </pre>
</div> </div>
<div class="Pp"></div> <p class="Pp">Numbers can be in decimal or hexadecimal format (the prefix is
Numbers can be in decimal or hexadecimal format (the prefix is &#x2018;<code class="Li">$</code>&#x2019;). It is an error if any section
&#x2018;<code class="Li">$</code>&#x2019;). It is an error if any section name name or command are found before setting a bank.</p>
or command are found before setting a bank. <p class="Pp">Files can be included by using the <var class="Ar">INCLUDE</var>
<div class="Pp"></div> keyword followed by a string with the path of the file that has to be
Files can be included by using the <var class="Ar" title="Ar">INCLUDE</var> included.</p>
keyword followed by a string with the path of the file that has to be <p class="Pp">The possible bank types are: <b class="Sy">ROM0</b>,
included. <b class="Sy">ROMX</b>, <b class="Sy">VRAM</b>, <b class="Sy">WRAM0</b>,
<div class="Pp"></div> <b class="Sy">WRAMX</b>, <b class="Sy">OAM</b> and <b class="Sy">HRAM</b>.
The possible bank types are: <b class="Sy" title="Sy">ROM0</b>, Types <b class="Sy">ROMX</b>, <b class="Sy">VRAM</b>,
<b class="Sy" title="Sy">ROMX</b>, <b class="Sy" title="Sy">VRAM</b>, <b class="Sy">WRAMX</b> and <b class="Sy">SRAM</b> are banked, which means
<b class="Sy" title="Sy">WRAM0</b>, <b class="Sy" title="Sy">WRAMX</b>, that it is needed to specify a bank after the type.</p>
<b class="Sy" title="Sy">OAM</b> and <b class="Sy" title="Sy">HRAM</b>. Types <p class="Pp">When a new bank statement is found, sections found after it will
<b class="Sy" title="Sy">ROMX</b>, <b class="Sy" title="Sy">VRAM</b>, be placed right from the beginning of that bank. If the linkerscript
<b class="Sy" title="Sy">WRAMX</b> and <b class="Sy" title="Sy">SRAM</b> are switches to a different bank and then it comes back to the previous one it
banked, which means that it is needed to specify a bank after the type. will continue from the last address that was used.</p>
<div class="Pp"></div> <p class="Pp">The only two commands are <var class="Ar">ORG</var> and
When a new bank statement is found, sections found after it will be placed right <var class="Ar">ALIGN</var>:</p>
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"> <ul class="Bl-bullet">
<li class="It-bullet"><var class="Ar" title="Ar">ORG</var> sets the address in <li><var class="Ar">ORG</var> sets the address in which new sections will be
which new sections will be placed. It can not be lower than the current placed. It can not be lower than the current address.</li>
address.</li> <li><var class="Ar">ALIGN</var> will increase the address until it is aligned
<li class="It-bullet"><var class="Ar" title="Ar">ALIGN</var> will increase the to the specified boundary (it tries to set to 0 the number of bits
address until it is aligned to the specified boundary (it tries to set to specified after the command: <b class="Sy">ALIGN 8</b> will align to
0 the number of bits specified after the command: $100).</li>
<b class="Sy" title="Sy">ALIGN 8</b> will align to $100).</li>
</ul> </ul>
<div class="Pp"></div> <p class="Pp">Note: The bank, alignment, address and type of sections can be
Note: The bank, alignment, address and type of sections can be specified both in specified both in the source code and in the linkerscript. For a section to
the source code and in the linkerscript. For a section to be able to be placed be able to be placed with the linkerscript the bank must be left unassigned
with the linkerscript the bank must be left unassigned in the source code or in the source code or be the same as the one specified in the linkerscript.
be the same as the one specified in the linkerscript. The address and The address and alignment musn't be set.</p>
alignment musn't be set. </section>
<h1 class="Sh" title="Sh" id="SEE_ALSO"><a class="selflink" href="#SEE_ALSO">SEE <section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1> ALSO</a></h1>
<a class="Xr" title="Xr">rgbasm(1)</a>, <a class="Xr" title="Xr">rgblink(1)</a>, <a class="Xr">rgbasm(1)</a>, <a class="Xr">rgblink(1)</a>,
<a class="Xr" title="Xr">rgbfix(1)</a>, <a class="Xr" title="Xr">rgbds(5)</a>, <a class="Xr">rgbfix(1)</a>, <a class="Xr">rgbds(5)</a>,
<a class="Xr" title="Xr">rgbds(7)</a> <a class="Xr">rgbds(7)</a>
<h1 class="Sh" title="Sh" id="HISTORY"><a class="selflink" href="#HISTORY">HISTORY</a></h1> </section>
<b class="Nm" title="Nm">rgblink</b> was originally written by Carsten <section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Nm">rgblink</code> was originally written by Carsten
S&#x00F8;rensen as part of the ASMotor package, and was later packaged in S&#x00F8;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 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> <a class="Lk" href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>.
</section>
</div>
<table class="foot"> <table class="foot">
<tr> <tr>
<td class="foot-date">January 27, 2018</td> <td class="foot-date">January 27, 2018</td>