Expand description
RDP command-stream decoding.
The front of the DP FIFO: given a command’s first word, how many 64-bit
words does the whole command occupy? Getting this right for every opcode
0x00–0x3F is what keeps DPC_CURRENT aligned, so a multi-word primitive
(a triangle, a texture rectangle) is consumed whole and the stream never
desyncs the pointer mid-command.
Reference: n64brew_wiki/markdown/Reality Display Processor/Commands.md
(the full opcode map). This module decodes length only — dispatching each
opcode to a rasterizer handler is later Phase 3 work.
Functions§
- command_
len_ words - The length, in 64-bit (8-byte) words, of the RDP command with opcode
opcode(as returned byopcode_of). Includes the header word itself. - opcode_
of - The opcode field of an RDP command: bits 61:56 of the command’s first 64-bit
word, i.e. bits 29:24 of that word’s high half. Six bits,
0x00–0x3F.