Difference between revisions of "GPU/Commands"

From 3dbrew
< GPU
Jump to navigation Jump to search
m (Replaced content with "Merged with GPU/Internal_Registers")
 
(221 intermediate revisions by 10 users not shown)
Line 1: Line 1:
This page describes the structure of the buffer for [[GX_Commands|GX command]] 1 with the registers at [[GPU|0x1EF018E0]]. This buffer is used for GPU commands including OpenGL commands, each 8-byte entry in the buffer is a command. Cmd+0 is the command parameter, and cmd+4 is the command header.
+
Merged with [[GPU/Internal_Registers]]
 
 
=== Command Header ===
 
{| class="wikitable" border="1"
 
!  Bit
 
!  Description
 
|-
 
| 19-0
 
| Command ID
 
|-
 
| 31-20
 
| Total words following the command, if any.
 
|}
 
The first word in the parameter data structure is the command parameter value, the rest of the data structure is from the data following the command. The word after the last data structure word is usually padding.
 
 
 
=== Commands ===
 
{| class="wikitable" border="1"
 
!  CommandID
 
!  Parameter
 
!  Description
 
|-
 
| 0x000F0010
 
| Value is 0x12345678
 
| This command is always the last command in the buffer.
 
|-
 
| 0x000F0110
 
| Value 0x1
 
| This command is immediately before CmdID 0x000F0010, this is used elsewhere in the buffer as well.
 
|-
 
| 0x000F0111
 
| Value 0x1
 
| This command is immediately before CmdID 0x000F0110, however CmdID 0x000F0110 doesn't always follow this command.
 
|-
 
| 0x000F0041
 
| float Z vector
 
| This sets Z scaling for the current matrix.
 
|-
 
| 0x000F0042
 
| float Y vector
 
| This sets Y scaling for the current matrix.
 
|-
 
| 0x000F0043
 
| float unknown
 
| ?
 
|-
 
| 0x000F0044
 
| float X vector
 
| This sets X scaling for the current matrix.
 
|-
 
| 0x000F02C0
 
| <nowiki>0x80000000 | Unknown</nowiki>
 
| This is used immediately before CmdID 0xXXXF02C1.
 
|-
 
| 0xXXXF02C1
 
| float X coordinate for the first vertex
 
| The vertex entries is the data following the command.
 
|}
 
 
 
=== Vertex Entry ===
 
{| class="wikitable" border="1"
 
!  Index Word
 
!  Description
 
|-
 
| 0
 
| float X coordinate
 
|-
 
| 1
 
| float Y coordinate
 
|-
 
| 2
 
| float Z coordinate
 
|}
 

Latest revision as of 08:06, 5 December 2015