N64® Functions Menu

al - Audio Library Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive

Nintendo® Confidential

   

gbi

The graphics binary interface (GBI) manual pages describe the collection of macros in gbi.h that build the graphics display list.

GBI Macros
The GBI interface is a collection of 64-bit commands that are interpreted by either the geometry engine of the RSP or the RDP hardware directly. The macros that are presented as an API, are really just a convenient tool for packing the bitstream of the actual GBI.

There are two macros for each command (g* and gs* macros). The gs* macros represent the graphics static macros. These macros are used to define the static graphics display list using initialized C data structures.

The g* macros are for display list construction at runtime. The g* macros have a display list pointer as the first argument follow by the identical arguments as the gs* macros. This display list pointer should always be of the form glistp++. For macros that produce a single word, the increment operator moves the pointer to the next free position. Macros which generate multiple words (expanding into multiple GBI commands) depend on the convention that the display list pointer is incremented by the caller.

There is a third type of macro, gd*. These macros are used for defining GBI data structures.

The macros hide many optimizations for the RSP geometry engine. This N64 Functions Reference describes these macros as an API for an application program; someone who wishes a complete understanding of the GBI bitstream (to program in a language other than C/C++, for example) should really study the details of all of the macros to determine the precise bit packing required for each command.

Data Structures
The predefined GBI data structures force the compiler to ensure the data is 64-bit aligned. All of the DMA engines, including the one inside the RSP that the microcode uses to get the display list, require 64-bit aligned addresses.


Nintendo® Confidential

Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.

Copyright © 1998
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last updated January 1998