3D コアレジスタ
名前 |
幅 |
アドレス |
GFX_CONTROL |
16 |
0x04000060 |
GFX_FIFO |
32 |
0x04000400 |
GFX_STATUS |
32 |
0x04000600 |
GFX_TEX_FORMAT |
32 |
0x040004A8 |
GFX_CLEAR_COLOR |
32 |
0x04000350 |
GFX_CLEAR_DEPTH |
16 |
0x04000354 |
GFX_LIGHT_VECTOR |
32 |
0x040004C8 |
GFX_LIGHT_COLOR |
32 |
0x040004CC |
GFX_DIFFUSE_AMBIENT |
32 |
0x040004C0 |
GFX_SPECULAR_EMISSION |
32 |
0x040004C4 |
GFX_SHININESS |
32 |
0x040004D0 |
GFX_POLY_FORMAT |
32 |
0x040004A4 |
GFX_ALPHA_TEST |
16 |
0x04000340 |
GFX_FLUSH |
32 |
0x04000540 |
GFX_VIEWPORT |
32 |
0x04000580 |
GFX_TOON_TABLE |
16 |
0x04000380 |
GFX_EDGE_TABLE |
16 |
0x04000330 |
GFX_VERTEX_RAM_USAGE |
16 |
0x04000606 |
GFX_POLYGON_RAM_USAGE |
16 |
0x04000604 |
GFX_TEX_FORMAT
31..30 |
Texgen mode |
29 |
? |
28..26 |
Texture Format |
25..23 |
Texture Height |
22..20 |
Texture Width |
19 |
Flip T |
18 |
Flip S |
17 |
Wrap T |
16 |
Wrap S |
15..0 |
Texture address / 8 |
Texgen mode affects what texture coordinates are passed into the rasterizer.
- 00 Tex-coord passed through
- 01 Tex-coord * texture matrix
- 10 Normal * texture matrix
- 11 Vertex * texture matrix
Texture formats:
0 ?
1 RGB32_A3 - 32 color palette, 3 bits of alpha
2 RGB4 - 4 color palette (2 bpp)
3 RGB16 - 16 color palette (4 bpp)
4 RGB256 - 256 color palette (8 bpp)
5 Compressed
6 RGB8_A5 - 8 color palette, 5 bits of alpha
7 RGBA - 15 bpp RGB plus 1 bit alpha in MSB (16 bpp)
Texture sizes are powers of 2 from 8 to 1024 (0..7). A texture does not have to be square.
libnds function calls associated with this register:
- glBindTexture
- glTexImage2d
GFX_POLY_FORMAT
31..30 ?
29..24 Polygon ID
23..21 ?
20..16 Polygon alpha (31: opaque)
15..8 ?
7..6 Cull mode (00: front and back, 01: front, 10: back, 11: none)
5..4 Mode (00: Modulate, 01: Decal, 10: Toon shading, 11: Shadow)
3 Light 3 enable
2 Light 2 enable
1 Light 1 enable
0 Light 0 enable
libnds function calls associated with this register:
* glPolyFmt
GFX_LIGHT_VECTOR
31..30 Light ID #
29..20 z component of normal (.10 fixed)
19..10 y component of normal (.10 fixed)
9..0 x component of normal (.10 fixed)
libnds function calls associated with this register:
* glLight
GFX_LIGHT_COLOR
31..30 Light ID #
14..10 RGB color
libnds function calls associated with this register:
* glLight
GFX_DIFFUSE_AMBIENT
31..16 Ambient color
15..0 Diffuse color
GFX_SPECULAR_EMISSION
31..16 Emission color
15..0 Specular color
libnds function calls associated with this register:
* glMaterialf
GFX_CONTROL
15..14 ?
13 Polygon / vertex memory overflow (write 1 to reset)
12 Line buffer overflow (write 1 to reset)
11..6 ?
5 Outlining (1: enabled)
4 Antialiasing (1: enabled)
3 Alpha blending (1: enabled)
2 Alpha test (1: enabled)
1 Shading mode (0: toon, 1: highlighting)
0 Texture-mapping (1: enabled)
GFX_ALPHA_TEST
15..5 -
4..0 Alpha threshold
If enabled (see GFX_CONTROL or glEnable), fragments are discarded if their post-blend alpha value is below the threshold set in this register.
libnds function calls associated with this register:
* glAlphaFunc
最終更新:2007年07月10日 23:42