mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-29 22:37:50 +00:00
Redefine consistent names for section types, and document the changes.
This commit is contained in:
17
doc/link.htm
17
doc/link.htm
@@ -104,27 +104,14 @@
|
||||
<p>A line starting with # is ignored.
|
||||
<p>If you use libraries they will only be included if one of the objects actually reference them. This works on a SECTION level and not on a module level. This means that when you write libraries you can put each subroutine in its own SECTION so only the relevant bits are included.
|
||||
<h2 id="operationtg">Operation for Gameboy (-tg)</h2>
|
||||
<p><a href="asm.htm#sections">Sections</a> created with <b>HOME</b> in the assembler are placed in the GB bank #0 (the fixed bank $0000-$3FFF) in the order they are loaded from the objectfiles specified in the linkfile. So you want the first file in the linkfile to contain your header. <b>CODE/DATA</b> sections are placed in <em>any bank other than #0</em>. This means you have absolutely <em>no</em> control over which sections goes where. This insures minimal slack (unused bytes) at the end of each bank in the image.
|
||||
<p><a href="asm.htm#sections">Sections</a> created with <b>ROM0</b> in the assembler are placed in the GB bank #0 (the fixed bank $0000-$3FFF) in the order they are loaded from the objectfiles specified in the linkfile. So you want the first file in the linkfile to contain your header. <b>ROMX</b> sections are placed in <em>any bank other than #0</em>. This means you have absolutely <em>no</em> control over which sections goes where. This insures minimal slack (unused bytes) at the end of each bank in the image.
|
||||
<p>Currently the linker doesn't calculate the GB checksums.
|
||||
You must use <a href="fix.htm">RGBFix</a> to do this.
|
||||
|
||||
<h3 id="smallmode">Operation for Gameboy small mode (-ts)</h3>
|
||||
<p>Small mode forces all <b>DATA/CODE</b> sections to be of type <b>HOME</b> and increases the <b>HOME</b> section size from 16kB to 32kB. This also means that <b>CODE/DATA/HOME</b> sections are written to the final image in the order you have specified in the linkfile.
|
||||
<p>Small mode forces all <b>ROMX</b> sections to be of type <b>ROM0</b> and increases the <b>ROM0</b> section size from 16kB to 32kB. This also means that <b>ROM0/ROMX</b> sections are written to the final image in the order you have specified on the command line.
|
||||
<p>Currently the linker doesn't calculate the GB checksums. You must use <a href="fix.htm">RGBFix</a> to do this.
|
||||
|
||||
<h2 id="psion2">Operation for Psion2 relocatable modules (-tp)</h2>
|
||||
<p>This is a fileformat for the Psion2 that allows you to load your code into where ever there's any free space. The only sections types allowed are <b>HOME, DATA and BSS</b>. All CODE and DATA sections are written to the output file in the order specified in the linkfile. The BSS are actually then expanded to DATA sections filled with zeroes and appended. This might change later.
|
||||
<p>The file looks like this (all values are big endian):
|
||||
<pre>
|
||||
LONG NumberOfDataBytes
|
||||
REPT NumberOfDataBytes
|
||||
DB x
|
||||
ENDR
|
||||
LONG NumberOfPatches
|
||||
REPT NumberOfPatches
|
||||
LONG x ; A value to add to the word at address x in the code
|
||||
ENDR
|
||||
</pre>
|
||||
<hr>
|
||||
<p>Last updated 08 October 1997 by <a href="mailto:surfsmurf@matilde.demon.co.uk">Carsten Sorensen</a></p>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user