ScarletNX / xspe models / gs
gs: regs.lisp
the GS's general registers as an ISA: addresses, fields, semantics.
Page 1 2
0/1 a fixed bit, name a field, a bit the decoder ignores
Drawing primitive setting: the type starts a new primitive (the queue is emptied)
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| | | | | | | | | | | | | | | | | | | | | fix | ctxt | fst | aa1 | abe | fge | tme | iip | prim |
(defgsreg PRIM #x00 ((prim 0 3) (iip 3 1) (tme 4 1) (fge 5 1) (abe 6 1) (aa1 7 1) (fst 8 1)
(ctxt 9 1) (fix 10 1))
"Drawing primitive setting: the type starts a new primitive (the queue is emptied)"
(setf (gsm-vn g) 0 (gsm-vstrip g) 0))
Vertex colour and Q
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| q |
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| a | b | gg | r |
(defgsreg RGBAQ #x01 ((r 0 8) (gg 8 8) (b 16 8) (a 24 8) (q 32 32))
"Vertex colour and Q"
(setf (gsm-cur-c g) (ldb (byte 32 0) value) (gsm-cur-q g) (bits-f32 q)))
Vertex texture coordinates S, T (floats)
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| tt |
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| s |
(defgsreg ST #x02 ((s 0 32) (tt 32 32))
"Vertex texture coordinates S, T (floats)"
(setf (gsm-cur-s g) (bits-f32 s) (gsm-cur-t g) (bits-f32 tt)))
Vertex texel coordinates U, V (12.4 fixed point)
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| | v | | | u |
(defgsreg UV #x03 ((u 0 14) (v 16 14))
"Vertex texel coordinates U, V (12.4 fixed point)"
(setf (gsm-cur-u g) u (gsm-cur-v g) v))
Vertex position, depth and fog; a drawing kick
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| f | z |
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| y | x |
(defgsreg XYZF2 #x04 ((x 0 16) (y 16 16) (z 32 24) (f 56 8))
"Vertex position, depth and fog; a drawing kick"
(gs-kick g x y z f 1))
Vertex position and depth; a drawing kick
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| z |
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| y | x |
(defgsreg XYZ2 #x05 ((x 0 16) (y 16 16) (z 32 32))
"Vertex position and depth; a drawing kick"
(gs-kick g x y z (gsm-cur-f g) 1))
Texture: base, width, format, size, function, CLUT; loads the CLUT as CLD says
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| cld | csa | csm | cpsm | cbp | tfx | tcc | th |
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| th | tw | psm | tbw | tbp0 |
(defgsreg TEX0 (#x06 #x07) ((tbp0 0 14) (tbw 14 6) (psm 20 6) (tw 26 4) (th 30 4) (tcc 34 1) (tfx 35 2)
(cbp 37 14) (cpsm 51 4) (csm 55 1) (csa 56 5) (cld 61 3))
"Texture: base, width, format, size, function, CLUT; loads the CLUT as CLD says"
(gs-clut-load g value))
Texture wrap modes
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| | | | | | | | | | | | | | | | | | | | maxv | minv |
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| minv | maxu | minu | wmt | wms |
(defgsreg CLAMP (#x08 #x09) ((wms 0 2) (wmt 2 2) (minu 4 10) (maxu 14 10) (minv 24 10) (maxv 34 10))
"Texture wrap modes")
Vertex fog coefficient
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| f | | | | | | | | | | | | | | | | | | | | | | | | |
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
(defgsreg FOG #x0A ((f 56 8))
"Vertex fog coefficient"
(setf (gsm-cur-f g) f))
Vertex position, depth and fog; no drawing kick
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| f | z |
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| y | x |
(defgsreg XYZF3 #x0C ((x 0 16) (y 16 16) (z 32 24) (f 56 8))
"Vertex position, depth and fog; no drawing kick"
(gs-kick g x y z f 0))
Vertex position and depth; no drawing kick
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| z |
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| y | x |
(defgsreg XYZ3 #x0D ((x 0 16) (y 16 16) (z 32 32))
"Vertex position and depth; no drawing kick"
(gs-kick g x y z (gsm-cur-f g) 0))
Texture filtering and level of detail
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| | | | | | | | | | | | | | | | | | | | k |
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| | | | | | | | | | | l | | | | | | | | | | mtba | mmin | mmag | mxl | | lcm |
(defgsreg TEX1 (#x14 #x15) ((lcm 0 1) (mxl 2 3) (mmag 5 1) (mmin 6 3) (mtba 9 1) (l 19 2) (k 32 12))
"Texture filtering and level of detail")
TEX0's format and CLUT fields alone; loads the CLUT as CLD says
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| cld | csa | csm | cpsm | cbp | | | | | |
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| | | | | | psm | | | | | | | | | | | | | | | | | | | | |
(defgsreg TEX2 (#x16 #x17) ((psm 20 6) (cbp 37 14) (cpsm 51 4) (csm 55 1) (csa 56 5) (cld 61 3))
"TEX0's format and CLUT fields alone; loads the CLUT as CLD says"
(let* ((a (+ #x06 ctx))
(tex0 (dpb (ldb (byte 6 20) value) (byte 6 20) (aref (gsm-reg g) a))))
(setq tex0 (dpb (ldb (byte 27 37) value) (byte 27 37) tex0))
(setf (aref (gsm-reg g) a) tex0)
(gs-clut-load g tex0)))
The offset of the primitive coordinate system (12.4)
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| | | | | | | | | | | | | | | | ofy |
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| | | | | | | | | | | | | | | | ofx |
(defgsreg XYOFFSET (#x18 #x19) ((ofx 0 16) (ofy 32 16))
"The offset of the primitive coordinate system (12.4)")
1: PRIM's attributes apply, 0: PRMODE's
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ac |
(defgsreg PRMODECONT #x1A ((ac 0 1))
"1: PRIM's attributes apply, 0: PRMODE's")
Primitive attributes when PRMODECONT.AC is 0
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| | | | | | | | | | | | | | | | | | | | | fix | ctxt | fst | aa1 | abe | fge | tme | iip | | | |
(defgsreg PRMODE #x1B ((iip 3 1) (tme 4 1) (fge 5 1) (abe 6 1) (aa1 7 1) (fst 8 1) (ctxt 9 1) (fix 10 1))
"Primitive attributes when PRMODECONT.AC is 0")
CLUT position for CSM2
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| | | | | | | | | | cov | cou | cbw |
(defgsreg TEXCLUT #x1C ((cbw 0 6) (cou 6 6) (cov 12 10))
"CLUT position for CSM2")
Raster mask: 2 skips even lines, 3 odd lines
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | msk |
(defgsreg SCANMSK #x22 ((msk 0 2))
"Raster mask: 2 skips even lines, 3 odd lines")
Mipmap levels 1-3
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| | | | tbw3 | tbp3 | tbw2 | tbp2 |
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| tbp2 | tbw1 | tbp1 |
(defgsreg MIPTBP1 (#x34 #x35) ((tbp1 0 14) (tbw1 14 6) (tbp2 20 14) (tbw2 34 6) (tbp3 40 14) (tbw3 54 6))
"Mipmap levels 1-3")
Mipmap levels 4-6
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| | | | tbw6 | tbp6 | tbw5 | tbp5 |
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| tbp5 | tbw4 | tbp4 |
(defgsreg MIPTBP2 (#x36 #x37) ((tbp4 0 14) (tbw4 14 6) (tbp5 20 14) (tbw5 34 6) (tbp6 40 14) (tbw6 54 6))
"Mipmap levels 4-6")
Alpha of 16 and 24-bit texels
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| | | | | | | | | | | | | | | | | | | | | | | | ta1 |
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| | | | | | | | | | | | | | | | aem | | | | | | | | ta0 |
(defgsreg TEXA #x3B ((ta0 0 8) (aem 15 1) (ta1 32 8))
"Alpha of 16 and 24-bit texels")
Fog colour
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| | | | | | | | fcb | fcg | fcr |
(defgsreg FOGCOL #x3D ((fcr 0 8) (fcg 8 8) (fcb 16 8))
"Fog colour")
Texture page buffer flush: nothing to do, texels are read from local memory
(defgsreg TEXFLUSH #x3F ()
"Texture page buffer flush: nothing to do, texels are read from local memory")
Scissor rectangle, inclusive, in window coordinates
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| | | | | scay1 | | | | | | scay0 |
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| | | | | scax1 | | | | | | scax0 |
(defgsreg SCISSOR (#x40 #x41) ((scax0 0 11) (scax1 16 11) (scay0 32 11) (scay1 48 11))
"Scissor rectangle, inclusive, in window coordinates")
Alpha blending: ((A - B) * C >> 7) + D; A B D: 0 Cs 1 Cd 2 zero, C: 0 As 1 Ad 2 FIX
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| | | | | | | | | | | | | | | | | | | | | | | | fix |
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| | | | | | | | | | | | | | | | | | | | | | | | d | c | b | a |
(defgsreg ALPHA (#x42 #x43) ((a 0 2) (b 2 2) (c 4 2) (d 6 2) (fix 32 8))
"Alpha blending: ((A - B) * C >> 7) + D; A B D: 0 Cs 1 Cd 2 zero, C: 0 As 1 Ad 2 FIX")
The dither matrix: 4 x 4 signed 3-bit values, row-major, 4 bits apart
(defgsreg DIMX #x44 ()
"The dither matrix: 4 x 4 signed 3-bit values, row-major, 4 bits apart")
Dithering on
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dthe |
(defgsreg DTHE #x45 ((dthe 0 1))
"Dithering on")
1: colours clamp to 0..255, 0: they wrap (the low 8 bits)
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clamp |
(defgsreg COLCLAMP #x46 ((clamp 0 1))
"1: colours clamp to 0..255, 0: they wrap (the low 8 bits)")
Pixel tests: alpha, destination alpha, depth
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| | | | | | | | | | | | | ztst | zte | datm | date | afail | alpha-ref | atst | ate |
(defgsreg TEST (#x47 #x48) ((ate 0 1) (atst 1 3) (alpha-ref 4 8) (afail 12 2) (date 14 1) (datm 15 1)
(zte 16 1) (ztst 17 2))
"Pixel tests: alpha, destination alpha, depth")
Per-pixel blending: only where the source alpha's top bit is set
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pabe |
(defgsreg PABE #x49 ((pabe 0 1))
"Per-pixel blending: only where the source alpha's top bit is set")
Alpha correction: the stored alpha's top bit set
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fba |
(defgsreg FBA (#x4A #x4B) ((fba 0 1))
"Alpha correction: the stored alpha's top bit set")
Frame buffer: base (2048-word pages), width (64 pixels), format, write mask
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| fbmsk |
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| | psm | | | fbw | | | | | | | | fbp |
(defgsreg FRAME (#x4C #x4D) ((fbp 0 9) (fbw 16 6) (psm 24 6) (fbmsk 32 32))
"Frame buffer: base (2048-word pages), width (64 pixels), format, write mask")
Depth buffer: base, format (PSMZ*, the low 4 bits), write mask
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | zmsk |
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| | | | psm | | | | | | | | | | | | | | | | zbp |
(defgsreg ZBUF (#x4E #x4F) ((zbp 0 9) (psm 24 4) (zmsk 32 1))
"Depth buffer: base, format (PSMZ*, the low 4 bits), write mask")
Transfer source and destination buffers
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| | dpsm | | | dbw | | | dbp |
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| | spsm | | | sbw | | | sbp |
(defgsreg BITBLTBUF #x50 ((sbp 0 14) (sbw 16 6) (spsm 24 6) (dbp 32 14) (dbw 48 6) (dpsm 56 6))
"Transfer source and destination buffers")
Page 1 2