Function
gSPLoadUcode
Loads the specified microcode
Syntax
#include <ultra64.h> /* gbi.h */
gSPLoadUcode(Gfx *gdl, u64 *uc_start, u64 *uc_dstart)
gsSPLoadUcode( u64 *uc_start, u64 *uc_dstart)
Arguments
Description
Loads the specified microcode. However, this macro can only load microcode in the F3DEX microcode group (F3DEX, F3DLX, F3DLX_Rej, F3DLP_Rej, and L3DEX). It cannot load Fast3D or Turbo3D microcode. Also, since loading microcode has its associated overhead, you should only load microcode when it is required for performance reasons. The gSPLoadUcodeL macro, which is simpler to use than gSPLoadUcode, also is available. For details, please see Section 25.3.1, "F3DEX Microcode Series Functions" in the N64 Programming Manual.
Note
When microcode is loaded by this macro, the graphics and RSP internal states are initialized. Therefore, RSP-related settings must be set again after the microcode is loaded. Note that the display list link information is also initialized. This means that when this macro is used within a display list that was called by gSPDisplayList, processing will not be able to return to the calling display list. (This specification is regrettably unavoidable for implementation reasons.)
To use this macro's g*SPLoadUcode function, the OS_TASK_LOADABLE flag must be set for the "flag" element in the OSTask structure, as shown below:
OSTask *tp;
tp->t.flag = OS_TASK_LOADABLE | OS_TASK_DP_WAIT;
To enable this flag process you must install a patch in the operating system. For information about how to install the patch, refer to F3DEX. The patched operating system is upward compatible with the pre-patched operating system.
Microcode that allows clipping such as F3DLX is loaded when drawing terrain, and high-speed microcode such as F3DLX_Rej is loaded for drawing people. This macro also enables the switch from F3DEX to L3DEX (conventionally done when drawing lines) to be made without CPU intermediation.
Accompanying the change from F3DEX to F3DEX2, when F3DEX2 microcode is self-loaded the following parameters are maintained:
See Also
Revision History
02/01/99 Entirely revised.