mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Get rid of in-repo HTML documentation
The online documentation is now managed by a CI hook
This commit is contained in:
2
.github/actions/get-pages.sh
vendored
2
.github/actions/get-pages.sh
vendored
@@ -77,7 +77,7 @@ EOF
|
||||
if [ $stem = rgbasm.5 ]; then
|
||||
options+=,toc
|
||||
fi
|
||||
mandoc -Thtml -I os=Linux -O$options "${PAGES[$page]##*/}" | src/doc_postproc.awk >> "$1/$2/$page"
|
||||
mandoc -Thtml -I os=Linux -O$options "${PAGES[$page]##*/}" | .github/actions/doc_postproc.awk >> "$1/$2/$page"
|
||||
if [ $update_redirects -ne 0 ]; then
|
||||
cat - >"$1/$page" <<EOF
|
||||
---
|
||||
|
||||
28
Makefile
28
Makefile
@@ -128,8 +128,7 @@ rgbgfx: ${rgbgfx_obj}
|
||||
.c.o:
|
||||
$Q${CC} ${REALCFLAGS} ${PNGCFLAGS} -c -o $@ $<
|
||||
|
||||
# Target used to remove all files generated by other Makefile targets, except
|
||||
# for the html documentation.
|
||||
# Target used to remove all files generated by other Makefile targets
|
||||
|
||||
clean:
|
||||
$Q${RM} rgbasm rgbasm.exe
|
||||
@@ -140,15 +139,6 @@ clean:
|
||||
$Q${RM} rgbshim.sh
|
||||
$Q${RM} src/asm/asmy.c src/asm/asmy.h
|
||||
|
||||
# Target used to remove all html files generated by the wwwman target
|
||||
|
||||
cleanwwwman:
|
||||
$Q${RM} docs/rgbds.7.html docs/gbz80.7.html docs/rgbds.5.html
|
||||
$Q${RM} docs/rgbasm.1.html docs/rgbasm.5.html
|
||||
$Q${RM} docs/rgblink.1.html docs/rgblink.5.html
|
||||
$Q${RM} docs/rgbfix.1.html
|
||||
$Q${RM} docs/rgbgfx.1.html
|
||||
|
||||
# Target used to install the binaries and man pages.
|
||||
|
||||
install: all
|
||||
@@ -192,22 +182,6 @@ checkpatch:
|
||||
| ${CHECKPATCH} - || true; \
|
||||
done
|
||||
|
||||
# Target for the project maintainer to easily create web manuals.
|
||||
# It relies on mandoc: http://mdocml.bsd.lv
|
||||
|
||||
MANDOC := -Thtml -Ios=General -Oman=%N.%S.html -Ostyle=mandoc.css
|
||||
|
||||
wwwman:
|
||||
$Qmandoc ${MANDOC} src/rgbds.7 | src/doc_postproc.awk > docs/rgbds.7.html
|
||||
$Qmandoc ${MANDOC} src/gbz80.7 | src/doc_postproc.awk > docs/gbz80.7.html
|
||||
$Qmandoc ${MANDOC} src/rgbds.5 | src/doc_postproc.awk > docs/rgbds.5.html
|
||||
$Qmandoc ${MANDOC} src/asm/rgbasm.1 | src/doc_postproc.awk > docs/rgbasm.1.html
|
||||
$Qmandoc ${MANDOC} src/asm/rgbasm.5 | src/doc_postproc.awk > docs/rgbasm.5.html
|
||||
$Qmandoc ${MANDOC} src/fix/rgbfix.1 | src/doc_postproc.awk > docs/rgbfix.1.html
|
||||
$Qmandoc ${MANDOC} src/link/rgblink.1 | src/doc_postproc.awk > docs/rgblink.1.html
|
||||
$Qmandoc ${MANDOC} src/link/rgblink.5 | src/doc_postproc.awk > docs/rgblink.5.html
|
||||
$Qmandoc ${MANDOC} src/gfx/rgbgfx.1 | src/doc_postproc.awk > docs/rgbgfx.1.html
|
||||
|
||||
# This target is used during development in order to prevent adding new issues
|
||||
# to the source code. All warnings are treated as errors in order to block the
|
||||
# compilation and make the continous integration infrastructure return failure.
|
||||
|
||||
1670
docs/gbz80.7.html
1670
docs/gbz80.7.html
File diff suppressed because it is too large
Load Diff
@@ -1,36 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<title>General Information</title>
|
||||
<link rel="stylesheet" type="text/css" href="mandoc.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>RGBDS — Rednex Game Boy Development System</h1>
|
||||
<h2>Table of Contents</h2>
|
||||
<ol>
|
||||
<li>General information
|
||||
<ul>
|
||||
<li><a href="rgbds.7.html">RGBDS general information</a></li>
|
||||
<li><a href="rgbds.5.html">RGBDS object file format</a></li>
|
||||
</ul>
|
||||
<li>Language description
|
||||
<ul>
|
||||
<li><a href="rgbasm.5.html">RGBASM language description</a></li>
|
||||
<li><a href="rgblink.5.html">RGBLINK linkerscript language description</a></li>
|
||||
<li><a href="gbz80.7.html">GBZ80 CPU instruction set description</a></li>
|
||||
</ul>
|
||||
<li>Command line usage
|
||||
<ul>
|
||||
<li><a href="rgbasm.1.html">RGBASM command-line usage</a></li>
|
||||
<li><a href="rgblink.1.html">RGBLINK command-line usage</a></li>
|
||||
<li><a href="rgbfix.1.html">RGBFIX command-line usage</a></li>
|
||||
<li><a href="rgbgfx.1.html">RGBGFX command-line usage</a></li>
|
||||
</ul>
|
||||
</ol>
|
||||
<h2 id="GitHub Repository">GitHub Repository:</h2>
|
||||
<ul>
|
||||
<li><a href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
347
docs/mandoc.css
347
docs/mandoc.css
@@ -1,347 +0,0 @@
|
||||
/* $Id: mandoc.css,v 1.45 2019/03/01 10:57:18 schwarze Exp $ */
|
||||
/*
|
||||
* Standard style sheet for mandoc(1) -Thtml and man.cgi(8).
|
||||
*
|
||||
* Written by Ingo Schwarze <schwarze@openbsd.org>.
|
||||
* I place this file into the public domain.
|
||||
* Permission to use, copy, modify, and distribute it for any purpose
|
||||
* with or without fee is hereby granted, without any conditions.
|
||||
*/
|
||||
|
||||
/* Global defaults. */
|
||||
|
||||
html { max-width: 65em; }
|
||||
body { font-family: Helvetica,Arial,sans-serif; }
|
||||
table { margin-top: 0em;
|
||||
margin-bottom: 0em;
|
||||
border-collapse: collapse; }
|
||||
/* Some browsers set border-color in a browser style for tbody,
|
||||
* but not for table, resulting in inconsistent border styling. */
|
||||
tbody { border-color: inherit; }
|
||||
tr { border-color: inherit; }
|
||||
td { vertical-align: top;
|
||||
padding-left: 0.2em;
|
||||
padding-right: 0.2em;
|
||||
border-color: inherit; }
|
||||
ul, ol, dl { margin-top: 0em;
|
||||
margin-bottom: 0em; }
|
||||
li, dt { margin-top: 1em; }
|
||||
|
||||
.permalink { border-bottom: thin dotted;
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
text-decoration: inherit; }
|
||||
* { clear: both }
|
||||
|
||||
/* Search form and search results. */
|
||||
|
||||
fieldset { border: thin solid silver;
|
||||
border-radius: 1em;
|
||||
text-align: center; }
|
||||
input[name=expr] {
|
||||
width: 25%; }
|
||||
|
||||
table.results { margin-top: 1em;
|
||||
margin-left: 2em;
|
||||
font-size: smaller; }
|
||||
|
||||
/* Header and footer lines. */
|
||||
|
||||
table.head { width: 100%;
|
||||
border-bottom: 1px dotted #808080;
|
||||
margin-bottom: 1em;
|
||||
font-size: smaller; }
|
||||
td.head-vol { text-align: center; }
|
||||
td.head-rtitle {
|
||||
text-align: right; }
|
||||
|
||||
table.foot { width: 100%;
|
||||
border-top: 1px dotted #808080;
|
||||
margin-top: 1em;
|
||||
font-size: smaller; }
|
||||
td.foot-os { text-align: right; }
|
||||
|
||||
/* Sections and paragraphs. */
|
||||
|
||||
.manual-text {
|
||||
margin-left: 3.8em; }
|
||||
.Nd { }
|
||||
section.Sh { }
|
||||
h1.Sh { margin-top: 1.2em;
|
||||
margin-bottom: 0.6em;
|
||||
margin-left: -3.2em;
|
||||
font-size: 110%; }
|
||||
section.Ss { }
|
||||
h2.Ss { margin-top: 1.2em;
|
||||
margin-bottom: 0.6em;
|
||||
margin-left: -1.2em;
|
||||
font-size: 105%; }
|
||||
.Pp { margin: 0.6em 0em; }
|
||||
.Sx { }
|
||||
.Xr { }
|
||||
|
||||
/* Displays and lists. */
|
||||
|
||||
.Bd { }
|
||||
.Bd-indent { margin-left: 3.8em; }
|
||||
|
||||
.Bl-bullet { list-style-type: disc;
|
||||
padding-left: 1em; }
|
||||
.Bl-bullet > li { }
|
||||
.Bl-dash { list-style-type: none;
|
||||
padding-left: 0em; }
|
||||
.Bl-dash > li:before {
|
||||
content: "\2014 "; }
|
||||
.Bl-item { list-style-type: none;
|
||||
padding-left: 0em; }
|
||||
.Bl-item > li { }
|
||||
.Bl-compact > li {
|
||||
margin-top: 0em; }
|
||||
|
||||
.Bl-enum { padding-left: 2em; }
|
||||
.Bl-enum > li { }
|
||||
.Bl-compact > li {
|
||||
margin-top: 0em; }
|
||||
|
||||
.Bl-diag { }
|
||||
.Bl-diag > dt {
|
||||
font-style: normal;
|
||||
font-weight: bold; }
|
||||
.Bl-diag > dd {
|
||||
margin-left: 0em; }
|
||||
.Bl-hang { }
|
||||
.Bl-hang > dt { }
|
||||
.Bl-hang > dd {
|
||||
margin-left: 5.5em; }
|
||||
.Bl-inset { }
|
||||
.Bl-inset > dt { }
|
||||
.Bl-inset > dd {
|
||||
margin-left: 0em; }
|
||||
.Bl-ohang { }
|
||||
.Bl-ohang > dt { }
|
||||
.Bl-ohang > dd {
|
||||
margin-left: 0em; }
|
||||
.Bl-tag { margin-top: 0.6em;
|
||||
margin-left: 5.5em; }
|
||||
.Bl-tag > dt {
|
||||
float: left;
|
||||
margin-top: 0em;
|
||||
margin-left: -5.5em;
|
||||
padding-right: 0.5em;
|
||||
vertical-align: top; }
|
||||
.Bl-tag > dd {
|
||||
clear: right;
|
||||
width: 100%;
|
||||
margin-top: 0em;
|
||||
margin-left: 0em;
|
||||
margin-bottom: 0.6em;
|
||||
vertical-align: top;
|
||||
overflow: auto; }
|
||||
.Bl-compact { margin-top: 0em; }
|
||||
.Bl-compact > dd {
|
||||
margin-bottom: 0em; }
|
||||
.Bl-compact > dt {
|
||||
margin-top: 0em; }
|
||||
|
||||
.Bl-column { }
|
||||
.Bl-column > tbody > tr { }
|
||||
.Bl-column > tbody > tr > td {
|
||||
margin-top: 1em; }
|
||||
.Bl-compact > tbody > tr > td {
|
||||
margin-top: 0em; }
|
||||
|
||||
.Rs { font-style: normal;
|
||||
font-weight: normal; }
|
||||
.RsA { }
|
||||
.RsB { font-style: italic;
|
||||
font-weight: normal; }
|
||||
.RsC { }
|
||||
.RsD { }
|
||||
.RsI { font-style: italic;
|
||||
font-weight: normal; }
|
||||
.RsJ { font-style: italic;
|
||||
font-weight: normal; }
|
||||
.RsN { }
|
||||
.RsO { }
|
||||
.RsP { }
|
||||
.RsQ { }
|
||||
.RsR { }
|
||||
.RsT { text-decoration: underline; }
|
||||
.RsU { }
|
||||
.RsV { }
|
||||
|
||||
.eqn { }
|
||||
.tbl td { vertical-align: middle; }
|
||||
|
||||
.HP { margin-left: 3.8em;
|
||||
text-indent: -3.8em; }
|
||||
|
||||
/* Semantic markup for command line utilities. */
|
||||
|
||||
table.Nm { }
|
||||
code.Nm { font-style: normal;
|
||||
font-weight: bold;
|
||||
font-family: inherit; }
|
||||
.Fl { font-style: normal;
|
||||
font-weight: bold;
|
||||
font-family: inherit; }
|
||||
.Cm { font-style: normal;
|
||||
font-weight: bold;
|
||||
font-family: inherit; }
|
||||
.Ar { font-style: italic;
|
||||
font-weight: normal; }
|
||||
.Op { display: inline; }
|
||||
.Ic { font-style: normal;
|
||||
font-weight: bold;
|
||||
font-family: inherit; }
|
||||
.Ev { font-style: normal;
|
||||
font-weight: normal;
|
||||
font-family: monospace; }
|
||||
.Pa { font-style: italic;
|
||||
font-weight: normal; }
|
||||
|
||||
/* Semantic markup for function libraries. */
|
||||
|
||||
.Lb { }
|
||||
code.In { font-style: normal;
|
||||
font-weight: bold;
|
||||
font-family: inherit; }
|
||||
a.In { }
|
||||
.Fd { font-style: normal;
|
||||
font-weight: bold;
|
||||
font-family: inherit; }
|
||||
.Ft { font-style: italic;
|
||||
font-weight: normal; }
|
||||
.Fn { font-style: normal;
|
||||
font-weight: bold;
|
||||
font-family: inherit; }
|
||||
.Fa { font-style: italic;
|
||||
font-weight: normal; }
|
||||
.Vt { font-style: italic;
|
||||
font-weight: normal; }
|
||||
.Va { font-style: italic;
|
||||
font-weight: normal; }
|
||||
.Dv { font-style: normal;
|
||||
font-weight: normal;
|
||||
font-family: monospace; }
|
||||
.Er { font-style: normal;
|
||||
font-weight: normal;
|
||||
font-family: monospace; }
|
||||
|
||||
/* Various semantic markup. */
|
||||
|
||||
.An { }
|
||||
.Lk { }
|
||||
.Mt { }
|
||||
.Cd { font-style: normal;
|
||||
font-weight: bold;
|
||||
font-family: inherit; }
|
||||
.Ad { font-style: italic;
|
||||
font-weight: normal; }
|
||||
.Ms { font-style: normal;
|
||||
font-weight: bold; }
|
||||
.St { }
|
||||
.Ux { }
|
||||
|
||||
/* Physical markup. */
|
||||
|
||||
.Bf { display: inline; }
|
||||
.No { font-style: normal;
|
||||
font-weight: normal; }
|
||||
.Em { font-style: italic;
|
||||
font-weight: normal; }
|
||||
.Sy { font-style: normal;
|
||||
font-weight: bold; }
|
||||
.Li { font-style: normal;
|
||||
font-weight: normal;
|
||||
font-family: monospace; }
|
||||
|
||||
/* Tooltip support. */
|
||||
|
||||
h1.Sh, h2.Ss { position: relative; }
|
||||
.An, .Ar, .Cd, .Cm, .Dv, .Em, .Er, .Ev, .Fa, .Fd, .Fl, .Fn, .Ft,
|
||||
.Ic, code.In, .Lb, .Lk, .Ms, .Mt, .Nd, code.Nm, .Pa, .Rs,
|
||||
.St, .Sx, .Sy, .Va, .Vt, .Xr {
|
||||
display: inline-block;
|
||||
position: relative; }
|
||||
|
||||
.An::before { content: "An"; }
|
||||
.Ar::before { content: "Ar"; }
|
||||
.Cd::before { content: "Cd"; }
|
||||
.Cm::before { content: "Cm"; }
|
||||
.Dv::before { content: "Dv"; }
|
||||
.Em::before { content: "Em"; }
|
||||
.Er::before { content: "Er"; }
|
||||
.Ev::before { content: "Ev"; }
|
||||
.Fa::before { content: "Fa"; }
|
||||
.Fd::before { content: "Fd"; }
|
||||
.Fl::before { content: "Fl"; }
|
||||
.Fn::before { content: "Fn"; }
|
||||
.Ft::before { content: "Ft"; }
|
||||
.Ic::before { content: "Ic"; }
|
||||
code.In::before { content: "In"; }
|
||||
.Lb::before { content: "Lb"; }
|
||||
.Lk::before { content: "Lk"; }
|
||||
.Ms::before { content: "Ms"; }
|
||||
.Mt::before { content: "Mt"; }
|
||||
.Nd::before { content: "Nd"; }
|
||||
code.Nm::before { content: "Nm"; }
|
||||
.Pa::before { content: "Pa"; }
|
||||
.Rs::before { content: "Rs"; }
|
||||
h1.Sh::before { content: "Sh"; }
|
||||
h2.Ss::before { content: "Ss"; }
|
||||
.St::before { content: "St"; }
|
||||
.Sx::before { content: "Sx"; }
|
||||
.Sy::before { content: "Sy"; }
|
||||
.Va::before { content: "Va"; }
|
||||
.Vt::before { content: "Vt"; }
|
||||
.Xr::before { content: "Xr"; }
|
||||
|
||||
.An::before, .Ar::before, .Cd::before, .Cm::before,
|
||||
.Dv::before, .Em::before, .Er::before, .Ev::before,
|
||||
.Fa::before, .Fd::before, .Fl::before, .Fn::before, .Ft::before,
|
||||
.Ic::before, code.In::before, .Lb::before, .Lk::before,
|
||||
.Ms::before, .Mt::before, .Nd::before, code.Nm::before,
|
||||
.Pa::before, .Rs::before,
|
||||
h1.Sh::before, h2.Ss::before, .St::before, .Sx::before, .Sy::before,
|
||||
.Va::before, .Vt::before, .Xr::before {
|
||||
opacity: 0;
|
||||
transition: .15s ease opacity;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
bottom: 100%;
|
||||
box-shadow: 0 0 .35em #000;
|
||||
padding: .15em .25em;
|
||||
white-space: nowrap;
|
||||
font-family: Helvetica,Arial,sans-serif;
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
color: black;
|
||||
background: #fff; }
|
||||
.An:hover::before, .Ar:hover::before, .Cd:hover::before, .Cm:hover::before,
|
||||
.Dv:hover::before, .Em:hover::before, .Er:hover::before, .Ev:hover::before,
|
||||
.Fa:hover::before, .Fd:hover::before, .Fl:hover::before, .Fn:hover::before,
|
||||
.Ft:hover::before, .Ic:hover::before, code.In:hover::before,
|
||||
.Lb:hover::before, .Lk:hover::before, .Ms:hover::before, .Mt:hover::before,
|
||||
.Nd:hover::before, code.Nm:hover::before, .Pa:hover::before,
|
||||
.Rs:hover::before, h1.Sh:hover::before, h2.Ss:hover::before, .St:hover::before,
|
||||
.Sx:hover::before, .Sy:hover::before, .Va:hover::before, .Vt:hover::before,
|
||||
.Xr:hover::before {
|
||||
opacity: 1;
|
||||
pointer-events: inherit; }
|
||||
|
||||
/* Overrides to avoid excessive margins on small devices. */
|
||||
|
||||
@media (max-width: 37.5em) {
|
||||
.manual-text {
|
||||
margin-left: 0.5em; }
|
||||
h1.Sh, h2.Ss { margin-left: 0em; }
|
||||
.Bd-indent { margin-left: 2em; }
|
||||
.Bl-hang > dd {
|
||||
margin-left: 2em; }
|
||||
.Bl-tag { margin-left: 2em; }
|
||||
.Bl-tag > dt {
|
||||
margin-left: -2em; }
|
||||
.HP { margin-left: 2em;
|
||||
text-indent: -2em; }
|
||||
}
|
||||
@@ -1,295 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<!-- This is an automatically generated file. Do not edit.
|
||||
This file is part of RGBDS.
|
||||
|
||||
Copyright (c) 2010-2019, Anthony J. Bentley and RGBDS contributors.
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
-->
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="utf-8"/>
|
||||
<link rel="stylesheet" href="mandoc.css" type="text/css" media="all"/>
|
||||
<link rel="stylesheet" href="rgbds.css" type="text/css" media="all"/>
|
||||
<title>RGBASM(1)</title>
|
||||
</head>
|
||||
<body>
|
||||
<table class="head">
|
||||
<tr>
|
||||
<td class="head-ltitle">RGBASM(1)</td>
|
||||
<td class="head-vol">General Commands Manual</td>
|
||||
<td class="head-rtitle">RGBASM(1)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="manual-text">
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
|
||||
<code class="Nm">rgbasm</code> —
|
||||
<span class="Nd">Game Boy assembler</span>
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
|
||||
<table class="Nm">
|
||||
<tr>
|
||||
<td><code class="Nm">rgbasm</code></td>
|
||||
<td>[<code class="Fl"><a href="#E">-E</a><a href="#h">h</a><a href="#L">L</a><a href="#V">V</a><a href="#v">v</a><a href="#w">w</a></code>] [<code class="Fl"><a href="#b">-b</a></code>
|
||||
<var class="Ar">chars</var>] [<code class="Fl"><a href="#D">-D</a></code>
|
||||
<var class="Ar">name</var>[=<var class="Ar">value</var>]]
|
||||
[<code class="Fl"><a href="#g">-g</a></code> <var class="Ar">chars</var>]
|
||||
[<code class="Fl"><a href="#i">-i</a></code> <var class="Ar">path</var>]
|
||||
[<code class="Fl"><a href="#M">-M</a></code> <var class="Ar">depend_file</var>]
|
||||
[<code class="Fl"><a href="#M">-M</a><a href="#G">G</a></code>] [<code class="Fl"><a href="#M">-M</a><a href="#P">P</a></code>]
|
||||
[<code class="Fl"><a href="#M">-M</a><a href="#T">T</a></code> <var class="Ar">target_file</var>]
|
||||
[<code class="Fl"><a href="#M">-M</a><a href="#Q">Q</a></code> <var class="Ar">target_file</var>]
|
||||
[<code class="Fl"><a href="#o">-o</a></code> <var class="Ar">out_file</var>]
|
||||
[<code class="Fl"><a href="#p">-p</a></code> <var class="Ar">pad_value</var>]
|
||||
[<code class="Fl"><a href="#r">-r</a></code> <var class="Ar">recursion_depth</var>]
|
||||
[<code class="Fl"><a href="#W">-W</a></code> <var class="Ar">warning</var>]
|
||||
<var class="Ar">file ...</var></td>
|
||||
</tr>
|
||||
</table>
|
||||
</section>
|
||||
<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 RGB object file from an
|
||||
assembly source file. The input <var class="Ar">file</var> can be a file path,
|
||||
or <code class="Cm">-</code> denoting <code class="Cm">stdin</code>.
|
||||
<p class="Pp">Note that options can be abbreviated as long as the abbreviation
|
||||
is unambiguous: <code class="Fl">--verb</code> is
|
||||
<code class="Fl">--verbose</code>, but
|
||||
<code class="Fl">--ver</code> is invalid because it
|
||||
could also be <code class="Fl">--version</code>. The
|
||||
arguments are as follows:</p>
|
||||
<dl class="Bl-tag">
|
||||
<dt><a class="permalink" href="#b"><code class="Fl" id="b">-b</code></a>
|
||||
<var class="Ar">chars</var>,
|
||||
<code class="Fl">--binary-digits</code>
|
||||
<var class="Ar">chars</var></dt>
|
||||
<dd>Change the two characters used for binary constants. The defaults are
|
||||
01.</dd>
|
||||
<dt><a class="permalink" href="#D"><code class="Fl" id="D">-D</code></a>
|
||||
<var class="Ar">name</var>[=<var class="Ar">value</var>],
|
||||
<code class="Fl">-</code> <code class="Fl">-define</code>
|
||||
<var class="Ar">name</var>[=<var class="Ar">value</var>]</dt>
|
||||
<dd>Add a string symbol to the compiled source code. This is equivalent to
|
||||
‘<code class="Li"><var class="Ar">name</var> <code class="Ic">EQUS
|
||||
"</code><var class="Ar">value</var>"</code>’ in code, or
|
||||
‘<code class="Li"><var class="Ar">name</var> <code class="Ic">EQUS
|
||||
"1"</code></code>’ if <var class="Ar">value</var> is not
|
||||
specified.</dd>
|
||||
<dt><a class="permalink" href="#E"><code class="Fl" id="E">-E</code></a>,
|
||||
<code class="Fl">--export-all</code></dt>
|
||||
<dd>Export all labels, including unreferenced and local labels.</dd>
|
||||
<dt><a class="permalink" href="#g"><code class="Fl" id="g">-g</code></a>
|
||||
<var class="Ar">chars</var>,
|
||||
<code class="Fl">--gfx-chars</code>
|
||||
<var class="Ar">chars</var></dt>
|
||||
<dd>Change the four characters used for gfx constants. The defaults are
|
||||
0123.</dd>
|
||||
<dt><a class="permalink" href="#h"><code class="Fl" id="h">-h</code></a>,
|
||||
<code class="Fl">--halt-without-nop</code></dt>
|
||||
<dd>By default, <code class="Nm">rgbasm</code> inserts a
|
||||
<code class="Ic">nop</code> instruction immediately after any
|
||||
<code class="Ic">halt</code> instruction. The <code class="Fl">-h</code>
|
||||
option disables this behavior.</dd>
|
||||
<dt><a class="permalink" href="#i"><code class="Fl" id="i">-i</code></a>
|
||||
<var class="Ar">path</var>,
|
||||
<code class="Fl">--include</code>
|
||||
<var class="Ar">path</var></dt>
|
||||
<dd>Add an include path.</dd>
|
||||
<dt><a class="permalink" href="#L"><code class="Fl" id="L">-L</code></a>,
|
||||
<code class="Fl">--preserve-ld</code></dt>
|
||||
<dd>Disable the optimization that turns loads of the form <code class="Ic">LD
|
||||
[$FF00+n8],A</code> into the opcode <code class="Ic">LDH
|
||||
[$FF00+n8],A</code> in order to have full control of the result in the
|
||||
final ROM.</dd>
|
||||
<dt><a class="permalink" href="#M"><code class="Fl" id="M">-M</code></a>
|
||||
<var class="Ar">depend_file</var>,
|
||||
<code class="Fl">--dependfile</code>
|
||||
<var class="Ar">depend_file</var></dt>
|
||||
<dd>Print <a class="Xr">make(1)</a> dependencies to
|
||||
<var class="Ar">depend_file</var>.</dd>
|
||||
<dt><a class="permalink" href="#MG"><code class="Fl" id="MG">-MG</code></a></dt>
|
||||
<dd>To be used in conjunction with <code class="Fl">-M</code>. This makes
|
||||
<code class="Nm">rgbasm</code> assume that missing files are
|
||||
auto-generated: when <code class="Ic">INCLUDE</code> or
|
||||
<code class="Ic">INCBIN</code> is attempted on a non-existent file, it is
|
||||
added as a dependency, then <code class="Nm">rgbasm</code> exits normally
|
||||
instead of erroring out. This feature is used in automatic updating of
|
||||
makefiles.</dd>
|
||||
<dt><a class="permalink" href="#MP"><code class="Fl" id="MP">-MP</code></a></dt>
|
||||
<dd>When enabled, this causes a phony target to be added for each dependency
|
||||
other than the main file. This prevents <a class="Xr">make(1)</a> from
|
||||
erroring out when dependency files are deleted.</dd>
|
||||
<dt><a class="permalink" href="#MT"><code class="Fl" id="MT">-MT</code></a>
|
||||
<var class="Ar">target_file</var></dt>
|
||||
<dd>Add a target to the rules emitted by <code class="Fl">-M</code>. The exact
|
||||
string provided will be written, including spaces and special characters.
|
||||
<div class="Bd Bd-indent"><code class="Li"><code class="Fl">-MT</code>
|
||||
<code class="Fl">-fileA</code> <code class="Fl">-MT</code>
|
||||
<code class="Fl">-fileB</code></code></div>
|
||||
is equivalent to
|
||||
<div class="Bd Bd-indent"><code class="Li"><code class="Fl">-MT</code>
|
||||
<code class="Fl">-'fileA</code>
|
||||
<code class="Fl">-fileB'</code>.</code></div>
|
||||
If neither this nor <code class="Fl">-MQ</code> is specified, the output
|
||||
file name is used.</dd>
|
||||
<dt><a class="permalink" href="#MQ"><code class="Fl" id="MQ">-MQ</code></a>
|
||||
<var class="Ar">target_file</var></dt>
|
||||
<dd>Same as <code class="Fl">-MT</code>, but additionally escapes any special
|
||||
<a class="Xr">make(1)</a> characters, essentially ‘$’.</dd>
|
||||
<dt><a class="permalink" href="#o"><code class="Fl" id="o">-o</code></a>
|
||||
<var class="Ar">out_file</var>,
|
||||
<code class="Fl">--output</code>
|
||||
<var class="Ar">out_file</var></dt>
|
||||
<dd>Write an object file to the given filename.</dd>
|
||||
<dt><a class="permalink" href="#p"><code class="Fl" id="p">-p</code></a>
|
||||
<var class="Ar">pad_value</var>,
|
||||
<code class="Fl">--pad-value</code>
|
||||
<var class="Ar">pad_value</var></dt>
|
||||
<dd>When padding an image, pad with this value. The default is 0x00.</dd>
|
||||
<dt><a class="permalink" href="#r"><code class="Fl" id="r">-r</code></a>
|
||||
<var class="Ar">recursion_depth</var>,
|
||||
<code class="Fl">--recursion-depth</code>
|
||||
<var class="Ar">recursion_depth</var></dt>
|
||||
<dd>Specifies the recursion depth at which RGBASM will assume being in an
|
||||
infinite loop.</dd>
|
||||
<dt><a class="permalink" href="#V"><code class="Fl" id="V">-V</code></a>,
|
||||
<code class="Fl">--version</code></dt>
|
||||
<dd>Print the version of the program and exit.</dd>
|
||||
<dt><a class="permalink" href="#v"><code class="Fl" id="v">-v</code></a>,
|
||||
<code class="Fl">--verbose</code></dt>
|
||||
<dd>Be verbose.</dd>
|
||||
<dt><a class="permalink" href="#W"><code class="Fl" id="W">-W</code></a>
|
||||
<var class="Ar">warning</var>,
|
||||
<code class="Fl">--warning</code>
|
||||
<var class="Ar">warning</var></dt>
|
||||
<dd>Set warning flag <var class="Ar">warning</var>. A warning message will be
|
||||
printed if <var class="Ar">warning</var> is an unknown warning flag. See
|
||||
the <a class="Sx" href="#DIAGNOSTICS">DIAGNOSTICS</a> section for a list
|
||||
of warnings.</dd>
|
||||
<dt><a class="permalink" href="#w"><code class="Fl" id="w">-w</code></a></dt>
|
||||
<dd>Disable all warning output, even when turned into errors.</dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="DIAGNOSTICS"><a class="permalink" href="#DIAGNOSTICS">DIAGNOSTICS</a></h1>
|
||||
Warnings are diagnostic messages that indicate possibly erroneous behavior that
|
||||
does not necessarily compromise the assembling process. The following options
|
||||
alter the way warnings are processed.
|
||||
<dl class="Bl-tag">
|
||||
<dt><a class="permalink" href="#Werror"><code class="Fl" id="Werror">-Werror</code></a></dt>
|
||||
<dd>Make all warnings into errors.</dd>
|
||||
<dt><a class="permalink" href="#Werror="><code class="Fl" id="Werror=">-Werror=</code></a></dt>
|
||||
<dd>Make the specified warning into an error. A warning's name is appended
|
||||
(example: <code class="Fl">-Werror=obsolete</code>), and this warning is
|
||||
implicitly enabled and turned into an error. This is an error if used with
|
||||
a meta warning, such as <code class="Fl">-Werror=all</code>.</dd>
|
||||
</dl>
|
||||
<p class="Pp">The following warnings are “meta” warnings, that
|
||||
enable a collection of other warnings. If a specific warning is toggled via
|
||||
a meta flag and a specific one, the more specific one takes priority. The
|
||||
position on the command-line acts as a tie breaker, the last one taking
|
||||
effect.</p>
|
||||
<dl class="Bl-tag">
|
||||
<dt><a class="permalink" href="#Wall"><code class="Fl" id="Wall">-Wall</code></a></dt>
|
||||
<dd>This enables warnings that are likely to indicate an error or undesired
|
||||
behavior, and that can easily be fixed.</dd>
|
||||
<dt><a class="permalink" href="#Wextra"><code class="Fl" id="Wextra">-Wextra</code></a></dt>
|
||||
<dd>This enables extra warnings that are less likely to pose a problem, but
|
||||
that may still be wanted.</dd>
|
||||
<dt><a class="permalink" href="#Weverything"><code class="Fl" id="Weverything">-Weverything</code></a></dt>
|
||||
<dd>Enables literally every warning.</dd>
|
||||
</dl>
|
||||
<p class="Pp">The following warnings are actual warning flags; with each
|
||||
description, the corresponding warning flag is included. Note that each of
|
||||
these flag also has a negation (for example,
|
||||
<code class="Fl">-Wempty-entry</code> enables the warning that
|
||||
<code class="Fl">-Wno-empty-entry</code> disables). Only the non-default
|
||||
flag is listed here. Ignoring the “no-” prefix, entries are
|
||||
listed alphabetically.</p>
|
||||
<dl class="Bl-tag">
|
||||
<dt><a class="permalink" href="#Wno-assert"><code class="Fl" id="Wno-assert">-Wno-assert</code></a></dt>
|
||||
<dd>Warns when <code class="Ic">WARN</code><span class="No">-type</span>
|
||||
assertions fail. (See “Aborting the assembly process” in
|
||||
<a class="Xr" href="rgbasm.5.html">rgbasm(5)</a> for <code class="Ic">ASSERT</code>).</dd>
|
||||
<dt><a class="permalink" href="#Wbuiltin-args"><code class="Fl" id="Wbuiltin-args">-Wbuiltin-args</code></a></dt>
|
||||
<dd>Warn about incorrect arguments to built-in functions, such as
|
||||
<code class="Fn">STRSUB</code>() with indexes outside of the string's
|
||||
bounds. This warning is enabled by <code class="Fl">-Wall</code>.</dd>
|
||||
<dt><a class="permalink" href="#Wdiv"><code class="Fl" id="Wdiv">-Wdiv</code></a></dt>
|
||||
<dd>Warn when dividing the smallest negative integer by -1, which yields
|
||||
itself due to integer overflow.</dd>
|
||||
<dt><a class="permalink" href="#Wempty-entry"><code class="Fl" id="Wempty-entry">-Wempty-entry</code></a></dt>
|
||||
<dd>Warn when an empty entry is encountered in a <code class="Ic">db</code>,
|
||||
<code class="Ic">dw</code>, <code class="Ic">dl</code> list. This warning
|
||||
is enabled by <code class="Fl">-Wextra</code>.</dd>
|
||||
<dt><a class="permalink" href="#Wlarge-constant"><code class="Fl" id="Wlarge-constant">-Wlarge-constant</code></a></dt>
|
||||
<dd>Warn when a constant too large to fit in a signed 32-bit integer is
|
||||
encountered. This warning is enabled by
|
||||
<code class="Fl">-Wall</code>.</dd>
|
||||
<dt><a class="permalink" href="#Wlong-string"><code class="Fl" id="Wlong-string">-Wlong-string</code></a></dt>
|
||||
<dd>Warn when a string too long to fit in internal buffers is encountered.
|
||||
This warning is enabled by <code class="Fl">-Wall</code>.</dd>
|
||||
<dt><a class="permalink" href="#Wno-obsolete"><code class="Fl" id="Wno-obsolete">-Wno-obsolete</code></a></dt>
|
||||
<dd>Warn when obsolete constructs such as the <code class="Ic">jp [hl]</code>
|
||||
instruction or <code class="Ic">HOME</code> section type are
|
||||
encountered.</dd>
|
||||
<dt><a class="permalink" href="#Wshift"><code class="Fl" id="Wshift">-Wshift</code></a></dt>
|
||||
<dd>Warn when shifting right a negative value. Use a division by 2^N
|
||||
instead.</dd>
|
||||
<dt><a class="permalink" href="#Wshift-amount"><code class="Fl" id="Wshift-amount">-Wshift-amount</code></a></dt>
|
||||
<dd>Warn when a shift's operand is negative or greater than 32.</dd>
|
||||
<dt><a class="permalink" href="#Wno-truncation"><code class="Fl" id="Wno-truncation">-Wno-truncation</code></a></dt>
|
||||
<dd>Warn when an implicit truncation (for example, <code class="Ic">db</code>)
|
||||
loses some bits.</dd>
|
||||
<dt><a class="permalink" href="#Wno-user"><code class="Fl" id="Wno-user">-Wno-user</code></a></dt>
|
||||
<dd>Warn when the <code class="Ic">WARN</code> built-in is executed. (See
|
||||
“Aborting the assembly process” in
|
||||
<a class="Xr" href="rgbasm.5.html">rgbasm(5)</a> for <code class="Ic">WARN</code>).</dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1>
|
||||
You can assemble a source file in two ways.
|
||||
<p class="Pp">Straightforward way:</p>
|
||||
<div class="Bd Bd-indent"><code class="Li">$ rgbasm -o bar.o
|
||||
foo.asm</code></div>
|
||||
<p class="Pp">Pipes way:</p>
|
||||
<div class="Bd Bd-indent"><code class="Li">$ cat foo.asm | rgbasm -o bar.o
|
||||
-</code></div>
|
||||
<div class="Bd Bd-indent"><code class="Li">$ rgbasm -o bar.o - <
|
||||
foo.asm</code></div>
|
||||
<p class="Pp">The resulting object file is not yet a usable ROM image—it
|
||||
must first be run through <a class="Xr" href="rgblink.1.html">rgblink(1)</a> and then
|
||||
<a class="Xr" href="rgbfix.1.html">rgbfix(1)</a>.</p>
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="BUGS"><a class="permalink" href="#BUGS">BUGS</a></h1>
|
||||
Please report bugs on
|
||||
<a class="Lk" href="https://github.com/rednex/rgbds/issues">GitHub</a>.
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
|
||||
ALSO</a></h1>
|
||||
<a class="Xr" href="rgbasm.5.html">rgbasm(5)</a>, <a class="Xr" href="rgbfix.1.html">rgbfix(1)</a>,
|
||||
<a class="Xr" href="rgblink.1.html">rgblink(1)</a>, <a class="Xr" href="rgbds.5.html">rgbds(5)</a>,
|
||||
<a class="Xr" href="rgbds.7.html">rgbds(7)</a>, <a class="Xr" href="gbz80.7.html">gbz80(7)</a>
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
|
||||
<code class="Nm">rgbasm</code> was originally written by Carsten Sørensen
|
||||
as part of the ASMotor package, and was later packaged in RGBDS by Justin
|
||||
Lloyd. It is now maintained by a number of contributors at
|
||||
<a class="Lk" href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>.
|
||||
</section>
|
||||
</div>
|
||||
<table class="foot">
|
||||
<tr>
|
||||
<td class="foot-date">July 8, 2019</td>
|
||||
<td class="foot-os">General</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
1751
docs/rgbasm.5.html
1751
docs/rgbasm.5.html
File diff suppressed because it is too large
Load Diff
@@ -1,363 +0,0 @@
|
||||
<!DOCTYPE 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>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="utf-8"/>
|
||||
<link rel="stylesheet" href="mandoc.css" type="text/css" media="all"/>
|
||||
<link rel="stylesheet" href="rgbds.css" type="text/css" media="all"/>
|
||||
<title>RGBDS(5)</title>
|
||||
</head>
|
||||
<body>
|
||||
<table class="head">
|
||||
<tr>
|
||||
<td class="head-ltitle">RGBDS(5)</td>
|
||||
<td class="head-vol">File Formats Manual</td>
|
||||
<td class="head-rtitle">RGBDS(5)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="manual-text">
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
|
||||
<code class="Nm">rgbds</code> —
|
||||
<span class="Nd">object file format documentation</span>
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
|
||||
This is the description of the object files used by <a class="Xr" href="rgbasm.1.html">rgbasm(1)</a>
|
||||
and <a class="Xr" href="rgblink.1.html">rgblink(1)</a>. <i class="Em">Please note that the
|
||||
specifications may change.</i> This toolchain is in development and new
|
||||
features may require adding more information to the current format, or
|
||||
modifying some fields, which would break compatibility with older versions.
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="FILE_STRUCTURE"><a class="permalink" href="#FILE_STRUCTURE">FILE
|
||||
STRUCTURE</a></h1>
|
||||
The following types are used:
|
||||
<p class="Pp"><var class="Ar">LONG</var> is a 32‐bit integer stored in
|
||||
little‐endian format. <var class="Ar">BYTE</var> is an 8‐bit
|
||||
integer. <var class="Ar">STRING</var> is a 0‐terminated string of
|
||||
<var class="Ar">BYTE</var>.</p>
|
||||
<div class="Bd Pp">
|
||||
<pre>
|
||||
; Header
|
||||
|
||||
BYTE ID[4] ; "RGB9"
|
||||
LONG RevisionNumber ; The format's revision number this file uses
|
||||
LONG NumberOfSymbols ; The number of symbols used in this file
|
||||
LONG NumberOfSections ; The number of sections used in this file
|
||||
|
||||
; Symbols
|
||||
|
||||
REPT NumberOfSymbols ; Number of symbols defined in this object file.
|
||||
|
||||
STRING Name ; The name of this symbol. Local symbols are stored
|
||||
; as "Scope.Symbol".
|
||||
|
||||
BYTE Type ; 0 = LOCAL symbol only used in this file.
|
||||
; 1 = IMPORT this symbol from elsewhere
|
||||
; 2 = EXPORT this symbol to other objects.
|
||||
; Bit 7 is independent from the above value, and
|
||||
; encodes whether the section is unionized
|
||||
|
||||
IF (Type & 0x7F) != 1 ; If symbol is defined in this object file.
|
||||
|
||||
STRING FileName ; File where the symbol is defined.
|
||||
|
||||
LONG LineNum ; Line number in the file where the symbol is defined.
|
||||
|
||||
LONG SectionID ; The section number (of this object file) in which
|
||||
; this symbol is defined. If it doesn't belong to any
|
||||
; 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.
|
||||
|
||||
ENDC
|
||||
|
||||
ENDR
|
||||
|
||||
; Sections
|
||||
|
||||
REPT NumberOfSections
|
||||
STRING Name ; Name of the section
|
||||
|
||||
LONG Size ; Size in bytes of this section
|
||||
|
||||
BYTE Type ; 0 = WRAM0
|
||||
; 1 = VRAM
|
||||
; 2 = ROMX
|
||||
; 3 = ROM0
|
||||
; 4 = HRAM
|
||||
; 5 = WRAMX
|
||||
; 6 = SRAM
|
||||
; 7 = OAM
|
||||
|
||||
LONG Org ; Address to fix this section at. -1 if the linker should
|
||||
; decide (floating address).
|
||||
|
||||
LONG Bank ; Bank to load this section into. -1 if the linker should
|
||||
; decide (floating bank). This field is only valid for ROMX,
|
||||
; VRAM, WRAMX and SRAM sections.
|
||||
|
||||
BYTE Align ; Alignment of this section, as N bits. 0 when not specified.
|
||||
|
||||
LONG Ofs ; Offset relative to the alignment specified above.
|
||||
; Must be below 1 << Align.
|
||||
|
||||
IF (Type == ROMX) || (Type == ROM0) ; Sections that can contain data.
|
||||
|
||||
BYTE Data[Size] ; Raw data of the section.
|
||||
|
||||
LONG NumberOfPatches ; Number of patches to apply.
|
||||
|
||||
REPT NumberOfPatches
|
||||
|
||||
STRING SourceFile ; Name of the source file (for printing error
|
||||
; messages).
|
||||
|
||||
LONG Offset ; Offset into the section where patch should
|
||||
; be applied (in bytes).
|
||||
|
||||
LONG PCSectionID ; Index within the file of the section in which
|
||||
; PC is located.
|
||||
; This is usually the same section that the
|
||||
; patch should be applied into, except e.g.
|
||||
; with LOAD blocks.
|
||||
|
||||
LONG PCOffset ; PC's offset into the above section.
|
||||
; Used because the section may be floating, so
|
||||
; PC's value is not known to RGBASM.
|
||||
|
||||
BYTE Type ; 0 = BYTE patch.
|
||||
; 1 = little endian WORD patch.
|
||||
; 2 = little endian LONG patch.
|
||||
; 3 = JR offset value BYTE patch.
|
||||
|
||||
LONG RPNSize ; Size of the buffer with the RPN.
|
||||
; expression.
|
||||
|
||||
BYTE RPN[RPNSize] ; RPN expression. Definition below.
|
||||
|
||||
ENDR
|
||||
|
||||
ENDC
|
||||
|
||||
ENDR
|
||||
|
||||
; Assertions
|
||||
|
||||
LONG NumberOfAssertions
|
||||
|
||||
REPT NumberOfAssertions
|
||||
|
||||
STRING SourceFile ; Name of the source file (for printing the failure).
|
||||
|
||||
LONG Offset ; Offset into the section where the assertion is located.
|
||||
|
||||
LONG SectionID ; Index within the file of the section in which PC is
|
||||
; located, or -1 if defined outside a section.
|
||||
|
||||
LONG PCOffset ; PC's offset into the above section.
|
||||
; Used because the section may be floating, so PC's value
|
||||
; is not known to RGBASM.
|
||||
|
||||
BYTE Type ; 0 = Prints the message but allows linking to continue
|
||||
; 1 = Prints the message and evaluates other assertions,
|
||||
; but linking fails afterwards
|
||||
; 2 = Prints the message and immediately fails linking
|
||||
|
||||
LONG RPNSize ; Size of the RPN expression's buffer.
|
||||
|
||||
BYTE RPN[RPNSize] ; RPN expression, same as patches. Assert fails if == 0.
|
||||
|
||||
STRING Message ; A message displayed when the assert fails. If set to
|
||||
; the empty string, a generic message is printed instead.
|
||||
|
||||
ENDR
|
||||
</pre>
|
||||
</div>
|
||||
<section class="Ss">
|
||||
<h2 class="Ss" id="RPN_DATA"><a class="permalink" href="#RPN_DATA">RPN
|
||||
DATA</a></h2>
|
||||
Expressions in the object file are stored as RPN. This is an expression of the
|
||||
form “2 5 +”. This will first push the value “2”
|
||||
to the stack, then “5”. The “+” operator pops two
|
||||
arguments from the stack, adds them, and then pushes the result on the stack,
|
||||
effectively replacing the two top arguments with their sum. In the RGB format,
|
||||
RPN expressions are stored as <var class="Ar">BYTE</var>s with some bytes
|
||||
being special prefixes for integers and symbols.
|
||||
<table class="Bl-column Bd-indent">
|
||||
<tr>
|
||||
<th>Value</th>
|
||||
<th>Meaning</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$00"><code class="Li" id="$00">$00</code></a></td>
|
||||
<td><a class="permalink" href="#+_operator"><code class="Li" id="+_operator">+
|
||||
operator</code></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$01"><code class="Li" id="$01">$01</code></a></td>
|
||||
<td><a class="permalink" href="#-_operator"><code class="Li" id="-_operator">-
|
||||
operator</code></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$02"><code class="Li" id="$02">$02</code></a></td>
|
||||
<td><a class="permalink" href="#*_operator"><code class="Li" id="*_operator">*
|
||||
operator</code></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$03"><code class="Li" id="$03">$03</code></a></td>
|
||||
<td><a class="permalink" href="#/_operator"><code class="Li" id="/_operator">/
|
||||
operator</code></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$04"><code class="Li" id="$04">$04</code></a></td>
|
||||
<td><a class="permalink" href="#__operator"><code class="Li" id="__operator">%
|
||||
operator</code></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$05"><code class="Li" id="$05">$05</code></a></td>
|
||||
<td><a class="permalink" href="#unary_-"><code class="Li" id="unary_-">unary
|
||||
-</code></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$10"><code class="Li" id="$10">$10</code></a></td>
|
||||
<td>|
|
||||
<a class="permalink" href="#operator"><code class="Li" id="operator">operator</code></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$11"><code class="Li" id="$11">$11</code></a></td>
|
||||
<td><a class="permalink" href="#&_operator"><code class="Li" id="&_operator">&
|
||||
operator</code></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$12"><code class="Li" id="$12">$12</code></a></td>
|
||||
<td><a class="permalink" href="#__operator_2"><code class="Li" id="__operator_2">^
|
||||
operator</code></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$13"><code class="Li" id="$13">$13</code></a></td>
|
||||
<td><a class="permalink" href="#unary_~"><code class="Li" id="unary_~">unary
|
||||
~</code></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$21"><code class="Li" id="$21">$21</code></a></td>
|
||||
<td><a class="permalink" href="#&&_comparison"><code class="Li" id="&&_comparison">&&
|
||||
comparison</code></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$22"><code class="Li" id="$22">$22</code></a></td>
|
||||
<td><a class="permalink" href="#___comparison"><code class="Li" id="___comparison">||
|
||||
comparison</code></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$23"><code class="Li" id="$23">$23</code></a></td>
|
||||
<td><a class="permalink" href="#unary__!"><code class="Li" id="unary__!">unary !</code></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$30"><code class="Li" id="$30">$30</code></a></td>
|
||||
<td><a class="permalink" href="#==_comparison"><code class="Li" id="==_comparison">==
|
||||
comparison</code></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$31"><code class="Li" id="$31">$31</code></a></td>
|
||||
<td><a class="permalink" href="#!=_comparison"><code class="Li" id="!=_comparison">!=
|
||||
comparison</code></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$32"><code class="Li" id="$32">$32</code></a></td>
|
||||
<td><a class="permalink" href="#__comparison"><code class="Li" id="__comparison">>
|
||||
comparison</code></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$33"><code class="Li" id="$33">$33</code></a></td>
|
||||
<td><a class="permalink" href="#__comparison_2"><code class="Li" id="__comparison_2"><
|
||||
comparison</code></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$34"><code class="Li" id="$34">$34</code></a></td>
|
||||
<td><a class="permalink" href="#_=_comparison"><code class="Li" id="_=_comparison">>=
|
||||
comparison</code></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$35"><code class="Li" id="$35">$35</code></a></td>
|
||||
<td><a class="permalink" href="#_=_comparison_2"><code class="Li" id="_=_comparison_2"><=
|
||||
comparison</code></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$40"><code class="Li" id="$40">$40</code></a></td>
|
||||
<td><a class="permalink" href="#___operator"><code class="Li" id="___operator"><<
|
||||
operator</code></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$41"><code class="Li" id="$41">$41</code></a></td>
|
||||
<td><a class="permalink" href="#___operator_2"><code class="Li" id="___operator_2">>>
|
||||
operator</code></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$50"><code class="Li" id="$50">$50</code></a></td>
|
||||
<td><a class="permalink" href="#BANK(symbol)"><code class="Li" id="BANK(symbol)">BANK(symbol)</code></a>,
|
||||
a <var class="Ar">LONG</var> Symbol ID follows.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$51"><code class="Li" id="$51">$51</code></a></td>
|
||||
<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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$52"><code class="Li" id="$52">$52</code></a></td>
|
||||
<td><a class="permalink" href="#Current_BANK()"><code class="Li" id="Current_BANK()">Current
|
||||
BANK()</code></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$60"><code class="Li" id="$60">$60</code></a></td>
|
||||
<td><a class="permalink" href="#HRAMCheck"><code class="Li" id="HRAMCheck">HRAMCheck</code></a>.
|
||||
Checks if the value is in HRAM, ANDs it with 0xFF.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$61"><code class="Li" id="$61">$61</code></a></td>
|
||||
<td><a class="permalink" href="#RSTCheck"><code class="Li" id="RSTCheck">RSTCheck</code></a>.
|
||||
Checks if the value is a RST vector, ORs it with 0xC7.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$80"><code class="Li" id="$80">$80</code></a></td>
|
||||
<td><var class="Ar">LONG</var> integer follows.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="permalink" href="#$81"><code class="Li" id="$81">$81</code></a></td>
|
||||
<td><var class="Ar">LONG</var> symbol ID follows.</td>
|
||||
</tr>
|
||||
</table>
|
||||
</section>
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
|
||||
ALSO</a></h1>
|
||||
<a class="Xr" href="rgbasm.1.html">rgbasm(1)</a>, <a class="Xr" href="rgblink.1.html">rgblink(1)</a>,
|
||||
<a class="Xr" href="rgbds.7.html">rgbds(7)</a>, <a class="Xr" href="gbz80.7.html">gbz80(7)</a>
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
|
||||
<code class="Nm">rgbds</code> was originally written by Carsten Sørensen
|
||||
as part of the ASMotor package, and was later packaged in RGBDS by Justin
|
||||
Lloyd. It is now maintained by a number of contributors at
|
||||
<a class="Lk" href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>.
|
||||
</section>
|
||||
</div>
|
||||
<table class="foot">
|
||||
<tr>
|
||||
<td class="foot-date">January 26, 2018</td>
|
||||
<td class="foot-os">General</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,80 +0,0 @@
|
||||
<!DOCTYPE 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>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="utf-8"/>
|
||||
<link rel="stylesheet" href="mandoc.css" type="text/css" media="all"/>
|
||||
<link rel="stylesheet" href="rgbds.css" type="text/css" media="all"/>
|
||||
<title>RGBDS(7)</title>
|
||||
</head>
|
||||
<body>
|
||||
<table class="head">
|
||||
<tr>
|
||||
<td class="head-ltitle">RGBDS(7)</td>
|
||||
<td class="head-vol">Miscellaneous Information Manual</td>
|
||||
<td class="head-rtitle">RGBDS(7)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="manual-text">
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
|
||||
<code class="Nm">rgbds</code> —
|
||||
<span class="Nd">Rednex Game Boy Development System</span>
|
||||
</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:
|
||||
<div class="Bd Pp Bd-indent">
|
||||
<pre>
|
||||
$ rgbasm -o bar.o foo.asm
|
||||
$ rgblink -o baz.gb bar.o
|
||||
$ rgbfix -v -p 0 baz.gb
|
||||
</pre>
|
||||
</div>
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
|
||||
ALSO</a></h1>
|
||||
<a class="Xr" href="rgbasm.1.html">rgbasm(1)</a>, <a class="Xr" href="rgbfix.1.html">rgbfix(1)</a>,
|
||||
<a class="Xr" href="rgblink.1.html">rgblink(1)</a>, <a class="Xr" href="rgbds.5.html">rgbds(5)</a>,
|
||||
<a class="Xr" href="gbz80.7.html">gbz80(7)</a>
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
|
||||
<dl class="Bl-ohang">
|
||||
<dt></dt>
|
||||
<dd>1997, Carsten Sørensen (AKA SurfSmurf) writes ASMotor as a
|
||||
general-purpose assembler/linker system for DOS/Win32.</dd>
|
||||
<dt></dt>
|
||||
<dd>1999, Justin Lloyd (AKA Otaku no Zoku) adapts ASMotor to read and produce
|
||||
GBZ80 assembly/machine code, and releases this version as RGBDS.</dd>
|
||||
<dt></dt>
|
||||
<dd>2009, Vegard Nossum adapts the code to be more UNIX-like and releases this
|
||||
version as rgbds-linux on GitHub.</dd>
|
||||
<dt></dt>
|
||||
<dd>2010, Anthony J. Bentley forks that repository. The fork becomes the
|
||||
reference implementation of rgbds.</dd>
|
||||
<dt></dt>
|
||||
<dd>2017, Bentley's repository is moved to a neutral name. 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>.</dd>
|
||||
<dt></dt>
|
||||
<dd>2018, codebase relicensed under the MIT license.</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</div>
|
||||
<table class="foot">
|
||||
<tr>
|
||||
<td class="foot-date">March 7, 2018</td>
|
||||
<td class="foot-os">General</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,63 +0,0 @@
|
||||
/* Overrides to default mandoc styling for HTML renders of RGBDS man pages */
|
||||
|
||||
html {
|
||||
/* Reduce contrast */
|
||||
background-color: #f8f8f8;
|
||||
color: #222;
|
||||
|
||||
/* Override `mandoc.css`'s sowe can put it on <body> instead */
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
body {
|
||||
/* Center body horizontally (requires <html> to span full width) */
|
||||
margin: 0 auto;
|
||||
/* `mandoc.css`'s default, but it's applied to <html> there */
|
||||
max-width: 65em;
|
||||
|
||||
/* Improve readability */
|
||||
font-size: 16px;
|
||||
line-height: 1.4;
|
||||
text-align: justify;
|
||||
|
||||
/* Prevent text from bumping sides on mobile devices */
|
||||
padding: 10px 20px 10px 10px;
|
||||
}
|
||||
@media print {
|
||||
body {
|
||||
/* Max width doesn't make sense for print */
|
||||
max-width: none;
|
||||
/* Make font slightly smaller for printing */
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
code, pre {
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
pre {
|
||||
/* Avoid horizontal page scrolling on mobile */
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* Separate lines in tables */
|
||||
table.Bl-column {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table.Bl-column tr:not(:first-child) > td,
|
||||
table.Bl-column tr:not(:first-child) > th {
|
||||
border-top: 1px solid #aaa;
|
||||
}
|
||||
|
||||
table.Bl-column th {
|
||||
/* Apply `.Sy` style to table headers */
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
table.Bl-column td,
|
||||
table.Bl-column th {
|
||||
/* Add horizontal spacing between columns */
|
||||
padding: 2px 7px 0;
|
||||
}
|
||||
@@ -1,220 +0,0 @@
|
||||
<!DOCTYPE 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>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="utf-8"/>
|
||||
<link rel="stylesheet" href="mandoc.css" type="text/css" media="all"/>
|
||||
<link rel="stylesheet" href="rgbds.css" type="text/css" media="all"/>
|
||||
<title>RGBFIX(1)</title>
|
||||
</head>
|
||||
<body>
|
||||
<table class="head">
|
||||
<tr>
|
||||
<td class="head-ltitle">RGBFIX(1)</td>
|
||||
<td class="head-vol">General Commands Manual</td>
|
||||
<td class="head-rtitle">RGBFIX(1)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="manual-text">
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
|
||||
<code class="Nm">rgbfix</code> —
|
||||
<span class="Nd">Game Boy header utility and checksum fixer</span>
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
|
||||
<table class="Nm">
|
||||
<tr>
|
||||
<td><code class="Nm">rgbfix</code></td>
|
||||
<td>[<code class="Fl"><a href="#j">-j</a><a href="#s">s</a><a href="#V">V</a><a href="#v">v</a></code>] [<code class="Fl"><a href="#C">-C</a></code> |
|
||||
<code class="Fl"><a href="#c">-c</a></code>] [<code class="Fl"><a href="#f">-f</a></code>
|
||||
<var class="Ar">fix_spec</var>] [<code class="Fl"><a href="#i">-i</a></code>
|
||||
<var class="Ar">game_id</var>] [<code class="Fl"><a href="#k">-k</a></code>
|
||||
<var class="Ar">licensee_str</var>] [<code class="Fl"><a href="#l">-l</a></code>
|
||||
<var class="Ar">licensee_id</var>] [<code class="Fl"><a href="#m">-m</a></code>
|
||||
<var class="Ar">mbc_type</var>] [<code class="Fl"><a href="#n">-n</a></code>
|
||||
<var class="Ar">rom_version</var>] [<code class="Fl"><a href="#p">-p</a></code>
|
||||
<var class="Ar">pad_value</var>] [<code class="Fl"><a href="#r">-r</a></code>
|
||||
<var class="Ar">ram_size</var>] [<code class="Fl"><a href="#t">-t</a></code>
|
||||
<var class="Ar">title_str</var>] <var class="Ar">file</var></td>
|
||||
</tr>
|
||||
</table>
|
||||
</section>
|
||||
<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 correctness operations, such as padding.
|
||||
<p class="Pp">Note that options can be abbreviated as long as the abbreviation
|
||||
is unambiguous: <code class="Fl">--verb</code> is
|
||||
<code class="Fl">--verbose</code>, but
|
||||
<code class="Fl">--ver</code> is invalid because it
|
||||
could also be <code class="Fl">--version</code>. The
|
||||
arguments are as follows:</p>
|
||||
<dl class="Bl-tag">
|
||||
<dt><a class="permalink" href="#C"><code class="Fl" id="C">-C</code></a>,
|
||||
<code class="Fl">--color-only</code></dt>
|
||||
<dd>Set the Game Boy Color–only flag: <span class="Ad">0x143</span> =
|
||||
0xC0. If both this and the <code class="Fl">-c</code> flag are set, this
|
||||
takes precedence.</dd>
|
||||
<dt><a class="permalink" href="#c"><code class="Fl" id="c">-c</code></a>,
|
||||
<code class="Fl">--color-compatible</code></dt>
|
||||
<dd>Set the Game Boy Color–compatible flag:
|
||||
<span class="Ad">0x143</span> = 0x80. If both this and the
|
||||
<code class="Fl">-C</code> flag are set, <code class="Fl">-C</code> takes
|
||||
precedence.</dd>
|
||||
<dt><a class="permalink" href="#f"><code class="Fl" id="f">-f</code></a>
|
||||
<var class="Ar">fix_spec</var>,
|
||||
<code class="Fl">--fix-spec</code>
|
||||
<var class="Ar">fix_spec</var></dt>
|
||||
<dd>Fix certain header values that the Game Boy checks for correctness.
|
||||
Alternatively, intentionally trash these values by writing their binary
|
||||
inverse instead. <var class="Ar">fix_spec</var> is a string containing any
|
||||
combination of the following characters:
|
||||
<p class="Pp"></p>
|
||||
<dl class="Bl-tag Bl-compact">
|
||||
<dt><a class="permalink" href="#l"><code class="Cm" id="l">l</code></a></dt>
|
||||
<dd>Fix the Nintendo logo
|
||||
(<span class="Ad">0x104</span>–<span class="Ad">0x133</span>).</dd>
|
||||
<dt><a class="permalink" href="#L"><code class="Cm" id="L">L</code></a></dt>
|
||||
<dd>Trash the Nintendo logo.</dd>
|
||||
<dt><a class="permalink" href="#h"><code class="Cm" id="h">h</code></a></dt>
|
||||
<dd>Fix the header checksum (<span class="Ad">0x14D</span>).</dd>
|
||||
<dt><a class="permalink" href="#H"><code class="Cm" id="H">H</code></a></dt>
|
||||
<dd>Trash the header checksum.</dd>
|
||||
<dt><a class="permalink" href="#g"><code class="Cm" id="g">g</code></a></dt>
|
||||
<dd>Fix the global checksum
|
||||
(<span class="Ad">0x14E</span>–<span class="Ad">0x14F</span>).</dd>
|
||||
<dt><a class="permalink" href="#G"><code class="Cm" id="G">G</code></a></dt>
|
||||
<dd>Trash the global checksum.</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt><a class="permalink" href="#i"><code class="Fl" id="i">-i</code></a>
|
||||
<var class="Ar">game_id</var>,
|
||||
<code class="Fl">--game-id</code>
|
||||
<var class="Ar">game_id</var></dt>
|
||||
<dd>Set the game ID string
|
||||
(<span class="Ad">0x13F</span>–<span class="Ad">0x142</span>) to a
|
||||
given string of exactly 4 characters. If both this and the title are set,
|
||||
the game ID will overwrite the overlapping portion of the title.</dd>
|
||||
<dt><a class="permalink" href="#j"><code class="Fl" id="j">-j</code></a>,
|
||||
<code class="Fl">--non-japanese</code></dt>
|
||||
<dd>Set the non-Japanese region flag: <span class="Ad">0x14A</span> = 1.</dd>
|
||||
<dt><a class="permalink" href="#k"><code class="Fl" id="k">-k</code></a>
|
||||
<var class="Ar">licensee_str</var>,
|
||||
<code class="Fl">--new-licensee</code>
|
||||
<var class="Ar">licensee_str</var></dt>
|
||||
<dd>Set the new licensee string
|
||||
(<span class="Ad">0x144</span>–<span class="Ad">0x145</span>) to a
|
||||
given string, truncated to at most two characters.</dd>
|
||||
<dt><a class="permalink" href="#l_2"><code class="Fl" id="l_2">-l</code></a>
|
||||
<var class="Ar">licensee_id</var>,
|
||||
<code class="Fl">--old-licensee</code>
|
||||
<var class="Ar">licensee_id</var></dt>
|
||||
<dd>Set the old licensee code, <span class="Ad">0x14B</span>, to a given value
|
||||
from 0 to 0xFF. This value is deprecated and should be set to 0x33 in all
|
||||
new software.</dd>
|
||||
<dt><a class="permalink" href="#m"><code class="Fl" id="m">-m</code></a>
|
||||
<var class="Ar">mbc_type</var>,
|
||||
<code class="Fl">--mbc-type</code>
|
||||
<var class="Ar">mbc_type</var></dt>
|
||||
<dd>Set the MBC type, <span class="Ad">0x147</span>, to a given value from 0
|
||||
to 0xFF.</dd>
|
||||
<dt><a class="permalink" href="#n"><code class="Fl" id="n">-n</code></a>
|
||||
<var class="Ar">rom_version</var>,
|
||||
<code class="Fl">--rom-version</code>
|
||||
<var class="Ar">rom_version</var></dt>
|
||||
<dd>Set the ROM version, <span class="Ad">0x14C</span>, to a given value from
|
||||
0 to 0xFF.</dd>
|
||||
<dt><a class="permalink" href="#p"><code class="Fl" id="p">-p</code></a>
|
||||
<var class="Ar">pad_value</var>,
|
||||
<code class="Fl">--pad-value</code>
|
||||
<var class="Ar">pad_value</var></dt>
|
||||
<dd>Pad the image to a valid size with a given pad value from 0 to 0xFF.
|
||||
<code class="Nm">rgbfix</code> will automatically pick a size from 32 KiB,
|
||||
64 KiB, 128 KiB, ..., 8192 KiB. The cartridge size byte
|
||||
(<span class="Ad">0x148</span>) will be changed to reflect this new
|
||||
size.</dd>
|
||||
<dt><a class="permalink" href="#r"><code class="Fl" id="r">-r</code></a>
|
||||
<var class="Ar">ram_size</var>,
|
||||
<code class="Fl">--ram-size</code>
|
||||
<var class="Ar">ram_size</var></dt>
|
||||
<dd>Set the RAM size, <span class="Ad">0x149</span>, to a given value from 0
|
||||
to 0xFF.</dd>
|
||||
<dt><a class="permalink" href="#s"><code class="Fl" id="s">-s</code></a>,
|
||||
<code class="Fl">--sgb-compatible</code></dt>
|
||||
<dd>Set the SGB flag: <span class="Ad">0x146</span> = 3. This flag will be
|
||||
ignored by the SGB unless the old licensee code is 0x33!</dd>
|
||||
<dt><a class="permalink" href="#t"><code class="Fl" id="t">-t</code></a>
|
||||
<var class="Ar">title</var>,
|
||||
<code class="Fl">--title</code>
|
||||
<var class="Ar">title</var></dt>
|
||||
<dd>Set the title string
|
||||
(<span class="Ad">0x134</span>–<span class="Ad">0x143</span>) 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
|
||||
(<code class="Fl">-c</code> or <code class="Fl">-C</code>). If both this
|
||||
and the game ID are set, the game ID will overwrite the overlapping
|
||||
portion of the title.</dd>
|
||||
<dt><a class="permalink" href="#V"><code class="Fl" id="V">-V</code></a>,
|
||||
<code class="Fl">--version</code></dt>
|
||||
<dd>Print the version of the program and exit.</dd>
|
||||
<dt><a class="permalink" href="#v"><code class="Fl" id="v">-v</code></a>,
|
||||
<code class="Fl">--validate</code></dt>
|
||||
<dd>Equivalent to <code class="Fl">-f</code> <code class="Cm">lhg</code>.</dd>
|
||||
</dl>
|
||||
</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
|
||||
for a workable program are the header checksum, the Nintendo logo, and (if
|
||||
needed) the CGB/SGB flags. It is a good idea to pad the image to a valid size
|
||||
as well (“valid” meaning a power of 2, times 32 KiB).
|
||||
<p class="Pp">The following will make a plain, non-color Game Boy game without
|
||||
checking for a valid size:</p>
|
||||
<p class="Pp"></p>
|
||||
<div class="Bd Bd-indent">$ rgbfix -v foo.gb</div>
|
||||
<p class="Pp">The following will make a SGB-enabled, color-enabled game with a
|
||||
title of “foobar”, and pad it to a valid size. (The Game Boy
|
||||
itself does not use the title, but some emulators or ROM managers do.)</p>
|
||||
<p class="Pp"></p>
|
||||
<div class="Bd Bd-indent">$ rgbfix -vcs -l 0x33 -p 255 -t foobar baz.gb</div>
|
||||
<p class="Pp">The following will duplicate the header (sans global checksum) of
|
||||
the game “Survival Kids”:</p>
|
||||
<p class="Pp"></p>
|
||||
<div class="Bd Bd-indent">$ rgbfix -cjsv -k A4 -l 0x33 -m 0x1B -p 0xFF -r 3 -t
|
||||
SURVIVALKIDAVKE SurvivalKids.gbc</div>
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="BUGS"><a class="permalink" href="#BUGS">BUGS</a></h1>
|
||||
Please report bugs on
|
||||
<a class="Lk" href="https://github.com/rednex/rgbds/issues">GitHub</a>.
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
|
||||
ALSO</a></h1>
|
||||
<a class="Xr" href="rgbasm.1.html">rgbasm(1)</a>, <a class="Xr" href="rgblink.1.html">rgblink(1)</a>,
|
||||
<a class="Xr" href="rgbds.7.html">rgbds(7)</a>
|
||||
</section>
|
||||
<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ørensen as a standalone program called gbfix, and was later packaged
|
||||
in RGBDS by Justin Lloyd. It is now maintained by a number of contributors at
|
||||
<a class="Lk" href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>.
|
||||
</section>
|
||||
</div>
|
||||
<table class="foot">
|
||||
<tr>
|
||||
<td class="foot-date">December 5, 2019</td>
|
||||
<td class="foot-os">General</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,220 +0,0 @@
|
||||
<!DOCTYPE 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>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="utf-8"/>
|
||||
<link rel="stylesheet" href="mandoc.css" type="text/css" media="all"/>
|
||||
<link rel="stylesheet" href="rgbds.css" type="text/css" media="all"/>
|
||||
<title>RGBGFX(1)</title>
|
||||
</head>
|
||||
<body>
|
||||
<table class="head">
|
||||
<tr>
|
||||
<td class="head-ltitle">RGBGFX(1)</td>
|
||||
<td class="head-vol">General Commands Manual</td>
|
||||
<td class="head-rtitle">RGBGFX(1)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="manual-text">
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
|
||||
<code class="Nm">rgbgfx</code> —
|
||||
<span class="Nd">Game Boy graphics converter</span>
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
|
||||
<table class="Nm">
|
||||
<tr>
|
||||
<td><code class="Nm">rgbgfx</code></td>
|
||||
<td>[<code class="Fl"><a href="#C">-C</a><a href="#D">D</a><a href="#h">h</a><a href="#m">m</a><a href="#u">u</a><a href="#V">V</a><a href="#v">v</a></code>] [<code class="Fl"><a href="#f">-f</a></code> |
|
||||
<code class="Fl"><a href="#F">-F</a></code>] [<code class="Fl"><a href="#a">-a</a></code>
|
||||
<var class="Ar">attrmap</var> | <code class="Fl"><a href="#A">-A</a></code>]
|
||||
[<code class="Fl"><a href="#d">-d</a></code> <var class="Ar">depth</var>]
|
||||
[<code class="Fl"><a href="#o">-o</a></code> <var class="Ar">out_file</var>]
|
||||
[<code class="Fl"><a href="#p">-p</a></code> <var class="Ar">pal_file</var> |
|
||||
<code class="Fl"><a href="#P">-P</a></code>] [<code class="Fl"><a href="#t">-t</a></code>
|
||||
<var class="Ar">tilemap</var> | <code class="Fl"><a href="#T">-T</a></code>]
|
||||
[<code class="Fl"><a href="#x">-x</a></code> <var class="Ar">tiles</var>]
|
||||
<var class="Ar">file</var></td>
|
||||
</tr>
|
||||
</table>
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
|
||||
The <code class="Nm">rgbgfx</code> program converts PNG images into the Nintendo
|
||||
Game Boy's planar tile format.
|
||||
<p class="Pp">The resulting colors and their palette indices are determined
|
||||
differently depending on the input PNG file:</p>
|
||||
<ul class="Bl-dash">
|
||||
<li>If the file has an embedded palette, that palette's color and order are
|
||||
used.</li>
|
||||
<li>If not, and the image only contains shades of gray, rgbgfx maps them to
|
||||
the indices appropriate for each shade. Any undetermined indices are set
|
||||
to respective default shades of gray. For example: if the bit depth is 2
|
||||
and the image contains light gray and black, they become the second and
|
||||
fourth colors, and the first and third colors get set to default white and
|
||||
dark gray. If the image has multiple shades that map to the same index,
|
||||
the palette is instead determined as if the image had color.</li>
|
||||
<li>If the image has color (or the grayscale method failed), the colors are
|
||||
sorted from lightest to darkest.</li>
|
||||
</ul>
|
||||
<p class="Pp">The input image may not contain more colors than the selected bit
|
||||
depth allows. Transparent pixels are set to palette index 0.</p>
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="ARGUMENTS"><a class="permalink" href="#ARGUMENTS">ARGUMENTS</a></h1>
|
||||
Note that options can be abbreviated as long as the abbreviation is unambiguous:
|
||||
<code class="Fl">--verb</code> is
|
||||
<code class="Fl">-</code> <code class="Fl">-verbose</code>, but
|
||||
<code class="Fl">--ver</code> is invalid because it
|
||||
could also be <code class="Fl">--version</code>. The
|
||||
arguments are as follows:
|
||||
<dl class="Bl-tag">
|
||||
<dt><a class="permalink" href="#a"><code class="Fl" id="a">-a</code></a>
|
||||
<var class="Ar">attrmap,</var>
|
||||
<code class="Fl">--attr-map</code>
|
||||
<var class="Ar">attrmap</var></dt>
|
||||
<dd>Generate a file of tile mirroring attributes for OAM or (CGB-only)
|
||||
background tiles. For each tile in the input file, a byte is written
|
||||
representing the dimensions that the associated tile in the output file
|
||||
should be mirrored. Useful in combination with <code class="Fl">-m</code>
|
||||
to keep track the mirror direction of mirrored duplicate tiles.</dd>
|
||||
<dt><a class="permalink" href="#A"><code class="Fl" id="A">-A</code></a>,
|
||||
<code class="Fl">--output-attr-map</code></dt>
|
||||
<dd>Same as <code class="Fl">-a</code>, but the attrmap file output name is
|
||||
made by taking the input filename, removing the file extension, and
|
||||
appending <span class="Pa">.attrmap</span>.</dd>
|
||||
<dt><a class="permalink" href="#C"><code class="Fl" id="C">-C</code></a>,
|
||||
<code class="Fl">--color-curve</code></dt>
|
||||
<dd>Use the color curve of the Game Boy Color when generating palettes.</dd>
|
||||
<dt><a class="permalink" href="#D"><code class="Fl" id="D">-D</code></a>,
|
||||
<code class="Fl">--debug</code></dt>
|
||||
<dd>Debug features are enabled.</dd>
|
||||
<dt><a class="permalink" href="#d"><code class="Fl" id="d">-d</code></a>
|
||||
<var class="Ar">depth</var>,
|
||||
<code class="Fl">--depth</code>
|
||||
<var class="Ar">depth</var></dt>
|
||||
<dd>The bit depth of the output image (either 1 or 2). By default, the bit
|
||||
depth is 2 (two bits per pixel).</dd>
|
||||
<dt><a class="permalink" href="#f"><code class="Fl" id="f">-f</code></a>,
|
||||
<code class="Fl">--fix</code></dt>
|
||||
<dd>Fix the input PNG file to be a correctly indexed image.</dd>
|
||||
<dt><a class="permalink" href="#F"><code class="Fl" id="F">-F</code></a>,
|
||||
<code class="Fl">--fix-and-save</code></dt>
|
||||
<dd>Same as <code class="Fl">-f</code>, but additionally, the supplied command
|
||||
line parameters are saved within the PNG and will be loaded and
|
||||
automatically used next time.</dd>
|
||||
<dt><a class="permalink" href="#h"><code class="Fl" id="h">-h</code></a>,
|
||||
<code class="Fl">--horizontal</code></dt>
|
||||
<dd>Lay out tiles horizontally rather than vertically.</dd>
|
||||
<dt><a class="permalink" href="#m"><code class="Fl" id="m">-m</code></a>,
|
||||
<code class="Fl">--mirror-tiles</code></dt>
|
||||
<dd>Truncate tiles by checking for tiles that are mirrored versions of others
|
||||
and omitting these from the output file. Useful with tilemaps and attrmaps
|
||||
together to keep track of the duplicated tiles and the dimension mirrored.
|
||||
Tiles are checked for horizontal, vertical, and horizontal-vertical
|
||||
mirroring. Implies <code class="Fl">-u</code>.</dd>
|
||||
<dt><a class="permalink" href="#o"><code class="Fl" id="o">-o</code></a>
|
||||
<var class="Ar">out_file</var>,
|
||||
<code class="Fl">--output</code>
|
||||
<var class="Ar">out_file</var></dt>
|
||||
<dd>The name of the output file.</dd>
|
||||
<dt><a class="permalink" href="#p"><code class="Fl" id="p">-p</code></a>
|
||||
<var class="Ar">pal_file</var>,
|
||||
<code class="Fl">--palette</code>
|
||||
<var class="Ar">pal_file</var></dt>
|
||||
<dd>Output the image's palette in standard GBC palette format: bytes (8 bytes
|
||||
for two bits per pixel, 4 bytes for one bit per pixel) containing the
|
||||
RGB15 values in little-endian byte order. If the palette contains too few
|
||||
colors, the remaining entries are set to black.</dd>
|
||||
<dt><a class="permalink" href="#P"><code class="Fl" id="P">-P</code></a>,
|
||||
<code class="Fl">--output-palette</code></dt>
|
||||
<dd>Same as <code class="Fl">-p</code>, but the palette file output name is
|
||||
made by taking the input PNG file's filename, removing the file extension,
|
||||
and appending <span class="Pa">.pal</span>.</dd>
|
||||
<dt><a class="permalink" href="#t"><code class="Fl" id="t">-t</code></a>
|
||||
<var class="Ar">tilemap</var>,
|
||||
<code class="Fl">--tilemap</code>
|
||||
<var class="Ar">tilemap</var></dt>
|
||||
<dd>Generate a file of tile indices. For each tile in the input file, a byte
|
||||
is written representing the index of the associated tile in the output
|
||||
file. Useful in combination with <code class="Fl">-u</code> or
|
||||
<code class="Fl">-m</code> to keep track of duplicate tiles.</dd>
|
||||
<dt><a class="permalink" href="#T"><code class="Fl" id="T">-T</code></a>,
|
||||
<code class="Fl">--output-tilemap</code></dt>
|
||||
<dd>Same as <code class="Fl">-t</code>, but the tilemap file output name is
|
||||
made by taking the input filename, removing the file extension, and
|
||||
appending <span class="Pa">.tilemap</span>.</dd>
|
||||
<dt><a class="permalink" href="#u"><code class="Fl" id="u">-u</code></a>,
|
||||
<code class="Fl">--unique-tiles</code></dt>
|
||||
<dd>Truncate tiles by checking for tiles that are exact duplicates of others
|
||||
and omitting these from the output file. Useful with tilemaps to keep
|
||||
track of the duplicated tiles.</dd>
|
||||
<dt><a class="permalink" href="#V"><code class="Fl" id="V">-V</code></a>,
|
||||
<code class="Fl">--version</code></dt>
|
||||
<dd>Print the version of the program and exit.</dd>
|
||||
<dt><a class="permalink" href="#v"><code class="Fl" id="v">-v</code></a>,
|
||||
<code class="Fl">--verbose</code></dt>
|
||||
<dd>Verbose. Print errors when the command line parameters and the parameters
|
||||
in the PNG file don't match.</dd>
|
||||
<dt><a class="permalink" href="#x"><code class="Fl" id="x">-x</code></a>
|
||||
<var class="Ar">tiles</var>,
|
||||
<code class="Fl">--trim-end</code>
|
||||
<var class="Ar">tiles</var></dt>
|
||||
<dd>Trim the end of the output file by this many tiles.</dd>
|
||||
</dl>
|
||||
</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
|
||||
planar 2bpp data:
|
||||
<p class="Pp"></p>
|
||||
<div class="Bd Bd-indent">$ rgbgfx -o out.2bpp in.png</div>
|
||||
<p class="Pp">The following creates a planar 2bpp file with only unique tiles,
|
||||
and its tilemap <span class="Pa">out.tilemap</span>:</p>
|
||||
<p class="Pp"></p>
|
||||
<div class="Bd Bd-indent">$ rgbgfx -T -u -o out.2bpp in.png</div>
|
||||
<p class="Pp">The following creates a planar 2bpp file with only unique tiles
|
||||
<span class="Pa">accounting for tile mirroring</span> and its associated
|
||||
tilemap <span class="Pa">out.tilemap</span> and attrmap
|
||||
<span class="Pa">out.attrmap</span>:</p>
|
||||
<p class="Pp"></p>
|
||||
<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="BUGS"><a class="permalink" href="#BUGS">BUGS</a></h1>
|
||||
Please report bugs on
|
||||
<a class="Lk" href="https://github.com/rednex/rgbds/issues">GitHub</a>.
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
|
||||
ALSO</a></h1>
|
||||
<a class="Xr" href="rgbds.7.html">rgbds(7)</a>, <a class="Xr" href="rgbasm.1.html">rgbasm(1)</a>,
|
||||
<a class="Xr" href="rgblink.1.html">rgblink(1)</a>, <a class="Xr" href="rgbfix.1.html">rgbfix(1)</a>,
|
||||
<a class="Xr" href="gbz80.7.html">gbz80(7)</a>
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
|
||||
<code class="Nm">rgbgfx</code> was created by <span class="An">stag019</span> to
|
||||
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">
|
||||
<tr>
|
||||
<td class="foot-date">December 5, 2019</td>
|
||||
<td class="foot-os">General</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,192 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<!-- This is an automatically generated file. Do not edit.
|
||||
This file is part of RGBDS.
|
||||
|
||||
Copyright (c) 2010-2019, Anthony J. Bentley and RGBDS contributors.
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
-->
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="utf-8"/>
|
||||
<link rel="stylesheet" href="mandoc.css" type="text/css" media="all"/>
|
||||
<link rel="stylesheet" href="rgbds.css" type="text/css" media="all"/>
|
||||
<title>RGBLINK(1)</title>
|
||||
</head>
|
||||
<body>
|
||||
<table class="head">
|
||||
<tr>
|
||||
<td class="head-ltitle">RGBLINK(1)</td>
|
||||
<td class="head-vol">General Commands Manual</td>
|
||||
<td class="head-rtitle">RGBLINK(1)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="manual-text">
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
|
||||
<code class="Nm">rgblink</code> —
|
||||
<span class="Nd">Game Boy linker</span>
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
|
||||
<table class="Nm">
|
||||
<tr>
|
||||
<td><code class="Nm">rgblink</code></td>
|
||||
<td>[<code class="Fl"><a href="#d">-d</a><a href="#t">t</a><a href="#V">V</a><a href="#v">v</a><a href="#w">w</a><a href="#x">x</a></code>] [<code class="Fl"><a href="#l">-l</a></code>
|
||||
<var class="Ar">linker_script</var>] [<code class="Fl"><a href="#m">-m</a></code>
|
||||
<var class="Ar">map_file</var>] [<code class="Fl"><a href="#n">-n</a></code>
|
||||
<var class="Ar">sym_file</var>] [<code class="Fl"><a href="#O">-O</a></code>
|
||||
<var class="Ar">overlay_file</var>] [<code class="Fl"><a href="#o">-o</a></code>
|
||||
<var class="Ar">out_file</var>] [<code class="Fl"><a href="#p">-p</a></code>
|
||||
<var class="Ar">pad_value</var>] [<code class="Fl"><a href="#s">-s</a></code>
|
||||
<var class="Ar">symbol</var>] <var class="Ar">file ...</var></td>
|
||||
</tr>
|
||||
</table>
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
|
||||
The <code class="Nm">rgblink</code> program links RGB object files, typically
|
||||
created by <a class="Xr" href="rgbasm.1.html">rgbasm(1)</a>, into a single Game Boy ROM file. The
|
||||
format is documented in <a class="Xr" href="rgbds.5.html">rgbds(5)</a>.
|
||||
<p class="Pp">ROM0 sections are placed in the first 16 KiB of the output ROM,
|
||||
and ROMX sections are placed in any 16 KiB “bank” except the
|
||||
first. If your ROM will only be 32 KiB, you can use the
|
||||
<code class="Fl">-t</code> option to change this.</p>
|
||||
<p class="Pp">Similarly, WRAM0 sections are placed in the first 4 KiB of WRAM
|
||||
(“bank 0”), and WRAMX sections are placed in any bank of the
|
||||
last 4 KiB. If your ROM doesn't use banked WRAM, you can use the
|
||||
<code class="Fl">-w</code> option to change this.</p>
|
||||
<p class="Pp">Also, if your ROM is designed for a monochrome Game Boy, you can
|
||||
make sure that you don't use any incompatible section by using the
|
||||
<code class="Fl">-d</code> option, which implies <code class="Fl">-w</code>
|
||||
but also prohibits the use of banked VRAM.</p>
|
||||
<p class="Pp">Note that options can be abbreviated as long as the abbreviation
|
||||
is unambiguous: <code class="Fl">--verb</code> is
|
||||
<code class="Fl">--verbose</code>, but
|
||||
<code class="Fl">--ver</code> is invalid because it
|
||||
could also be <code class="Fl">--version</code>. The
|
||||
arguments are as follows:</p>
|
||||
<dl class="Bl-tag">
|
||||
<dt><a class="permalink" href="#d"><code class="Fl" id="d">-d</code></a>,
|
||||
<code class="Fl">--dmg</code></dt>
|
||||
<dd>Enable DMG mode. Prohibit the use of sections that doesn't exist on a DMG,
|
||||
such as VRAM bank 1. This option automatically enables
|
||||
<code class="Fl">-w</code>.</dd>
|
||||
<dt><a class="permalink" href="#l"><code class="Fl" id="l">-l</code></a>
|
||||
<var class="Ar">linker_script,</var>
|
||||
<code class="Fl">--linkerscript</code>
|
||||
<var class="Ar">linker_script</var></dt>
|
||||
<dd>Specify a linker script file that tells the linker how sections must be
|
||||
placed in the ROM. The attributes assigned in the linker script must be
|
||||
consistent with any assigned in the code. See <a class="Xr" href="rgblink.5.html">rgblink(5)</a>
|
||||
for more information about the linker script format.</dd>
|
||||
<dt><a class="permalink" href="#m"><code class="Fl" id="m">-m</code></a>
|
||||
<var class="Ar">map_file</var>,
|
||||
<code class="Fl">--map</code>
|
||||
<var class="Ar">map_file</var></dt>
|
||||
<dd>Write a map file to the given filename, listing how sections and symbols
|
||||
were assigned.</dd>
|
||||
<dt><a class="permalink" href="#n"><code class="Fl" id="n">-n</code></a>
|
||||
<var class="Ar">sym_file</var>,
|
||||
<code class="Fl">--sym</code>
|
||||
<var class="Ar">sym_file</var></dt>
|
||||
<dd>Write a symbol file to the given filename, listing the address of all
|
||||
exported symbols. Several external programs can use this information, for
|
||||
example to help debugging ROMs.</dd>
|
||||
<dt><a class="permalink" href="#O"><code class="Fl" id="O">-O</code></a>
|
||||
<var class="Ar">overlay_file</var>,
|
||||
<code class="Fl">--overlay</code>
|
||||
<var class="Ar">overlay_file</var></dt>
|
||||
<dd>If specified, sections will be overlaid "on top" of the provided
|
||||
ROM image. In that case, all sections must be fixed. This may be used to
|
||||
patch an existing binary.</dd>
|
||||
<dt><a class="permalink" href="#o"><code class="Fl" id="o">-o</code></a>
|
||||
<var class="Ar">out_file</var>,
|
||||
<code class="Fl">--output</code>
|
||||
<var class="Ar">out_file</var></dt>
|
||||
<dd>Write the ROM image to the given file.</dd>
|
||||
<dt><a class="permalink" href="#p"><code class="Fl" id="p">-p</code></a>
|
||||
<var class="Ar">pad_value</var>,
|
||||
<code class="Fl">--pad</code>
|
||||
<var class="Ar">pad_value</var></dt>
|
||||
<dd>When inserting padding between sections, pad with this value. Has no
|
||||
effect if <code class="Fl">-O</code> is specified. The default is 0.</dd>
|
||||
<dt><a class="permalink" href="#s"><code class="Fl" id="s">-s</code></a>
|
||||
<var class="Ar">symbol</var>,
|
||||
<code class="Fl">--smart</code>
|
||||
<var class="Ar">symbol</var></dt>
|
||||
<dd>This option is ignored. It was supposed to perform smart linking but fell
|
||||
into disrepair, and so has been removed. It will be reimplemented at some
|
||||
point.</dd>
|
||||
<dt><a class="permalink" href="#t"><code class="Fl" id="t">-t</code></a>,
|
||||
<code class="Fl">--tiny</code></dt>
|
||||
<dd>Expand the ROM0 section size from 16 KiB to the full 32 KiB assigned to
|
||||
ROM. ROMX sections that are fixed to a bank other than 1 become errors,
|
||||
other ROMX sections are treated as ROM0. Useful for ROMs that fit in 32
|
||||
KiB.</dd>
|
||||
<dt><a class="permalink" href="#V"><code class="Fl" id="V">-V</code></a>,
|
||||
<code class="Fl">--version</code></dt>
|
||||
<dd>Print the version of the program and exit.</dd>
|
||||
<dt><a class="permalink" href="#v"><code class="Fl" id="v">-v</code></a>,
|
||||
<code class="Fl">--verbose</code></dt>
|
||||
<dd>Verbose: enable printing more information to standard error.</dd>
|
||||
<dt><a class="permalink" href="#w"><code class="Fl" id="w">-w</code></a>,
|
||||
<code class="Fl">--wramx</code></dt>
|
||||
<dd>Expand the WRAM0 section size from 4 KiB to the full 8 KiB assigned to
|
||||
WRAM. WRAMX sections that are fixed to a bank other than 1 become errors,
|
||||
other WRAMX sections are treated as WRAM0.</dd>
|
||||
<dt><a class="permalink" href="#x"><code class="Fl" id="x">-x</code></a>,
|
||||
<code class="Fl">--nopad</code></dt>
|
||||
<dd>Disables padding the end of the final file. This option automatically
|
||||
enables <code class="Fl">-t</code>. You can use this when not not making a
|
||||
ROM. When making a ROM, be careful that not using this is not a
|
||||
replacement for <a class="Xr" href="rgbfix.1.html">rgbfix(1)</a>'s <code class="Fl">-p</code>
|
||||
option!</dd>
|
||||
</dl>
|
||||
</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
|
||||
image like so:
|
||||
<p class="Pp"></p>
|
||||
<div class="Bd Bd-indent">$ rgblink -o bar.gb foo.o</div>
|
||||
<p class="Pp">The resulting <var class="Ar">bar.gb</var> will not have correct
|
||||
checksums (unless you put them in the assembly source). You should use
|
||||
<a class="Xr" href="rgbfix.1.html">rgbfix(1)</a> to fix these so that the program will actually
|
||||
run in a Game Boy:</p>
|
||||
<p class="Pp"></p>
|
||||
<div class="Bd Bd-indent"><code class="Li">$ rgbfix -v bar.gb</code></div>
|
||||
<p class="Pp">Here is a more complete example:</p>
|
||||
<p class="Pp"></p>
|
||||
<div class="Bd Bd-indent"><code class="Li">$ rgblink -o bin/game.gb -n
|
||||
bin/game.sym -p 0xFF obj/title.o obj/engine.o</code></div>
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="BUGS"><a class="permalink" href="#BUGS">BUGS</a></h1>
|
||||
Please report bugs on
|
||||
<a class="Lk" href="https://github.com/rednex/rgbds/issues">GitHub</a>.
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
|
||||
ALSO</a></h1>
|
||||
<a class="Xr" href="rgbasm.1.html">rgbasm(1)</a>, <a class="Xr" href="rgblink.5.html">rgblink(5)</a>,
|
||||
<a class="Xr" href="rgbfix.1.html">rgbfix(1)</a>, <a class="Xr" href="rgbds.5.html">rgbds(5)</a>,
|
||||
<a class="Xr" href="rgbds.7.html">rgbds(7)</a>
|
||||
</section>
|
||||
<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ørensen as part of the ASMotor package, and was later packaged in
|
||||
RGBDS by Justin Lloyd. It is now maintained by a number of contributors at
|
||||
<a class="Lk" href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>.
|
||||
</section>
|
||||
</div>
|
||||
<table class="foot">
|
||||
<tr>
|
||||
<td class="foot-date">November 26, 2019</td>
|
||||
<td class="foot-os">General</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,111 +0,0 @@
|
||||
<!DOCTYPE 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>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="utf-8"/>
|
||||
<link rel="stylesheet" href="mandoc.css" type="text/css" media="all"/>
|
||||
<link rel="stylesheet" href="rgbds.css" type="text/css" media="all"/>
|
||||
<title>RGBLINK(5)</title>
|
||||
</head>
|
||||
<body>
|
||||
<table class="head">
|
||||
<tr>
|
||||
<td class="head-ltitle">RGBLINK(5)</td>
|
||||
<td class="head-vol">File Formats Manual</td>
|
||||
<td class="head-rtitle">RGBLINK(5)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="manual-text">
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
|
||||
<code class="Nm">rgblink</code> —
|
||||
<span class="Nd">linker script file format</span>
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
|
||||
The linker script is an external file that allows the user to specify the order
|
||||
of sections at link time and in a centralized manner.
|
||||
<p class="Pp">A linker script consists on a series of banks followed by a list
|
||||
of sections and, optionally, commands. They can be lowercase or uppercase,
|
||||
it is ignored. Any line can contain a comment starting with
|
||||
‘<code class="Li">;</code>’ that ends at the end of the
|
||||
line:</p>
|
||||
<div class="Bd Pp Bd-indent">
|
||||
<pre>
|
||||
ROMX $F ; This is a comment
|
||||
"Functions to read array"
|
||||
ALIGN 8
|
||||
"Array aligned to 256 bytes"
|
||||
|
||||
WRAMX 2
|
||||
"Some variables"
|
||||
</pre>
|
||||
</div>
|
||||
<p class="Pp">Numbers can be in decimal or hexadecimal format (the prefix is
|
||||
‘<code class="Li">$</code>’). It is an error if any section
|
||||
name or command is found before setting a bank.</p>
|
||||
<p class="Pp">Files can be included by using the <code class="Ic">INCLUDE</code>
|
||||
keyword, followed by a string with the path of the file that has to be
|
||||
included.</p>
|
||||
<p class="Pp">The possible bank types are: <code class="Cm">ROM0</code>,
|
||||
<code class="Cm">ROMX</code>, <code class="Cm">VRAM</code>,
|
||||
<code class="Cm">SRAM</code>, <code class="Cm">WRAM0</code>,
|
||||
<code class="Cm">WRAMX</code>, <code class="Cm">OAM</code> and
|
||||
<code class="Cm">HRAM</code>. Unless there is a single bank, which can occur
|
||||
with types <code class="Cm">ROMX</code>, <code class="Cm">VRAM</code>,
|
||||
<code class="Cm">SRAM</code> and <code class="Cm">WRAMX</code>, it is needed
|
||||
to specify a bank number after the type.</p>
|
||||
<p class="Pp">When a new bank statement is found, sections found after it will
|
||||
be placed right from the beginning of that bank. If the linker script
|
||||
switches to a different bank and then comes back to a previous one, it will
|
||||
continue from the last address that was used.</p>
|
||||
<p class="Pp">The only two commands are <code class="Ic">ORG</code> and
|
||||
<code class="Ic">ALIGN</code>:</p>
|
||||
<ul class="Bl-bullet">
|
||||
<li><a class="permalink" href="#ORG"><code class="Ic" id="ORG">ORG</code></a>
|
||||
sets the address in which new sections will be placed. It can not be lower
|
||||
than the current address.</li>
|
||||
<li><a class="permalink" href="#ALIGN"><code class="Ic" id="ALIGN">ALIGN</code></a>
|
||||
will increase the address until it is aligned to the specified boundary
|
||||
(it tries to set to 0 the number of bits specified after the command:
|
||||
‘<code class="Li">ALIGN 8</code>’ will align to $100).</li>
|
||||
</ul>
|
||||
<p class="Pp"><b class="Sy">Note:</b> The bank, alignment, address and type of
|
||||
sections can be specified both in the source code and in the linker script.
|
||||
For a section to be able to be placed with the linker script, the bank,
|
||||
address and alignment must be left unassigned in the source code or be
|
||||
compatible with what is specified in the linker script. For example,
|
||||
‘<code class="Li">ALIGN[8]</code>’ in the source code is
|
||||
compatible with ‘<code class="Li">ORG $F00</code>’ in the
|
||||
linker script.</p>
|
||||
</section>
|
||||
<section class="Sh">
|
||||
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
|
||||
ALSO</a></h1>
|
||||
<a class="Xr" href="rgbasm.1.html">rgbasm(1)</a>, <a class="Xr" href="rgblink.1.html">rgblink(1)</a>,
|
||||
<a class="Xr" href="rgbfix.1.html">rgbfix(1)</a>, <a class="Xr" href="rgbds.5.html">rgbds(5)</a>,
|
||||
<a class="Xr" href="rgbds.7.html">rgbds(7)</a>
|
||||
</section>
|
||||
<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ørensen as part of the ASMotor package, and was later packaged in
|
||||
RGBDS by Justin Lloyd. It is now maintained by a number of contributors at
|
||||
<a class="Lk" href="https://github.com/rednex/rgbds">https://github.com/rednex/rgbds</a>.
|
||||
</section>
|
||||
</div>
|
||||
<table class="foot">
|
||||
<tr>
|
||||
<td class="foot-date">November 26, 2019</td>
|
||||
<td class="foot-os">General</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user