Overlay Example; Overlay Makefile - Nintendo Ultra64 Programmer's Manual

Rsp
Table of Contents

Advertisement

Advanced Information
138
With this information, a DMA transaction can be programmed to load an
overlay into IMEM.

Overlay Example

To see exactly how this works, let's examine the source code and Makefile
for a simple example.

Overlay Makefile

#######################################################
#
# use the RSP linker 'buildtask' to construct the tasks
# from the objects.
#
# use the rsp2elf program to construct the debug
# executables and library objects
#
gspLine3D:gspLine3D.u newt.u
${BUILDTASK} -f 1 -o $@ gspLine3D.u newt.u
gspLine3D.o:gspLine3D
${RSP2ELF} -p -r $?
...
#######################################################
#
# build the individual objects.
#
newt.u:gspLine3D.u ../newt.s ${COMMON_GFX_CODE}
${RSPASM} ${LCINCS} ${LCDEFS} -DNEWT_ALONE \
-S gspLine3D.u -o $@ ../newt.s
gspLine3D.u:${COMMON_GFX_CODE} ${LINE_CODE}
${RSPASM} ${LCINCS} ${LCDEFS} -o $@ ../gmain.s
In this example, there are two microcode objects: the main program,
gspLine3D.u, and one overlay, newt.u. Each is compiled separately;

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents