#include "sgl.h"
ROTSCROLL * addr_A;
void slRparaInitSet (addr_A);
ROTSCROLL * addr_A-VRAM start address to store rotation parameter table
void --Nothing is returned.
VRAM the rotation parameter table (size: 60H) used for rotation scrolling
Store in the area. Since parameter B is stored from the position of parameter A + 20H, E0H is required in total for parameters A and B.
The default storage address when this function is not used is 25E3FF00H.
Be sure to specify the absolute address for addr_A.
slRparaInitSet ((void *) (0x25e5fe00));
slMakeKtable | slKtableRA | slKtableRB | slRparaReadCtrlRA |
slRparaReadCtrlRB | MsScreenSizeX | MsScreenSizeY | Resolution |
VDP2_RPTA | ScrRotPtr | rpara_vram_adr | RotScrParA |
RotScrParB |
#include "sgl.h"
Uint16 mode;
void slCurRpara (mode);
Uint16 mode-Rotation parameters
void --Nothing is returned.
Of the rotation parameters A and B, specify the parameter to be operated.
The following parameters are entered in mode.
RA : Rotation parameter A
RB : Rotation parameter B
/ * Operation of rotation coefficient A * /
slCurRpara ( RA );
slUnitMatrix ( CURRENT );
slTranslate ( toFIXED (10.0), toFIXED (20.0), toFIXED (15.0));
slRotZ ( debugtoANG (10.0));
slScrMatSet ();
/ * Operation of rotation coefficient B * /
slCurRpara ( RB );
slUnitMatrix ( CURRENT );
slTranslate ( toFIXED (100.0), toFIXED (-100.0), toFIXED (15.0));
slRotZ ( debugtoANG (10.0));
slScrMatSet ();
slRparaMode | slScrMatSet | slScrMatConv | ScrRotPtr |
RotScrParA | RotScrParB |
#include "sgl.h"
Uint16 mode;
void slRparaMode (mode);
Uint16 mode --Rotation parameter mode (see below).
void --Nothing is returned.
Specify the usage mode of rotation parameters A and B.
The following parameters are entered in mode.
RA : Only rotation parameter A is used RB : Only rotation parameter B is used K_CHANGE : Image switching according to the coefficient data of rotation parameter A W_CHANGE : Image switching in the rotation parameter window
slRparaMode ( RA );
slCurRpara | slRparaMode | slRparaReadCtrlRA | slRparaReadCtrlRB |
VDP2_RPMD |
#include "sgl.h"
void * addr_A;
void slMakeKtable (* addr_A);
void * addr_A --VRAM address of coefficient table
void --Nothing is returned.
Create a table of coefficients for use in 3D rotation.
2 Create one bank of Word-sized data. When using this function,
Function slKtableRA ( K_2WORD | K_ON | K_DOT | K_FIX )
slKtableRB ( K_2WORD | K_ON | K_DOT | K_FIX )
Please use together.
slRparaInitSet ((void *) (0x25e5fe00));
slKtableRA ((void *) (0x25e40000), K_2WORD | K_ON | K_DOT | K_FIX );
slMakeKtable ((void *) (0x25e40000));
slRparaMode ( K_CHANGE );
slRparaInitSet | slKtableRA | slKtableRB | slRparaReadCtrlRA |
slRparaReadCtrlRB | VDP2_KTAOF | k_table_adr |
#include "sgl.h"
void * addr_A;
Uint16 mode;
void slKtableRA (addr_A, mode);
void slKtableRB (addr_A, mode);
void * addr_A --Coefficient table VRAM address Uint16 mode --Coefficient table control mode (described later)
void --Nothing is returned.
Set the address of the coefficient table in the register, and at the same time, how to use the coefficient table,
Specify the configuration.
The following parameters are entered in mode.
K_OFF | K_ON : Table use K_2WORD | K_1WORD : Coefficient data size K_MODE0 | K_MODE1 | K_MODE2 | K_MODE3 : Coefficient mode K_LINECOL : Line color K_DOT | K_LINE : Deformation unit K_FIX : Fixed coefficient Please specify by connecting with.
Use mode 0 (pick up the x and y expansion factors from the coefficient table) and
When using the coefficient in 2 Word mode, dot by dot.
#define RBG0RA_RPARA_ADR (void *) VDP2_VRAM_A0
void slKtableRA (RBG0RA_RPARA_ADR, K_ON | K_2WORD | K_MODE0 | K_DOT );
slRparaInitSet | slRparaReadCtrlRA | VDP2_KTCTL | slRparaReadCtrlRB |
VDP2_KTAOF | RotScrParA | RotScrParB |
#include "sgl.h"
Uint16 type;
void slRparaReadCtrlRA (type);
void slRparaReadCtrlRB (type);
Uint16 type --How to read rotation parameters (see below).
void --Nothing is returned.
Specifies whether to reread the rotation parameters Xst, Yst, and KAst for each line.
type is
LnRd_Xst , LnRd_Yst , LnRd_KAst
Are specified by connecting them with'|'.
slRparaReadCtrlRB ( LnRd_Yst );
slRparaInitSet | slKtableRA | slKtableRB | VDP2_RPRCTL |