The graphics binary interface


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

Macro format (g*, gs*)


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 that uses 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 followed 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 rules 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; In order to completely understand the GBI bitstream (to program in a language other than C/C++, for example), it is necessary to study the details of all of the macros to determine the precise bit packing required for each command.


The data of the predefined gbi data structure need to be 64-bit aligned. All of the DMA engines, including the one inside the RSP that the microcode uses to receive the display list, require 64-bit aligned addresses.

Revision History

1999/04/30 Changed Format