Hack64 Wiki
Other Titles
Hack64 Wiki
Other Titles
Extreme-G uses high level commands to define level models' GFX and collision data.
00
Presumably pushes the address of the current display list to some array and ends the current display list.
Emits:
gsSPEndDisplayList()
01 [NN] [XX XX] [YY YY] [ZZ ZZ] [TI] [RR] [GG] [BB] […]
Defines a list of vertices to be used by tri1
and tri2
commands.
TI
indexes the level's texture coordinate table to obtain the vertices' S and T texture coordinate values.
Parameter | Description |
---|---|
NN | Number of vertices |
XXXX | X coordinate (signed) |
YYYY | Y coordinate (signed) |
ZZZZ | Z coordinate (signed) |
TI | Texture coordinate index |
RR | Vertex color red channel |
GG | Vertex color green channel |
BB | Vertex color blue channel |
… | … more vertices |
Emits:
gsSPVertex(..., NN)
02 [II]
Loads a CI8 or CI4 texture into TMEM.
II
indexes the level's texture meta table to obtain the texture's CI/TLUT addresses, format, and dimensions.
Texture data is obtained from the level's texture file.
Parameter | Description |
---|---|
II | Level texture index |
Emits (if the current palette needs to be updated):
gsDPSetTextureImage(...) gsDPTileSync() gsDPSetTile(...) gsSPLoadSync() gsDPLoadTLUT(...) gsSPPipeSync()
Emits:
gsDPSetTextureImage(...) gsDPSetTile(...) gsDPLoadSync() gsDPLoadBlock(...) gsDPPipeSync() gsDPSetTile(...) gsDPSetTileSize(...)
03 [RR] [GG] [BB]
Sets the RDP's primcolor register.
Emits:
gsDPSetPrimColor(0, 0, 0, RR, GG, BB)
04 [-aaaaabb] [bbbccccc]
(bitwise)
Renders a single triangle.
Parameter | Description |
---|---|
aaaaa | RSP vertex index 0 |
bbbbb | RSP vertex index 1 |
ccccc | RSP vertex index 2 |
Emits:
gsSP1Triangle(aaaaa, bbbbb, ccccc, 0)
05 [-aaaaabb] [bbbccccc] [-dddddee] [eeefffff]
(bitwise)
Renders two triangles.
Parameter | Description |
---|---|
aaaaa | RSP vertex index 0 |
bbbbb | RSP vertex index 1 |
ccccc | RSP vertex index 2 |
ddddd | RSP vertex index 3 |
eeeee | RSP vertex index 4 |
fffff | RSP vertex index 5 |
Emits:
gsSP2Triangles(aaaaa, bbbbb, ccccc, ddddd, eeeee, fffff, 0)
06
Emits:
gsDPPipeSync() gsDPSetCombineMode(G_CC_MODULATERGBDECALA, G_CC_PASS2) // FC127FFF FFFFF238
07
Emits:
gsDPPipeSync() gsDPSetCombineMode(PRIMITIVE, 0, SHADE, 0, 0, 0, 0, 1, G_CC_PASS2) // FC327FFF FFFFFC38
08 [NN] [XX XX] [YY YY] [ZZ ZZ] […]
Defines a list of collision vertices.
Parameter | Description |
---|---|
NN | Number of vertices |
XX | X position |
YY | Y position |
ZZ | Z position |
… | … More vertices |
09 [VI] [TI]
Updates a single vertex's S and T texture coordinate values in the RSP's vertex buffer.
TI
indexes the level's texture coordinate table.
Parameter | Description |
---|---|
VI | RSP vertex index |
TI | Texture coordinate index |
Emits:
gsSPModifyVertex(VI, G_MWO_POINT_ST, ((table[TI].s / 2) << 16) | (table[TI].t / 2))
0A
Jump to some display list, unknown purpose. The address of the display list is obtained from 801712E8.
Emits:
gsSPDisplayList(...)
0B
Emits:
gsDPSetCombineMode(PRIMITIVE, 0, SHADE, 0, 0, 0, 0, 1, G_CC_PASS2) // FC327FFF FFFFFC38
This command seems the same as command 07 but without the pipesync.
0C [II]
Loads a CI8 texture into TMEM. II
indexes the table in the “global texture” bank to obtain the texture's CI/TLUT addresses, dimensions, and data.
Parameter | Description |
---|---|
II | Global texture index |
Emits (if the current palette needs to be updated):
gsDPSetTextureImage(...) gsDPTileSync() gsDPSetTile(...) gsSPLoadSync() gsDPLoadTLUT(...) gsSPPipeSync()
Emits:
gsDPSetTextureImage(...) gsDPSetTile(...) gsDPLoadSync() gsDPLoadBlock(...) gsDPPipeSync() gsDPSetTile(...) gsDPSetTileSize(...)
0D [II]
Loads a CI8 texture into TMEM. II
indexes the table in the level's “common texture” bank to obtain the texture's CI/TLUT addresses, dimensions, and data.
Parameter | Description |
---|---|
II | Common texture index |
Emits (if the current palette needs to be updated):
gsDPSetTextureImage(...) gsDPTileSync() gsDPSetTile(...) gsSPLoadSync() gsDPLoadTLUT(...) gsSPPipeSync()
Emits:
gsDPSetTextureImage(...) gsDPSetTile(...) gsDPLoadSync() gsDPLoadBlock(...) gsDPPipeSync() gsDPSetTile(...) gsDPSetTileSize(...)
(no operation)
(no operation)
Assembly location of each command:
Command | ASM Location |
---|---|
00: end_submesh | 800518FC |
01: vertex_list | 8004FF70 |
02: level_texture | 800500B8 |
03: set_primcolor | 80050AE8 |
04: tri1 | 80050B34 |
05: tri2 | 80050B84 |
06: setcombine0 | 80050C18 |
07: setcombine1 | 80050C40 |
08: collision_vertex_list | 80050C6C |
09: update_vertex_texcoord | 80050D44 |
0A: unknown_dl | 80050DBC |
0B: setcombine2 | 80050DDC |
0C: global_texture | 80050E20 |
0D: common_texture | 8005136C |
0E: nop0 | 8004FF3C |
0F: nop1 | 8004FF3C |