gspF3DEX

Function

gspF3DEX.fifo, gspF3DEX.NoN.fifo, gspF3DLX.fifo, gspF3DLX.NoN.fifo, gspF3DLX.Rej.fifo, gspF3DLP.Rej.fifo, gspL3DEX.fifo

-> New microcodes

Description

gspF3DEX.fifo.o, gspF3DEX.NoN.fifo.o:
These are extended versions of the Fast3D microcode with the vertex cache size increased to 32 and 2Triangles instruction implemented. Also the number of DL links has been increased from 10 to 18.
gspF3DEX.fifo.o is a version with Near Clip. gspF3DEX.NoN.fifo.o is a version without Near Clip.
gspF3DLX.fifo.o, gspF3DLX.NoN.fifo.o:
To improve processing speed, this version simplifies the subpixel calculation from that in the F3DEX microcode. Therefore, little wrinkles may appear when using textures.
GBI for F3DLX is compatible with F3DEX. F3DLX can control clipping ON/OFF for an additional functionality. When the clipping is off, performance improves a little. For details, see NewFunctions.jp.
gspF3DLX.fifo.o is a version with Near Clip. gspF3DLX.NoN.fifo.o is a version without Near Clip.
gspF3DLX.Rej.fifo.o, gspF3DLP.Rej.fifo.o:
For this microcode, the clipping processing in the general microcode is removed. Instead, reject processing is included.
n rejection processing, the only triangles drawn are those for which all three vertexes are inside a certain area of the screen. This area is slightly wider than the screen. Even if just one vertex is outside the area, the triangle is not drawn.
This area is called the "reject box." The reject box varies depending on the size of the TV screen. For X and Y, when the screen size is 320 x 240, the reject box is twice as big as the screen at beginning as shown in the following drawing:
The area can be changed by calling g*SPClipRatio. A value can be selected from FRUSTRATIO_2 to FRUSTRATIO_6.
For the Z direction (depth of screen), a reject box can be done with the far plane, but not with the near plane.
      -160                         480
    -120 +--------------------------+
         |                          | ___Reject box when
         |      0           320     |/   FRUSTRATIO_2
         |    0 +------------+      |
         |      |            |      |
         |      |            |      |
         |      |   screen   |      |
         |      |            |      |
         |      |            |      |
         |   240+------------+      |
         |                          |
         |                          |
     360 +--------------------------+
If you draw a big triangle and want part of it to appear on the screen, but one vertex of the triangle is out of the reject box, the triangle will not be drawn because of reject processing. In this case, you need to divide the big triangle into several small triangles so that an unnatural "missing polygon" can be avoided.
In F3DLX.Rej and F3DLP.Rej, the processing speed of the gSP2Triangles command has been improved by using reject processing. Therefore, when creating the display list (DL), please use g*SP2Triangles whenever possible.
The gspF3DLX.Rej.fifo.o microcode object file is a version with texture perspective correction. The gspF3DLP.Rej.fifo.o microcode object file is a version without texture perspective correction. F3DLP.Rej is slightly faster than F3DLX.Rej. The processing performance of the SP is improved, but because there are no changes in DP itself, DP often is not fast enough in parallel with SP. In such cases, consideration must be given to setting the render mode to a mode such as RA mode (G_RM_RA_ZB_OPA_SURF). The rejection processing microcode does not support G_CULL_BOTH.
The rejection processing microcode does not support gSPSetGeometryMode.
gspL3DEX.fifo.o:
This is a modified version of the Line3D microcode adapted to a cache size of 32. It allows 1Triangle, 2Triangles, and 1Quadrangle of F3DEX microcodes to be displayed using wireframes.

Header file

headers-2.0e/*.h is the header file for U64 Dev 2.0e 
headers-2.0f/*.h is the header file for U64 Dev 2.0f 
headers-2.0g/*.h is the header file for U64 Dev 2.0g

Please use this after moving the file which corresponds to your development environment to /usr/include/PR.

GBI Compatibility Issues

There is no compatibility on a binary level between the GBI (graphics binary interface) of this F3DEX microcode series and the previous Fast3D microcode.

However, the differences between them can be eliminated by using gbi.h. Even though they use the same DL, a suitable GBI for each can be specified by using the compile option.

That is, by defining the keyword "F3DEX_GBI" before including the gbi.h file, an appropriate GBI will be output.

For example, when the DL is written in the static_ex.c file, please add #define F3DEX_GBI before including ultra64.h as shown here:

static_ex.c:

        |
        |#define  F3DEX_GBI
        |#include <ultra64.h>
        |

All the microcodes F3DEX, F3DLX, F3DLX.Rej, and F3DLP.Rej are compatible at the GBI binary level. Therefore, the DL can be shared. However, even the same commands process differently because of things such as the reject processing described previously, so the same graphics may not be drawn even when using the same DL.

OS Patch Installation

There are patches of the OS for g*SPLoadUcode in the os_patches directory. Please use the following procedure to install a patch:

% cd os_patches
% make

By doing this, the patched libraries (libultra.a, libultra_rom.a, and libultra_d.a) are created in the os_patches directory. Please move them to /usr/lib before using them.

The functions added and changed in F3DEX(.NoN), F3DLX(.NoN), F3DLX.Rej, F3DLP.Rej, L3DEX