Overlay Decision Code; Overlay Dma Code - Nintendo Ultra64 Programmer's Manual

Rsp
Table of Contents

Advertisement

Revision 1.0

Overlay Decision Code

Deciding when to perform an overlay is specific to each program and
overlay function and therefore an example is not necessary. In this case, we
always perform the overlay, since we are loading it over the RSP boot
microcode (reclaiming precious IMEM space!)

Overlay DMA Code

Actually overlaying the new microcode is the same as any other DMA
transfer (See "DMA" on page 96); we use the information from the overlay
table to set the source, destination, and length of the transfer.
# overp points to the proper entry in the
# overlay table.
loadOverlay:
lw
lh
lh
jal
addi
jal
nop
jr
nop
Remember to encode the length as (length-1), or else you might over-write
some important instructions.
dram_addr, OVERLAY_OFFSET(overp)
dma_len,
OVERLAY_SIZE(overp)
imem_addr, OVERLAY_DEST(overp)
DMAproc
iswrite, zero, 0
DMAwait
overeturn
Microcode Overlays
# delay slot
141

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents