User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
super_mario_64:fast3d_display_list_commands [2016/07/17 03:58]
david Added cmd 0xF6 (G_FILLRECT) and cmd 0xF7 (G_SETFILLCOLOR)
super_mario_64:fast3d_display_list_commands [2018/01/10 05:01] (current)
cpuhacka101 [03: F3D_MOVEMEM]
Line 3: Line 3:
  
 ===== Fast3D Commands ===== ===== Fast3D Commands =====
 +
 +==== 00: G_NOOP ====
 +No operation. This should only be used for debugging purposes.
 +
 +''​00 00 00 00 00 00 00 00''​
  
 ==== 01: G_MTX ==== ==== 01: G_MTX ====
Line 22: Line 27:
  
 ==== 03: F3D_MOVEMEM ==== ==== 03: F3D_MOVEMEM ====
-Used in Super Mario 64 to load vector ​normals (shading) RGB values.+Used in Super Mario 64 to load vector ​lighting ambient/​diffuse RGBA values.
  
-''​03 [<color darkgrey>​TT</​color>​] 00 00 [<color purple>​AA AA AA AA</​color>​]''​+''​03 [<color darkgrey>​TT</​color>​] 00 10 [<color purple>​AA AA AA AA</​color>​]''​
  
-| <color darkgrey>​T</​color>​ | If 86, loads light values. If 88, loads dark values | +| <color darkgrey>​T</​color>​ | If 0x86, loads diffuse(lightvalues. If 0x88, loads ambient(darkvalues | 
-| <color purple>​A</​color>​ | Segmented address of vectors ​|+| <color purple>​A</​color>​ | Segmented address of RGBA |
  
-Example: Loads light RGB from 0x0 in RAM bank 0x0E; loads dark RGB from 0x08 in RAM Bank 0x0E +Example: Loads diffuse RGBA from 0x0 in RAM bank 0x0E; loads ambient RGBA from 0x08 in RAM Bank 0x0E 
-  03 86 00 00 0E 00 00 00 +  03 86 00 10 0E 00 00 00 
-  03 88 00 00 0E 00 00 08+  03 88 00 10 0E 00 00 08
  
 ---- ----
Line 53: Line 58:
 Signifies the start of a Display List. May be used to link data and branch the current DL. Signifies the start of a Display List. May be used to link data and branch the current DL.
  
-''​06 ​00 00 00 [<color purple>AA AA AA AA</​color>​]''​+''​06 ​[<color blue>​AA</​color>​] ​00 00 [<color purple>BB BB BB BB</​color>​]''​
  
-| <color purple>A</​color>​ | Segmented Address to branch to |+| <color blue>​AA</​color>​ | 00 = store return address, 01 = don't store (end DL after branch) | 
 +| <color purple>B</​color>​ | Segmented Address to branch to |
  
 Example: Loads a display list from 0xA50 in bank 0x07. Example: Loads a display list from 0xA50 in bank 0x07.
Line 144: Line 150:
 Renders one triangle according to the vertices inside the vertex buffer Renders one triangle according to the vertices inside the vertex buffer
  
-''​BF 00 00 00 [<color darkred>​AA</​color>​] [<color darkgreen>​BB</​color>​] [<color darkblue>​CC</​color>​]''​+''​BF ​00 00 00 00 [<color darkred>​AA</​color>​] [<color darkgreen>​BB</​color>​] [<color darkblue>​CC</​color>​]''​
  
 | <color darkred>​A</​color>​ | First vertex to use for the triangle (* 0x0A) | | <color darkred>​A</​color>​ | First vertex to use for the triangle (* 0x0A) |
Line 152: Line 158:
 Example: Render a triangle using the vertex data specified at the vertex buffer positions 0, 1 (0x0A / 0x0A) and 2 (0x14 / 0x0A). Example: Render a triangle using the vertex data specified at the vertex buffer positions 0, 1 (0x0A / 0x0A) and 2 (0x14 / 0x0A).
  
-  BF 00 00 00 00 0A 14+  BF 00 00 00 00 00 0A 14 
 + 
 +---- 
 + 
 +==== E4: G_TEXRECT ==== 
 +Draws a textured 2D rectangle on the screen 
 + 
 +''​E4 [<color darkred>​xx x</​color>​][<​color darkgreen>​y yy</​color>​] 0[<color darkblue>​I</​color>​] [<color red>XX X</​color>​][<​color green>Y YY</​color>​]''​\\ 
 +''​B3 00 00 00 [<color #​BF9F00>​SS SS</​color>​] [<color #​8F3F10>​TT TT</​color>​]''​\\ 
 +''​B2 00 00 00 [<color #​3F3FFF>​DD DD</​color>​] [<color darkcyan>​EE EE</​color>​]''​ 
 + 
 +| <color darkred>​xxx</​color>​ | Lower-right corner X coordinate | 
 +| <color darkgreen>​yyy</​color>​ | Lower-right corner Y coordinate | 
 +| <color darkblue>​I</​color>​ | Tile descriptor to use for rectangle | 
 +| <color red>​XXX</​color>​ | Upper-left corner X coordinate | 
 +| <color green>​YYY</​color>​ | Upper-left corner Y coordinate | 
 +| <color #​BF9F00>​SSSS</​color>​ | Texture S coordinate at upper-left corner | 
 +| <color #​8F3F10>​TTTT</​color>​ | Texture T coordinate at upper-left corner | 
 +| <color #​3F3FFF>​DDDD</​color>​ | Change in S coordinate over change in X coordinate | 
 +| <color darkcyan>​EEEE</​color>​ | Change in T coordinate over change in Y coordinate |
  
 ---- ----