Changes

1,076 bytes added ,  18:01, 18 February 2013
no edit summary
Line 62: Line 62:  
|-
 
|-
 
| 0x0002025E
 
| 0x0002025E
| u32, val<<8. Val3 = GL_TRIANGLES, val5 = GL_TRIANGLE_STRIP, val6 = GL_TRIANGLE_FAN. Val0 and val4 are unknown, these seem to have the same effect.
+
| u32, val<<8.
 
| This sets the GL rendering mode.
 
| This sets the GL rendering mode.
 
|-
 
|-
Line 114: Line 114:  
|-
 
|-
 
| 0x000F0227
 
| 0x000F0227
| u32, bit31 set = indices data-type GL_UNSIGNED_SHORT, clear = GL_UNSIGNED_BYTE. Bits30-0 is the address, where address is relative to VRAM.
+
| u32
| This specifies the address of an array containing vertex array indices, used for rendering primitives. Each index entry is an u16.
+
| This specifies the address of an array containing vertex array indices, and the data-type of the indices, used for rendering primitives.
 
|-
 
|-
 
| 0x000F0228
 
| 0x000F0228
 
| u32 total elements in the array to use for rendering.
 
| u32 total elements in the array to use for rendering.
| This command is used immediately after CmdID 0x000F0227. This command and CmdID 0x000F0227 are some of the commands used for glDrawElements().
+
| This command is used immediately after CmdID 0x000F0227.
 
|-
 
|-
 
| 0x000F02B0
 
| 0x000F02B0
Line 132: Line 132:  
| First word in the first entry
 
| First word in the first entry
 
| A list of entries follow this command.
 
| A list of entries follow this command.
 +
|}
 +
 +
==== Command Sets ====
 +
 +
===== glDrawElements() =====
 +
{| class="wikitable" border="1"
 +
!  Command Index
 +
!  CommandID
 +
!  Parameter
 +
!  Description
 +
|-
 +
| 0
 +
| 0x00020229
 +
| u32, val<<8.
 +
| Unknown, val is 0 or 1.
 +
|-
 +
| 1-2
 +
| 0x20253
 +
| Same as CmdID 0x00020229.
 +
| Unknown
 +
|-
 +
| 3
 +
| 0x0002025E
 +
| u32, val<<8.
 +
| This sets the GL rendering mode.
 +
|-
 +
| 4
 +
| 0x0004025E
 +
| Value 0
 +
| ?
 +
|-
 +
| 5
 +
| 0x000F025F
 +
| Value 1
 +
| ?
 +
|-
 +
| 6
 +
| 0x00010253
 +
| Value 0
 +
| ?
 +
|-
 +
| 7
 +
| 0x000F0227
 +
| u32
 +
| This specifies the indices data-type, and the indices array address.
 +
|-
 +
| 8
 +
| 0x000F0228
 +
| u32
 +
| This specifies the number of elements in the array to use for rendering.
 +
|-
 +
| 9
 +
| 0x00010245
 +
| Value 0
 +
| ?
 +
|-
 +
| 10
 +
| 0x000F022F
 +
| Value 1
 +
| ?
 +
|-
 +
| 11
 +
| 0x00010245
 +
| Value 1
 +
| ?
 +
|-
 +
| 12
 +
| 0x000F0231
 +
| Value 1
 +
| ?
 +
|-
 +
| 13
 +
| 0x000F0111
 +
| Value 1
 +
| ?
 +
|-
 +
| 14
 +
| 0x00020229
 +
| Value 0
 +
| ?
 +
|-
 +
| 15
 +
| 0x00020253
 +
| Value 0
 +
| ?
 +
|-
 +
| 16
 +
| 0x0002025E
 +
| Value 0
 +
| ?
 +
|-
 +
| 17
 +
| 0x000C02BA
 +
| Value 0x7FFF0000
 +
| ?
 +
|}
 +
 +
=== GL mode values for CmdID 0x0002025E ===
 +
{| class="wikitable" border="1"
 +
!  Value
 +
!  Description
 +
|-
 +
| 0
 +
| Unknown
 +
|-
 +
| 1
 +
| GL_TRIANGLE_STRIP
 +
|-
 +
| 2
 +
| GL_TRIANGLE_FAN
 +
|-
 +
| 3
 +
| GL_TRIANGLES
 +
|-
 +
| 4
 +
| Unknown, this seems to have the same effect as value 0.
 +
|}
 +
 +
=== Parameter value format for CmdID 0x000F0227 ===
 +
{| class="wikitable" border="1"
 +
!  Bit
 +
!  Description
 +
|-
 +
| 30-0
 +
| Indices array address, relative to VRAM.
 +
|-
 +
| 31
 +
| 1 = indices data-type GL_UNSIGNED_SHORT, 0 = GL_UNSIGNED_BYTE.
 
|}
 
|}
   Line 169: Line 297:  
|-
 
|-
 
| 4
 
| 4
| Texture data physical address >> 3. This is normally located in the VRAM GPU data storage region.
+
| Texture data physical address >> 3. This is normally located in VRAM.
 
|-
 
|-
 
| 5-9
 
| 5-9