F3DEX3
C GBI Backwards Compatibility with F3DEX2
F3DEX3 is backwards compatible with F3DEX2 at the C GBI level for all commands except:
G_LINE3D(andGfx.line) has been removed. This command did not actually work in F3DEX2 (it behaved as a no-op).G_MW_CLIPhas been removed, andg*SPClipRatiohas been converted into a no-op. Clipping is handled differently in F3DEX3 and it is not recommended to ever change the clip ratio from its default of 2. For microcode development, it can be changed withg*SPClipModSettings.G_MV_MATRIXandG_MW_FORCEMTXhave been removed, andg*SPForceMatrixhas been converted into a no-op. This is because there is no MVP matrix in F3DEX3.G_MVO_LOOKATXandG_MVO_LOOKATYhave been removed, andg*SPLookAtXandg*SPLookAtYare deprecated.g*SPLookAtXhas been changed to set both directions andg*SPLookAtYhas been converted to a no-op. To set the lookat directions, useg*SPLookAt. The lookat directions are now in one 8-bit DMA word, so they must always be set at the same time as each other. Most of the non-functional fields (e.g. color) ofLookAtand its sub-types have been removed, so code which accesses these fields needs to change. Code which only accesses lookat directions should be compatible with no changes.g*SPLightcannot be used to load an ambient light into light 7 (LIGHT_8). It can be used to load directional, point, or ambient lights into lights 0-6 (LIGHT_1throughLIGHT_7). To load an ambient light into light 7 (LIGHT_8) (or to load an ambient light into any slot), useg*SPAmbient. Note that you can now load all your lights with one command,g*SPSetLights; there is no need to set them one-at-a-time withg*SPLight(though you can).
ucode_disas.c and lookathil.c in OoT need relatively minor fixes due to
using removed things. The rest of the OoT codebase does not need code changes.
Binary Display List Backwards Compatibility with F3DEX2
F3DEX3 is generally binary backwards compatible with OoT-style display lists for
objects, scenes, etc. It is not compatible at the binary level with SM64-style
display lists which encode object colors as light colors, as all the command
encodings related to lighting have changed. Of course, if you recompile these
display lists with the new gbi.h, it can run them.
The deprecated commands mentioned above in the C GBI section have had their encodings changed (the original encodings will do bad things / crash). In addition, the following other commands have had their encodings changed, making them binary incompatible:
- All lighting-related commands, e.g.
gdSPDefLights*,g*SPNumLights,g*SPLight,g*SPLightColor,g*SPSetLights*,g*SPLookAt. The basic lighting data structuresLight_t,PosLight_t, andAmbient_thave not changed, butLookAt_tand all the larger data structures such asLightsn,Lights*, andPosLights*have changed. g*SPPerspNormalizebinary encoding has changed.