#include "sgl.h"
void * addr;
void slLineColTable (addr);
void * addr --Line color table address on VRAM.
void --Nothing is returned.
Set the line color table address in the register.
Either the offset from the beginning of VDP2 or the absolute address can be used for addr. (Only the lower 20 bits are valid.)
slDMACopy (src, (void *) 0x25e20000, 256 * sizeof ( Uint16 ));
::
slLineColTable ((void *) 0x25e20000);
slLine1ColSet | slLineColTable | slColorCalc | slColorCalcOn |
slLineColDisp | slColorCalcMode | slColRateLNCL | VDP2_LCTA |
#include "sgl.h"
void * addr;
Uint16 color;
void slLine1ColSet (addr, color);
void * addr --Line color table address on VRAM Uint16 color --Color number.
void --Nothing is returned.
Line color Makes the screen a single color and sets that color.
Either the offset from the beginning of VDP2 or the absolute address can be used for addr. (Only the lower 20 bits are valid.)
Multiply NBG1 by line color. (Line color table is 25E20000H)
slColorCalc ( CC_RATE | CC_2ND | NBG1ON );
slColorCalcOn ( NBG1ON );
slLine1ColSet ((void *) 0x20000, 128);
slLineColTable | slColorCalc | slColorCalcOn | slLineColDisp |
slColorCalcMode | slColRateLNCL | VDP2_LCTA |
#include "sgl.h"
Uint16 mode;
void slLineColDisp (mode);
Uint16 mode --The screen that is affected by the line color when it becomes the top image.
void --Nothing is returned.
Set the screen that is affected by the line color when it becomes the top image.
In mode,
NBG0ON , NBG1ON , NBG2ON , NBG3ON , RBG0ON , LNCLON
Is entered.
If you want to set the drawing settings for multiple scroll planes at the same time, specify the mode of each plane by connecting them with "|".
Use LNCLON if you want to set sprites.
(This is because the bit position is different from other registers)
Multiply NBG1 by line color.
slColorCalcMode ( CC_RATE | CC_2ND );
slColorCalcOn ( NBG1ON );
slLineColTable ((void *) 0x25e20000);
slLineColDisp ( NBG1ON );
slColRateLNCL ( CLRate20_12 );
slLine1ColSet | slLineColTable | slColorCalc | slColorCalcOn |
slColorCalcMode | slColRateLNCL | slLineColTable | VDP2_LNCLEN |
#include "sgl.h"
Uint16 mode;
void slColorCalc (mode);
Uint16 mode --Parameters for color operations (see below).
void --Nothing is returned.
Set the parameters for color calculation.
mode specifies the following parameters.
CC_RATE | CC_ADD : Calculation method CC_TOP | CC_2ND : Calculation specification screen CC_EXT : Extended color calculation NBG0ON | NBG1ON | NBG2ON | NBG3ON | RBG0ON | LNCLON | SPRON : Registration surface Connect the above values with "|" according to the function to be used. Please specify.
Multiply NBG1 by line color.
slColorCalc ( CC_RATE | CC_2ND | NBG1ON );
slLineColTable ((void *) 0x25e20000);
slLineColDisp ( NBG1ON );
slColRateLNCL ( CLRate20_12 );
Extended color arithmetic on NBG0 and NBG1.
slColorCalc ( CC_RATE | CC_TOP | NBG0ON | NBG1ON | CC_EXT );
slColRateNbg0 ( CLRate6_26 );
slColRateNbg1 ( CLRate12_20 );
slPriorityNbg0 (7);
slPriorityNbg1 (6);
slPriorityNbg2 (5);
This function is the same as running both slColorCalcMode and slColorCalcOn.
#include "sgl.h"
Uint16 mode;
void slColorCalcMode (mode);
Uint16 mode --Color calculation mode (described later).
void --Nothing is returned.
This function performs only the mode setting part of the slColorCalc function.
Use with the slColorCalcOn function.
mode specifies the following parameters.
CC_RATE | CC_ADD : Calculation method CC_TOP | CC_2ND : Calculation specification screen CC_EXT : Extended color calculation
Multiply NBG1 by line color.
slColorCalcMode ( CC_RATE | CC_2ND );
slColorCalcOn ( NBG1ON );
slLineColTable ((void *) 0x25e20000);
slLineColDisp ( NBG1ON );
slColRateLNCL ( CLRate20_12 );
#include "sgl.h"
Uint16 mode;
void slColorCalcOn (mode);
Uint16 mode --Screens affected by color arithmetic controls
void --Nothing is returned.
Sets the screen affected by the color calculation control.
In mode,
NBG0ON , NBG1ON , NBG2ON , NBG3ON , RBG0ON , LNCLON , SPRON
Is entered.
If you want to set the drawing settings for multiple scroll planes at the same time, specify the mode of each plane by connecting them with "|".
Multiply NBG1 by line color.
slColorCalcMode ( CC_RATE | CC_2ND );
slColorCalcOn ( NBG1ON );
slColRateNbg1 ( CLRate20_12 );
#include "sgl.h"
Uint16 mode;
void slGradationOn (mode);
Uint16 mode --The surface that activates the blur function (described later).
void --Nothing is returned.
Enable the blur function and specify the screen to operate.
In mode,
grdNBG0 , grdNBG1 , grdNBG2 , grdNBG3 , grdRBG0 , grdSPR , OFF
Specify only one of.
slColRAMMode ( CRM16_1024 );
::
slGradationOn ( grdNBG0 );
slColorCalc ( CC_RATE | CC_TOP | NBG0ON );
slColRateNbg0 ( CLRate20_12 );
The blur function can only be used when the color RAM mode is 0.
Also, please note that the blur function will not work unless it is used in combination with color calculation.
To cancel the blur function, specify OFF as an argument or
Use the slGradationOff function.
#include "sgl.h"
void slGradationOff (void);
void --Do not give anything.
void --Nothing is returned.
Disables the blur function.
slGradationOff ();
#include "sgl.h"
Uint16 rate;
Uint16 mode;
void slColRate (mode, rate);
void slColRateNbg0 (rate);
void slColRateNbg1 (rate);
void slColRateNbg2 (rate);
void slColRateNbg3 (rate);
void slColRateRbg0 (rate);
void slColRateLNCL (rate);
void slColRateBACK (rate);
void slColRateSpr0 (rate);
void slColRateSpr1 (rate);
void slColRateSpr2 (rate);
void slColRateSpr3 (rate);
void slColRateSpr4 (rate);
void slColRateSpr5 (rate);
void slColRateSpr6 (rate);
void slColRateSpr7 (rate);
Uint16 mode --A surface that specifies the color calculation ratio (described later).
Uint16 rate --Color calculation rate.
void --Nothing is returned.
Specify the color calculation ratio of each screen.
In mode,
scnNBG0 , scnNBG1 , scnNBG2 , scnNBG3 , scnRBG0 , scnLNCL , scnBACK
Specify one of.
Specify the rate in the range of CLRate31_1 to CLRate0_32.
rate Top Screen: Second Screen
CLRate31_1 31: 1
CLRate30_2 30: 2
CLRate29_3 29: 3
CLRate28_4 28: 4
CLRate27_5 27: 5
CLRate26_6 26: 6
CLRate25_7 25: 7
CLRate24_8 24: 8
CLRate23_9 23: 9
CLRate22_10 22:10
CLRate21_11 21:11
CLRate20_12 20:12
CLRate19_13 19:13
CLRate18_14 18:14
CLRate17_15 17:15
CLRate16_16 16:16
CLRate15_17 15:17
CLRate14_18 14:18
CLRate13_19 13:19
CLRate12_20 12:20
CLRate11_21 11:21
CLRate10_22 10:22
CLRate9_23 9:23
CLRate8_24 8:24
CLRate7_25 7:25
CLRate6_26 6:26
CLRate5_27 5:27
CLRate4_28 4:28
CLRate3_29 3:29
CLRate2_30 2:30
CLRate1_31 1:31
CLRate0_32 0:32
slColRate ( scnNBG0 , CLRate29_3 );
slColRateNbg2 ( CLRate2_30 );
slLineColTable | slLine1ColSet | slLineColTable | slColorCalc |
slColorCalcOn | slColorCalcMode | slGradationOn | slGradationOff |
VDP2_CCRNA |
#include "sgl.h"
void * addr_A;
void slBackColTable (addr_A);
void * addr_A --Absolute address indicating the color table of the back screen.
void --Nothing is returned.
Set the color table on the back screen and set the mode to switch colors in raster units.
ss_main () {
Uint16 col [256] = {
C_RGB (3, 6, 6), ...
};
::
slDMACopy (col, (void *) (0x25e40000), 256 * sizeof ( Uint16 ));
::
slBackColTable ((void *) (0x25e40000));
::
The argument given to this function specifies the VRAM address of VDP2 as an absolute address.
slBack1ColSet | VDP2_BKTA |
#include "sgl.h"
void * addr_A;
Uint16 color;
void slBack1ColSet (addr_A, color);
void * addr_A --The start address (absolute address) of the VRAM that stores the back color.
Uint16 color --Specify color data with 5 bits each for RGB.
void --Nothing is returned.
Set the back screen. The back screen is the backmost drawing surface that is displayed in the area where no other screen is drawn.
Whiten the back screen.
slBack1ColSet ((void *) 0x25e00000, 0x7fff
VRAM uses the VRAM area of VDP2 instead of color RAM.
slBackColTable | VDP2_BKTA |