Changes

134 bytes added ,  08:43, 6 February 2013
no edit summary
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 cmdID.
+
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.
 +
 
 +
=== 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 ===
 
=== Commands ===
Line 33: Line 46:  
| 0xXXXF02C1
 
| 0xXXXF02C1
 
| float X coordinate for the first vertex
 
| float X coordinate for the first vertex
| CmdID is <nowiki>0x000F02C1 | ((totalvertices<<22) - 0x100000).</nowiki> The vertex entries is the data following the command. The first word in the first vertex entry is the Y coordinate.
+
| The vertex entries is the data following the command.
 
|}
 
|}
   Line 42: Line 55:  
|-
 
|-
 
| 0
 
| 0
| float X coordinate, for the first vertex this is stored in the command parameter instead.
+
| float X coordinate
 
|-
 
|-
 
| 1
 
| 1
Line 49: Line 62:  
| 2
 
| 2
 
| float Z coordinate
 
| float Z coordinate
|-
  −
| 3
  −
| Padding for the last vertex entry
   
|}
 
|}