Chapter 11 - RSP Graphics Programming
This document describes the graphics state machine of the RCP, with a particular focus on the RSP (please see Section 3.3 "RSP: Reality Signal Processor".)
The RSP is an R4000-like CPU with an 8-element vector unit, featuring a small instruction memory, IMEM (4K bytes or 1K instructions) and small data memory, DMEM (4K bytes). Software (microcode) running on this processor implements a large portion of the geometry display pipeline.
In addition, the RSP provides visibility for all of the RCP functionality, through a variety of software conventions and hardware exposure. All "display lists" for the RCP graphics features must pass through the RSP. There are several important features which require the application programmer to be consciously aware of the distinctions between the RSP and the RDP (and program each of them separately), but for the most part, the RSP serves as the single interface between the application program and the
graphics pipeline:
- Figure 11-1 Nintendo 64 Graphics Pipeline
-
- 11.1 RSP Overview
- 11.1.1 Display List Format
11.1.2 Segmented Memory and the RSP Memory Map
11.1.3 Interaction Between the RSP and N64 CPU Memory Caching
- 11.2 Display List Processing
- 11.2.1 Connecting Display Lists
11.2.2 Branching Display Lists
11.2.3 Ending Display Lists
11.2.4 A Few Words About Optimal Display Lists
- 11.3 Matrix State
- 11.3.1 Insert a Matrix
11.3.2 Pop a Matrix
11.3.3 Perspective Normalization
11.3.4 Note on Coordinate Systems and Big Numbers
11.3.5 A Few Words About Matrix Precision
- 11.4 Vertex State
-
- 11.5 Texture State
-
- 11.6 Clipping and Culling
- 11.6.1 ClipRatio
11.6.2 Near Clipping and gspF3DNoN microcode
11.6.3 Back-Face Polygon Culling
11.6.4 Volume Culling
- 11.7 Vertex Lighting State
- 11.7.1 RSP Microcode
11.7.2 Normal Vector Normalization
- 11.7.3 Ambient and Directional Lighting
- 11.7.3.1 Important Note on Matrix Manipulation
11.7.3.2 Light Structure Definition
11.7.3.3 Note on Light Direction
11.7.3.4 Lighting State Set Up
11.7.3.5 Object Rendering
11.7.3.6 Note on Material Properties
- 11.7.4 Specular Highlights
- 11.7.4.1 Specular Highlight Structure Definition
11.7.4.2 Texture Loading
11.7.4.3 Texture Coordinate Transformations
11.7.4.4 Highlight Position Description
11.7.4.5 Lighting State Set Up
11.7.4.6 Object Rendering
- 11.7.5 Reflection Mapping
- 11.7.5.1 Structure Definition
11.7.5.2 Texture Loading
11.7.5.3 Texture Coordinate Transformations
11.7.5.4 Compatibility with Specular Highlighting
11.7.5.5 Environment Mapping
- 11.8 Vertex Fog State
-
- 11.9 Primitives
- 11.9.1 Triangles
11.9.2 Lines
11.9.3 Rectangles
- 11.10 Controlling the RDP State
-