S2DEX GBIs are derived from F3DEX. Because of this, they are not compatible with Fast3D GBIs. When using 2SDEX, as with F3DEX, it is necessary to define F3DEX_GBI before including ultra64.h.
In addition, in order to use S2DEX GBIs, it is necessary to include the header file <PR/gs2dex.h>. Insert the include specification after the specification to include <ultra64.h>.
At this point, the S2DEX will be explained in contrast with F3DEX. In general, GBIs related to 3D primitive operations, 4x4 matrix operations, and write definitions may be considered as not being supported by S2DEX.
Only gSP* and gDP* will be mentioned in the following, but the same is true for gsSP* and gsDP*.
DL Processing Control | gSPDisplayList(*) gSPEndDisplayList |
gSPBranchList |
Set Segment | gSPSegment(*) | |
Load Microcode | gSPLoadUcode* | |
Scissoring | gDPSetScissor | gDPSetScissorFrac |
RDP Mode Setting | gSPSetOtherMode gDPSetTexturePersp gDPSetTextureLOD gDPSetTextureFilter gDPSetCombineKey gDPSetAlphaDither gDPSetAlphaCompare gDPSetRenderMode gDPSetDepthImage gDPSetCombineMode |
gDPSetCycleType gDPSetTextureDetail gDPSetTextureLUT gDPSetTextureConvert gDPSetColorDither gDPSetBlendMask gDPSetDepthSource gDPSetColorImage gDPSetTextureImage |
Set Color Values, etc. | gDPSetEnvColor gDPSetFogColor gDPSetPrimColor gDPSetConvert gDPSetKeyGB |
gDPSetBlendColor gDPSetFillColor gDPSetPrimDepth gDPSetKeyR |
Load to MEM | gDPSetTileSize gDPSetTile gDPLoadMultiBlock* gDPLoadMultiTile* gDPLoadTLUT_pal256 |
gDPLoadTile gDPLoadTextureBlock* gDPLoadTextureTile* gDPLoadTLUT_pal16 |
Primitives | gDPFillRectangle gSPTextureRectangle gsSPTextureRectangleFlip |
gDPScisFillRectangle gSPScisTextureRectangle |
Sync Processing | gDPFullSync gDPPipeSync |
gDPTileSync gDPLoadSync |
NOOP | gSPNoOp gDPNoOpTag |
gDPNoOp |
(*) In S2DEX, as in F3DEX, 16 segments can be specified by gSPSegment, and the number of DL links which can be specified by gSPDisplayList is 18.
Field Settings | gSPViewport gSPPerspNormalize |
gSPClipRatio |
Matrix Operations | gSPMatrix gSPInsertMatrix |
gSPPopMatrix gSPForceMatrix |
Vertex Operations | gSPVertex | gSPModifyVertex |
Conditional Branching | gSPCullDisplayList | gSPBranchLessZ* |
Set Polygon Type | gSPSetGeometryMode gSPTexture |
gSPClearGeometryMode gSPTextureL |
Primitives | gSP1Triangle gSP1Quadrangle gSPLineW3D |
gSP2Triangles gSPLine3D |
Lighting | gSPNumLights gSPLightColor gSPLookAt* gDPSetHilite2Tile |
gSPLight gSPSetLights[0-7] gDPSetHilite1Tile |
Fog | gSPFogFactor | gSPFogPosition |
For oId Sprite2D | gSPSprite2DBase gSPSprite2DDraw |
gSPSprite2DScaleFlip |
Render BG | gSPBgRectCopy | gSPBgRect1Cyc |
Render Sprite | gSPObjRectangle gSPObjSprite |
gSPObjRectangleR |
2D Matrix Operations | gSPObjMatrix | gSPObjSubMatrix |
Set Rendering Mode | gSPObjRenderMode | |
Load Texture Processing | gSPObjLoadTxtr | |
Complex Commands | gSPObjLoadTxRect gSPObjLoadTxSprite |
gSPObjLoadTxRectR |
Conditional Branching | gSPSelectDL | gSPSelectBranchDL |
* About overwriting the mode with OtherMode
When changing the mode in F3DEX using g[s]SPSetOtherMode, no more than a maximum for 31 bits could be set with a single g[s]SPSetOtherMode command. With S2DEX, this has been corrected so that 32 bits worth of parameters can be changed with one command.
In addition, normal operation could not be performed in F3DEX if the g[s]DPSetOtherMode command was mixed up with a g*SPSetOtherMode type command when overwriting the mode. (Normal settings cannot be made with g*SPSetOtherMode.) This has been corrected in S2DEX so that these can coexist.