This command multiplies two different designated matrixes and stores the results in a designated place in DMEM.
On the contrary of Fast3D, this command does not load any matrix from RDRAM.
For a better understanding of this command, it is better to explain its structure at microcode level.
STRUCTURE:
HH___RRR
_MMM_NNN
HH: Header of the command (8 bits)
RRR: place in DMEM where to store the results of the multiplication
MMM: place in DMEM of the one of the matrix to be multiplied
NNN: place in DMEM of the second matrix to be multiplied
You may find the defined place of the potential existing matrix in DMEM in gbi.h:
D_SCRATCH is a scratch buffer was previously loaded. This scratch buffer is used for other purposes (notably when loading vertices or using TRIs command) so it is better to use such a matrix as soon as it is loaded.
MTX_MVP is the ModelViewProjection Matrix
MTX_MODELVIEW is the ModelView Matrix
MTX_PROJECTION is the Projection Matrix
Related GBI macros:
gSPMatrix/gsSPMatrix (same function and parameters than Fast3D GBI macro but actually an emulation of this latter)
gSPPopMatrix/gsSPPopMatrix/gSPPopMatrixN/gsSPPopMatrixN (see command G_PMTX for more info)
G_MTX
Header of the command: 0x04
Function:
This command multiplies two different designated matrixes and stores the results in a designated place in DMEM. On the contrary of Fast3D, this command does not load any matrix from RDRAM. For a better understanding of this command, it is better to explain its structure at microcode level.
STRUCTURE:
HH___RRR _MMM_NNN
HH: Header of the command (8 bits)
RRR: place in DMEM where to store the results of the multiplication
MMM: place in DMEM of the one of the matrix to be multiplied
NNN: place in DMEM of the second matrix to be multiplied
You may find the defined place of the potential existing matrix in DMEM in gbi.h:
DMEM indices
D_SCRATCH is a scratch buffer was previously loaded. This scratch buffer is used for other purposes (notably when loading vertices or using TRIs command) so it is better to use such a matrix as soon as it is loaded.
MTX_MVP is the ModelViewProjection Matrix
MTX_MODELVIEW is the ModelView Matrix
MTX_PROJECTION is the Projection Matrix
Related GBI macros:
gSPMatrix/gsSPMatrix (same function and parameters than Fast3D GBI macro but actually an emulation of this latter) gSPPopMatrix/gsSPPopMatrix/gSPPopMatrixN/gsSPPopMatrixN (see command G_PMTX for more info)