Microcode
See also the Majora's Mask wiki: Microcode |
Contents
Introduction
The N64's Reality Co-Processor (specifically, the RSP component) is reprogrammable, allowing developers to add extra/custom functionality to the Co-processor. Microcode (sometimes appearing as "ucode", standing for μcode) is thus the set of instructions that can be loaded/executed on the RSP.
Microcode Libraries
OoT 1.0 (U):
RSP Gfx ucode F3DZEX.NoN fifo 2.06H Yoshitaka Yasumoto 1998 Nintendo RSP Gfx[Safe] S2DEX fifo 2.05 Yoshitaka Yasumoto 1998 Nintendo
Debug Rom:
RSP Gfx ucode F3DZEX.NoN fifo 2.08J Yoshitaka Yasumoto/Kawasedo 1999 RSP Gfx[Safe] S2DEX fifo 2.05 Yoshitaka Yasumoto 1998 Nintendo
The above are microcode programs, each with a set of opcodes (operation codes) which instruct the RCP to do certain things, such as enable/disable texturing, draw polygons, and everything from there.
F3DZEX
F3DZEX is a 3D based graphics microcode, and the primary graphics microcode used by the Zelda 64 engine. F3DZEX is based off of the F3DEX2 microcode, sharing the same graphics binary interface (GBI). GBI is a display list interface, used for rendering graphics. Each command is 64 bits long, and is used to instruct both the RSP and the RDP units on the RCP.
There are no major differences between 2.06H and 2.08J of the F3DZEX microcode.
S2DEX
S2DEX is a 2D based graphics microcode. It is rarely used by the Z64 engine. The only known instance in which is used is to draw rooms with pre-rendered backgrounds from a top-down perspective.
/* 0x0A */ gsSPBgRectCopy(mptr); //mptr points to uObjBg type
Argument Mapping
Microcode | Reference Function |
---|---|
0A000000 aaaaaaaaa | gsSPBgRectCopy(mptr) |
Description
Quickly draws a background image. a is a pointer to a 0x28 byte data structure
Audio
NTSC 1.0 Notes
800E2FC0, size 0x1000
Display List Dump Feature
In the event of a fatal error, the Debug Rom is capable of generating a dump of the entire display list pipeline for the current frame, sending it to the IS64. This dump can be triggered with the following cheat code: 80166D28 0000. Once the dump begins, it's recommended that you set the value back to 0001, since otherwise the game will constantly generate a dump.
Unsorted NTSC 1.0 Microcode Notes
800060B0, size 0x3E8. Sometime cases it seems only 0x160 is transferred 800E2FC0, size 0x1000 //audio 800E3F70, size 0x1000 //F3DZEX possibly?
0x40 bytes at address 8012BAC0 is transferred to 04000FC0 //DMEM
This seems to be used to store task data. For example Graphics Context+0x88 stores the data that is later copied to 8012BAC0, which contains the relevant task info
0x3E8 bytes at address 800060B0 is transferred to 04001000 //IMEM
Legacy Credits
cooliscool
ZethAlkar64