![Nintendo Ultra64 Programmer'S Manual Download Page 136](http://html1.mh-extra.com/html/nintendo/ultra64/ultra64_programmers-manual_1695448136.webp)
136
Advanced Information
RSP Assembler Tricks
The RSP assembler
rspasm
has several features designed to assist
developing microcode overlays.
IMEM Alignment
Alignment directives like
.bound
and
.align
can be
used in the text section to ensure that overlay destinations
are 64-bit aligned, as required by the DMA engine.
DMEM Initialization
Initialization directives like
.word
and
.half
can be
used to create a table of information necessary to perform
overlays.
DMEM Labels
Labels can be used in the
.data
section so that overlay
information can be easily accessed from the program.
DMEM Symbols
Program symbols (labels) can be used to initialize DMEM
data, generating code overlay destinations (IMEM
addresses) automatically in the second pass of the
assembler.
External Symbol Tables
The
-S
option to the assembler allows you to
specify another microcode object to use as an external
symbol table. This allows you to branch to locations outside
the current microcode object.
A Sample RSP Linker
While not a true “linker”, the program
buildtask
can be used to combine
multiple RSP objects (both text and data sections) into a larger object.
The
buildtask
algorithm is quite simple, it concatenates the text and data
sections, in the order supplied on the command line. It enforces 64-bit
alignment and computes the sizes and offsets from the beginning for each
different overlay object. This information is stored back in the data section
(beginning at 0x0, or the value supplied by the
-d
flag), completing a table
of information necessary to perform overlays.
The behavior of buildtask output is illustrated in Figure 6-2, “buildtask
Operation,” on page 137.
Summary of Contents for Ultra64
Page 2: ...2 ...
Page 10: ...10 ...
Page 12: ...12 Figure 6 2 buildtask Operation 137 ...
Page 14: ...14 ...
Page 80: ...80 Vector Unit Instructions vmadm dres_int dres_int vconst 3 vmadn dres_frac vconst vconst 0 ...
Page 104: ...104 RSP Coprocessor 0 ...
Page 150: ...150 Advanced Information ...
Page 155: ...Revision 1 0 155 ...
Page 248: ...248 Exceptions None ...
Page 251: ...Revision 1 0 251 Exceptions None ...
Page 254: ...254 Exceptions None ...
Page 257: ...Revision 1 0 257 Exceptions None ...
Page 293: ...Revision 1 0 293 Exceptions None ...
Page 316: ...316 Exceptions None ...