Overlay Initialization Code - Nintendo Ultra64 Programmer's Manual

Rsp
Table of Contents

Advertisement

Advanced Information
140
#==========================================
OVERLAY_0_OFFSET:
# main module.
.word
.half
.half
#==========================================
#============= NEWTONS OVERLAY ============
#==========================================
OVERLAY_1_OFFSET:
OVERLAY_NEWTON:
# Newton's module laid over boot code.
.word
.half
.half
The size and offset of the microcode objects will be filled in by buildtask,
see Figure 6-2, "buildtask Operation," on page 137.

Overlay Initialization Code

Before we load the overlay we must update the overlay table with the correct
DRAM address for the start of the code. This is usually done immediately at
the beginning of the program, since we require the OSTask structure which
has been copied into DMEM (and may need to be overwritten by the
program).
#####################################################
#
# code overlays:
#
# update table to be real DRAM address:
lw $5, OS_TASK_OFF_UCODE($1)
# PATCH NEWTON ONLY
lw $2, (OVERLAY_1_OFFSET + OVERLAY_OFFSET)(zero)
add $2, $2, $5
sw $2, (OVERLAY_1_OFFSET + OVERLAY_OFFSET)(zero)
0x0
# offset from start of code
0x0
# size in bytes (-1)
0x1080
# destination
0x0
# offset from start of code
0x0
# size in bytes (-1)
0x1000
# destination
# ucode base pointer

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents