|
|
Line 127: |
Line 127: |
| | 0x826F0200 | | | 0x826F0200 |
| | | | | |
| | See command set 0x826F0200. | | | See command set [[GPU_GL_Arrays|0x826F0200]]. |
| |- | | |- |
| | 0x00080126 | | | 0x00080126 |
Line 135: |
Line 135: |
| | 0x000F0227 | | | 0x000F0227 |
| | u32 | | | u32 |
| | This specifies the address of an array containing vertex array indices, and the data-type of the indices, used for rendering primitives. | | | This specifies the address of an array containing vertex array indices, and the data-type of the indices, used for rendering primitives. See command set [[GPU_GL_Arrays|glDrawElements()]]. |
| |- | | |- |
| | 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. | | | See command set [[GPU_GL_Arrays|glDrawElements()]]. |
| |- | | |- |
| | 0x803F0232 | | | 0x803F0232 |
| | | | | |
| | See command set 0x826F0200. | | | See command set [[GPU_GL_Arrays|0x826F0200]]. |
| |- | | |- |
| | 0x000F02B0 | | | 0x000F02B0 |
Line 151: |
Line 151: |
| | 0x801F02BB | | | 0x801F02BB |
| | | | | |
| | See command set 0x826F0200. | | | See command set [[GPU_GL_Arrays|0x826F0200]]. |
| |- | | |- |
| | 0x000F02C0 | | | 0x000F02C0 |
Line 165: |
Line 165: |
|
| |
|
| ===== glDrawElements() ===== | | ===== glDrawElements() ===== |
| {| class="wikitable" border="1"
| | See [[GPU_GL_Arrays|GPU GL Arrays]]. |
| ! Command Index
| |
| ! CommandID
| |
| ! Parameter
| |
| ! Description
| |
| |-
| |
| | 0
| |
| | 0x00020229
| |
| | u32, val<<8.
| |
| | Unknown, val is 0 or 1.
| |
| |-
| |
| | 1-2
| |
| | 0x00020253
| |
| | 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
| |
| | ?
| |
| |}
| |
|
| |
|
| ===== CmdID 0x826F0200 ===== | | ===== CmdID 0x809F0081 ===== |
| {| class="wikitable" border="1"
| | This sets current texture info, see [[GPU Textures|GPU textures]]. |
| ! Command Index
| |
| ! CommandID
| |
| ! Parameter
| |
| ! Description
| |
| |-
| |
| | 0
| |
| | 0x826F0200
| |
| |
| |
| | This sets the addresses for the GL arrays.
| |
| |- | |
| | 1
| |
| | 0x801F02BB
| |
| |
| |
| | ?
| |
| |-
| |
| | 2
| |
| | 0x803F0232
| |
| |
| |
| | Unknown, this command is used multiple times for specifying each parameter-buffer entry.
| |
| |}
| |
|
| |
|
| ===== CmdID 0x00030107 ===== | | ===== CmdID 0x00030107 ===== |
Line 289: |
Line 179: |
| | 0 | | | 0 |
| | 0x00030107 | | | 0x00030107 |
| | glAlphaFunc() parameters. | | | |
| | | | | |
| |- | | |- |
Line 298: |
Line 188: |
| |} | | |} |
|
| |
|
| This command set is used for disabling alpha testing. The GL AlphaFunction used here is normally GL_ALWAYS. | | This command set is used for disabling the alpha-testing info set by command set 0x00010107? The GL AlphaFunction used here is normally GL_ALWAYS. |
|
| |
|
| ===== CmdID 0x00010107 ===== | | ===== CmdID 0x00010107 ===== |
Line 322: |
Line 212: |
| | | | | |
| |} | | |} |
|
| |
| This is glAlphaFunc()-related?
| |
|
| |
|
| === Parameter format for CmdIDs 0x00030107, 0x00020107, and 0x00010107 === | | === Parameter format for CmdIDs 0x00030107, 0x00020107, and 0x00010107 === |
Line 331: |
Line 219: |
| |- | | |- |
| | 0 | | | 0 |
| | 0 = disable GL_ALPHA_TEST, 1 = enable GL_ALPHA_TEST. | | | 0 = disable GL_ALPHA_TEST, 1 = enable GL_ALPHA_TEST? |
| |- | | |- |
| | 3-1 | | | 3-1 |
Line 340: |
Line 228: |
| |- | | |- |
| | 11-8 | | | 11-8 |
| | ? | | | Color to blend with? |
| |- | | |- |
| | 12 | | | 12 |
Line 395: |
Line 283: |
| | 3 | | | 3 |
| | The remaining GL alpha functions. | | | The remaining GL alpha functions. |
| |}
| |
|
| |
| === GL mode values for CmdID 0x0002025E ===
| |
| {| class="wikitable" border="1"
| |
| ! Value
| |
| ! Description
| |
| |-
| |
| | 0
| |
| | ?
| |
| |-
| |
| | 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 physical address 0x18000000. Thus, when this relative address is 0x08XXXXXX, the array is located in FCRAM.
| |
| |-
| |
| | 31
| |
| | 1 = indices data-type GL_UNSIGNED_SHORT, 0 = GL_UNSIGNED_BYTE.
| |
| |} | | |} |
|
| |
|
Line 449: |
Line 304: |
|
| |
|
| Normally the width and height is set to the same [[GPU|dimensions]] used with GX [[GSP_Shared_Memory|command]] 3 and 4. | | Normally the width and height is set to the same [[GPU|dimensions]] used with GX [[GSP_Shared_Memory|command]] 3 and 4. |
|
| |
| === Parameter structure for CmdID 0x826F0200 ===
| |
| {| class="wikitable" border="1"
| |
| ! Index Word
| |
| ! Description
| |
| |-
| |
| | 0x0
| |
| | Base physical address >> 3, normally located in VRAM.
| |
| |-
| |
| | 0x1
| |
| | Physical address, relative to the base address. When writing each entry: <nowiki>value |= entval << (index * 4)</nowiki>.
| |
| |-
| |
| | 0x2
| |
| | Value is: <nowiki>(0xF0000000 + (val<<28)) | (((0xFF<<totalentries) & 0xFF)<<16)</nowiki>.
| |
| |-
| |
| | 0x3-0x26
| |
| | 12 entries, each entry is 3 words.
| |
| |}
| |
|
| |
| ==== Entry structure ====
| |
| {| class="wikitable" border="1"
| |
| ! Index Word
| |
| ! Description
| |
| |-
| |
| | 0
| |
| | Physical address, relative to the base address.
| |
| |-
| |
| | 1
| |
| | Entry index
| |
| |-
| |
| | 2
| |
| | Value is: <nowiki>0x10000000 | (arraytype<<16).</nowiki>
| |
| |}
| |
|
| |
| When the entry is unused, the entry data is all-zero.
| |
|
| |
| ===== Entry array types =====
| |
| {| class="wikitable" border="1"
| |
| ! Type
| |
| ! Description
| |
| |-
| |
| | 0x2
| |
| | ?
| |
| |-
| |
| | 0x3
| |
| | Normals array
| |
| |-
| |
| | 0x4
| |
| | Texture coordinates array
| |
| |-
| |
| | 0xC
| |
| | Vertex array
| |
| |}
| |
|
| |
| === Parameter structure for CmdID 0x801F02BB ===
| |
| {| class="wikitable" border="1"
| |
| ! Index Word
| |
| ! Description
| |
| |-
| |
| | 0-1
| |
| | u64, every 4-bits is a value from some array.
| |
| |}
| |
|
| |
| === Parameter structure for CmdID 0x803F0232 ===
| |
| {| class="wikitable" border="1"
| |
| ! Index Word
| |
| ! Description
| |
| |-
| |
| | 0
| |
| | Entry index + total CmdID 0x826F0200 parameter-buffer entries.
| |
| |-
| |
| | 1
| |
| | ?
| |
| |-
| |
| | 2
| |
| | ?
| |
| |-
| |
| | 3
| |
| | ?
| |
| |}
| |
|
| |
| Each parameter buffer for CmdID 0x803F0232 is an entry loaded from an array.
| |
|
| |
|
| === Entries for CmdID 0xXXXF02C1 === | | === Entries for CmdID 0xXXXF02C1 === |