gSPSegment

gSPSegment [Macro]

Function

gSPSegment

Sets the segment register and the base address

Syntax

#include <ultra64.h>        /* gbi.h */
gSPSegment(Gfx *gdl, s32 seg, s32 base)
gsSPSegment(         s32 seg, s32 base)

Arguments

gdl
the pointer to the graphics display list.
seg
the segment ID (0-15)
base
the base physical address

Description

Sets the base physical address of the segment. All pointers in the display list in the Reality Co-Processor (RCP) are segment addresses composed of a segment base and offset address. The actual addresses are calculated by the Reality Signal Processor (RSP) using the following translation:

Physical address = Base address [Segment ID] + Offset

For details, see Section 10.2, "Mixing CPU and SP Data," and Section 11.1.2, "Segmented Memory and the RSP Memory Map" in the N64 Programming Manual.

See Also

osVirtualToPhysical

Revision History

02/01/99 Entirely revised.