Japanese

ListReference

function

slRparaInitSet


Store rotation parameter table in VRAM area

Format

    #include "sgl.h"

    ROTSCROLL *addr_A;

    void slRparaInitSet( addr_A );

argument

    ROTSCROLL *addr_A - VRAM start address where rotation parameter table is stored

Return number

    void - returns nothing.

function

Rotation parameter table (size: 60H) used for rotation scrolling in VRAM Store in area. Parameter B is stored from the position of parameter A+20H, so a total of E0H is required for parameters A and B.
The default storage address when this function is not used is 25E3FF00H.
Be sure to specify an absolute address for addr_A.

example

    slRparaInitSet ( ( void * )( 0x25e5fe00 ) );

reference

 slMakeKtable
 slKtableRA
 slKtableRB
 slRparaReadCtrlRA
 slRparaReadCtrlRB
 MsScreenSizeX
 MsScreenSizeY
 Resolution
 VDP2_RPTA
 ScrRotPtr
 rpara_vram_adr
 RotScrParA
 RotScrParB 



ListReference

function

slCurRpara


Specify the parameter to manipulate the rotation parameter

Format

    #include "sgl.h"

    Uint16 mode;

    void slCurRpara( mode );

argument

    Uint16 mode - rotation parameters

Return number

    void - returns nothing.

function

Specify the parameter to be manipulated among rotation parameters A and B.
The following parameters are included in mode.
RA : Rotation parameter A RB : Rotation parameter B

example

    /* Manipulate rotation coefficient A */
    slCurRpara ( RA );
    slUnitMatrix ( CURRENT );
    slTranslate ( toFIXED ( 10.0 ), toFIXED ( 20.0 ), toFIXED ( 15.0 ) );
    slRotZ ( DEGtoANG ( 10.0 ) );
    slScrMatSet ();

    /* Manipulate rotation coefficient B */
    slCurRpara ( RB );
    slUnitMatrix ( CURRENT );
    slTranslate ( toFIXED ( 100.0 ), toFIXED ( -100.0 ), toFIXED ( 15.0 ) );
    slRotZ ( DEGtoANG ( 10.0 ) );
    slScrMatSet ();

reference

 slRparaMode
 slScrMatSet
 slScrMatConv
 ScrRotPtr
 RotScrParA
 RotScrParB 



ListReference

function

slRparaMode


Specify rotation parameter usage mode

Format

    #include "sgl.h"

    Uint16 mode;

    void slRparaMode( mode );

argument

    Uint16 mode - Rotation parameter mode (described later).

Return number

    void - returns nothing.

function

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 based on the coefficient data of rotation parameter A W_CHANGE : Image switching using the rotation parameter window

example

    slRparaMode ( RA );

reference

 slCurRpara
 slRparaMode
 slRparaReadCtrlRA
 slRparaReadCtrlRB
 VDP2_RPMD 



ListReference

function

slMakeKtable


Create a table of coefficients

Format

    #include "sgl.h"

    void *addr_A;

    void slMakeKtable( *addr_A );

argument

    void *addr_A - VRAM address of coefficient table

Return number

    void - returns nothing.

function

Create a table of coefficients to use in 3D rotation.
2 Create one bank of Word size 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.

example

    slRparaInitSet ( ( void * )( 0x25e5fe00 ) );
    slKtableRA ( ( void * )( 0x25e40000 ), K_2WORD | K_ON | K_DOT | K_FIX );
    slMakeKtable ( ( void * )( 0x25e40000 ) );

    slRparaMode ( K_CHANGE );

reference

 slRparaInitSet
 slKtableRA
 slKtableRB
 slRparaReadCtrlRA
 slRparaReadCtrlRB
 VDP2_KTAOF
 k_table_adr 



ListReference

function

slKtableRA



ListReference

function

slKtableRB


Setting the coefficient table address

Format

    #include "sgl.h"

    void *addr_A;
    Uint16 mode;

    void slKtableRA( addr_A, mode );
    void slKtableRB( addr_A, mode );

argument

    void *addr_A - VRAM address of coefficient table
Uint16 mode - Coefficient table control mode (described later)

Return number

    void - returns nothing.

function

Set the address of the coefficient table in the register and at the same time write the usage of the coefficient table, Specify the configuration.
The following parameters are included 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 : Transformation unit
        K_FIX : Fixed coefficient Change the above value according to the function to be used with "|" Please specify by connecting.

example

    Use mode 0 (pick up the x and y expansion factors from the coefficient table),
    When using a coefficient of 2 in Word mode, per dot.
#define RBG0RA_RPARA_ADR ( void * )VDP2_VRAM_A0 void slKtableRA ( RBG0RA_RPARA_ADR, K_ON | K_2WORD | K_MODE0 | K_DOT );

reference

 slRparaInitSet
 slRparaReadCtrlRA
 VDP2_KTCTL
 slRparaReadCtrlRB
 VDP2_KTAOF
 RotScrParA
 RotScrParB 



ListReference

function

slRparaReadCtrlRA



ListReference

function

slRparaReadCtrlRB


Specifying how to read rotation parameters

Format

    #include "sgl.h"

    Uint16 type;

    void slRparaReadCtrlRA( type );
    void slRparaReadCtrlRB( type );

argument

    Uint16 type - How to read rotation parameters (described later).

Return number

    void - returns nothing.

function

Specify whether to reread the rotation parameters Xst, Yst, and KAst for each line.
For type, LnRd_Xst , LnRd_Yst , LnRd_KAst Specify by connecting them with '|'.

example

    slRparaReadCtrlRB ( LnRd_Yst );

reference

 slRparaInitSet
 slKtableRA
 slKtableRB
 VDP2_RPRCTL

return
Copyright SEGA ENTERPRISES, LTD., 1997