ビデオ - ジオメトリエンジン

名前 アドレス 説明
NOP 32 0x04000400 No-operation
MATRIX_CONTROL 32 0x04000440 Matrix control register
MATRIX_PUSH 32 0x04000444 Matrix push
MATRIX_POP 32 0x04000448 Matrix pop
MATRIX_STORE 32 0x0400044C Matrix store
MATRIX_RESTORE 32 0x04000450 Matrix restore
MATRIX_IDENTITY 32 0x04000454 Load identity matrix
MATRIX_LOAD4x4 32 0x04000458 Load 4x4 matrix write port
MATRIX_LOAD4x3 32 0x0400045C Load 4x3 matrix write port
MATRIX_MULT4x4 32 0x04000460 Multiply 4x4 matrix write port
MATRIX_MULT4x3 32 0x04000464 Multiply 4x3 matrix write port
MATRIX_MULT3x3 32 0x04000468 Multiply 3x3 matrix write port
MATRIX_SCALE 32 0x0400046C Scale matrix write port
MATRIX_TRANSLATE 32 0x04000470 Translate matrix write port
MATRIX_READ_PROJECTION 32 0x04000640 Read port for projection matrix
MATRIX_READ_ROTATION 32 0x04000680 Read port for ?rotation? matrix
POINT_RESULT 32 0x04000620 .
VECTOR_RESULT 16 0x04000630 .
GFX_COLOR 32 0x04000480 Set color
GFX_NORMAL 32 0x04000484 Set normal
GFX_TEX_COORD 32 0x04000488 Set texture coordinate
GFX_VERTEX16 32 0x0400048C Vertex write port
GFX_VERTEX10 32 0x04000490 Vertex write port
GFX_VERTEX_XY 32 0x04000494 Vertex write port
GFX_VERTEX_XZ 32 0x04000498 Vertex write port
GFX_VERTEX_YZ 32 0x0400049C Vertex write port
GFX_VERTEX_DIFF 32 0x040004A0 Vertex write port
GFX_BEGIN 32 0x04000500 Begin a primitive
GFX_END 32 0x04000504 End a primitive
GFX_BOX_TEST 32 0x040005C0 .


GFX_BEGIN


Starts the processing of primitives.
31..2 ?
1..0 Type (00: Triangles, 01: Quads, 10: Triangle Strip, 11: Quad Strip)


GFX_END


Stops the processing of primitives / finalizes them.

Just like OpenGL, you should only issue vertex commands in between a begin / end pair.

libnds function calls associated with these registers:

   * glBegin
   * glEnd 

MATRIX_TRANSLATE


Three writes multiples the current matrix with a translate matrix of the form:
1.0 0.0 0.0 write1
0.0 1.0 0.0 write2
0.0 0.0 1.0 write3
0.0 0.0 0.0 1.0

libnds function calls associated with these registers:

   * glTranslatev
   * glTranslate3f32
   * glTranslatef32
   * glTranslatef 

MATRIX_SCALE


Three writes multiples the current matrix with a scale matrix of the form:
write1 0.0 0.0 0.0
0.0 write2 0.0 0.0
0.0 0.0 write3 0.0
0.0 0.0 0.0 1.0

libnds function calls associated with these registers:

   * glScalev
   * glScalef32
   * glScalef 

MATRIX_MULT3x3


After 9 writes, the current matrix is multipled by a 3x3 matrix formed from the writes.

MATRIX_MULT4x3


After 12 writes, the current matrix is multipled by a 4x3 matrix formed from the writes.

MATRIX_MULT4x4


After 16 writes, the current matrix is multipled by a 3x3 matrix formed from the writes.

libnds function calls associated with these registers:

   * glMultMatrix3x3
   * glMultMatrix4x3
   * glMultMatrix4x4 

MATRIX_LOAD4x4


Write port to the 4x4 matrix hardware (f32 format).


MATRIX_LOAD4x3


Write port to the 4x4 matrix hardware (f32 format). After 12 writes, the last 4 elements of the matrix are set to 0.0 0.0 0.0 1.0.

libnds function calls associated with these registers:

  • glLoadMatrix4x3
  • glLoadMatrix4x4
  • Various other routines use them behind the scenes.

libnds fixed point / floating point / integer conversion routines:

  • intof32 (integer -> f32)
  • floatof32 (float -> f32)
  • inttot16 (integer -> t16)
  • floattot16 (float -> t16)
  • inttov16 (integer -> v16)
  • floattov16 (float -> v16)
  • inttov10 (integer -> v10)
  • floattov10 (float -> v10)

タグ:

+ タグ編集
  • タグ:

このサイトはreCAPTCHAによって保護されており、Googleの プライバシーポリシー利用規約 が適用されます。

最終更新:2007年12月09日 22:20
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。