★ PROGRAMMER'S GUIDE ★ VDP2 libraryList | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
| value | meaning |
|---|---|
| SCL_NON_INTER | : Non-interlaced |
| SCL_SINGLE_INTER | : Single-dense interlace |
| SCL_DOUBLE_INTER | : Double-dense interlace |
| value | meaning |
|---|---|
| SCL_224LINE | : 224 lines |
| SCL_240LINE | : 240 lines |
| SCL_256LINE | : 256 lines |
| value | meaning |
|---|---|
| SCL_NORMAL_A | : 320 pixels: Normal graphic A |
| SCL_NORMAL_B | : 352 pixels: Normal graphic B |
| SCL_HIRESO_A | : 640 pixels: High resolution graphic A |
| SCL_HIRESO_B | : 704 pixels: High resolution graphic B |
| SCL_NORMAL_AE | : 320 pixels: Dedicated normal graphic A |
| SCL_NORMAL_BE | : 352 pixels: Dedicated normal graphic B |
| SCL_HIRESO_AE | : 640 pixels: Dedicated high resolution graphic A |
| SCL_HIRESO_BE | : 704 pixels: Dedicated high resolution graphic B |
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
sample ()
{
SclVramConfig tp;
SCL_InitVramConfigTb (& tp);
tp.vramModeB = ON / * VRAM B is divided and used * /
tp.vramB0 = SCL_RBG0_CHAR; / * Put the character data of RBG0 * /
tp.vramB1 = SCL_RBG0_PN; / * Place the pattern name data of RBG0 * /
SCL_SetVramConfig (& tp);
}
List | Title | Function | Function Name | No |
sclnum | : Scroll surface number |
| Select from 6 surfaces: SCL_NBG0, SCL_NBG1, SCL_NBG2, SCL_NBG3, SCL_RBG0, SCL_RBG1 | |
scfg | : Scroll configuration data pointer |
List | Title | Function | Function Name | No |
image | : NBG0 256 colors (1/2 reduced display available) |
VRAM A | : Place NBG0 character pattern data |
VRAM B | : Place NBG0 pattern name table |
Uint16 cycle [] = {/ * Cycle pattern table * /
0x4444,0xffff, / * VRAM A (A0) * /
0xffff, 0xffff, / * VRAM A1 unused * /
0x00ff, 0xffff, / * VRAM B (B0) * /
0xffff, 0xffff, / * VRAM B1 unused * /
}
sample ()
{
SCL_SetCycleTable (& cycle);
}
image | : NBG0 16.77 million color bitmap data |
VRAM A | : Place NBG0 bitmap data |
VRAM B | : Place NBG0 bitmap data |
Uint16 cycle [] = {/ * Cycle pattern table * /
0x4444, 0x4444, / * VRAM A (A0) * /
0xffff, 0xffff, / * VRAM A1 unused * /
0x4444, 0x4444, / * VRAM B (B0) * /
0xffff, 0xffff, / * VRAM B1 unused * /
}
sample ()
{
SCL_SetCycleTable (& cycle);
}
image | : RBG0 256 color bitmap data |
NBG0 16-color bitmap data (with 1/4 reduction) | |
NBG1 16-color bitmap data (with 1/2 reduction) | |
NBG2 16-color character data / pattern name data | |
NBG3 16-color character data / pattern name data | |
VRAM A0 | : Place RBG0 bitmap data |
VRAM A1 | : Place rotation parameter coefficient table |
Place rotation parameter table | |
VRAM B0 | : Place NBG0 bitmap data |
Place NBG1 bitmap data | |
VRAM B1 | : Place NBG2 character data and pattern name data |
Place NBG3 character data and pattern name data ☆ |
Uint16 cycle [] = {/ * Cycle pattern table * /
0xffff, 0xffff, / * VRAM A0 * /
0xffff, 0xffff, / * VRAM A1 * /
0x4444,0xff55, / * VRAM B0 * /
0x23ff, 0x67ff, / * VRAM B1 * /
}
sample ()
{
SclVramConfig tp;
SCL_InitVramConfigTb (& tp);
tp.vramModeA = ON / * VRAM A is divided and used * /
tp.vramA0 = SCL_RBG0_CHAR; / * Place the bitmap data of RBG0 * /
tp.vramA1 = SCL_RBG0_K; / * Place rotation parameter coefficient table * /
SCL_SetVramConfig (& tp);
SCL_SetCycleTable (& cycle);
}
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
sx | : Specify size in X direction |
sy | : Specify size in Y direction |
NBG0, NBG1 | : 1/4 to 256 |
RBG0, RBG1 | :Any |
List | Title | Function | Function Name | No |
value | meaning |
|---|---|
1 | Use only rotation parameter A |
2 | Use rotation parameters A and B |
value | meaning |
|---|---|
SCL_SPR | Show only sprite framebuffer |
SCL_SPR | Show only sprite framebuffer |
SCL_RBG0 | Show framebuffer for RBG0 and sprites |
SCL_NON | Do not show |
value | meaning |
|---|---|
SCL_RBG0 | Show RBG0 |
SCL_RBG1 | Show RBG1 |
SCL_NON | Do not show. |
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
angelXy | : Set the X-axis or Y-axis angle |
angleZ | : Set the Z-axis angle |
angleD | : Set the screen rotation angle |
mode | : Rotation mode. The first argument sets whether X or Y is enabled for the axis. |
SCL_X_AXIS: Scroll X-axis rotation | |
SCL_Y_AXIS: Scroll Y-axis rotation (cannot be specified on RBG1 plane) |
List | Title | Function | Function Name | No |
angelXy | : Set the angle increase of X-axis or Y-axis |
angleZ | : Set the Z-axis angle increase |
angleD | : Set the screen rotation angle increase |
List | Title | Function | Function Name | No |
surface | : Specify which rotation parameter table to set the data set to. |
(SCL_RBG_TB_A, SCL_RBG_TB_B) | |
datap | : Data table pointer |
x | : Data size in the X direction |
y | : Data size in Y direction |
List | Title | Function | Function Name | No |
surface | : Screen type SCL_NBG0 | SCL_NBG1 | SCL_NBG2 | SCL_NBG3 | SCL_RBG0 | SCL_RBG1 |
x | : Horizontal mosaic size (mosaic off at 0 to 15, 0) |
y | : Vertical mosaic size (0 to 15) Cannot be set for the rotating surface (RBG0, RBG1). |
List | Title | Function | Function Name | No |
address | : Specifies where to put the line color table in VRAM. |
tbsize | : Specify the size of the table. |
palNumTb | : Specify the data for each line by the palette number. |
16 colors 0 to 15 | |
256 colors 0-255 | |
2048 colors 0 to 2047 |
List | Title | Function | Function Name | No |
address | : Specifies where to put the line color table in VRAM. |
dataSize | : Specify the number of data tables. |
dataTb | : Specify the data for each line in 5bit RGB. |
void sample (void)
{
Uint16 DataTB;
DataTB = 0x0000; / * black * /
SCL_SetBack (SCL_VDP2_VRAM, 1, & DataTB);
}
List | Title | Function | Function Name | No |
win | : Specify the window type. |
SCL_W0 = Specify W0 window | |
SCL_W1 = Specify W1 window | |
logic | : On the screen specified here, overlaying between multiple windows is processed by AND. |
The default is OR processing. | |
enable enable | : Specify the screen to display the window. |
area | : Specifies the window to enable outside the window. |
The default is inside. |
Specifying a constant | logic | enable enable | area | meaning |
|---|---|---|---|---|
SCL_NBG0 | ○ | ○ | ○ | NBG0 in the transparent processing window |
SCL_NBG1 | ○ | ○ | ○ | NBG1 in the transparent processing window |
SCL_NBG2 | ○ | ○ | ○ | NBG2 in the transparent processing window |
SCL_NBG3 | ○ | ○ | ○ | NBG3 in transparent processing window |
SCL_RBG0 | ○ | ○ | ○ | RBG0 of transparent processing window |
SCL_RBG1 | ○ | ○ | ○ | RBG1 of transparent processing window |
SCL_EXBG | ○ | ○ | ○ | EXBG in transparent processing window |
SCL_SPR | ○ | ○ | ○ | Transparency window sprite |
SCL_RP | ○ | △ | ○ | Rotation parameter window |
SCL_CC | ○ | ○ | ○ | Color calculation window |
SCL_NON | ○ | ○ | ○ | Unspecified |
startX | : Start point X coordinate of rectangular data |
startY | : Starting point Y coordinate of rectangular data |
endX | : End point X coordinate of rectangular data |
endY | : End point Y coordinate of rectangular data |
List | Title | Function | Function Name | No |
win | : Specify the window type. |
SCL_W0 = Specify W0 window | |
SCL_W1 = Specify W1 window | |
logic | : On the screen specified here, overlaying between multiple windows is processed by AND. |
The default is OR processing. | |
enable enable | : Specify the screen to display the window. |
area | : Specifies the window to enable outside the window. |
The default is inside. | |
address | : Specifies where to place the line window table in VRAM. |
sy | : The beginning of the Y coordinate |
tbSize | : The size of the line window table |
tb | : Line window table pointer |
List | Title | Function | Function Name | No |
logic | : On the screen specified here, overlaying between multiple windows is processed by AND. |
The default is OR processing. | |
enable enable | : Specify the screen to display the window. |
area | : Specifies the window to enable outside the window. |
The default is inside. |
List | Title | Function | Function Name | No |
type | : Sprite type SCL_SPR_TYPE0, SCL_SPR_TYPE1 ... SCL_SPR_TYPEF |
colMode | : Color mode SCL_PALETTE, SCL_MIX (SCL_MIX: mixed palette and RGB) |
winMode | : Window mode SCL_MSB_SHADOW, SCL_SP_WINDOW |
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
surface | : Screen type SCL_SPR, SCL_NBG0, SCL_NBG1, SCL_NBG2, SCL_NBG3, SCL_RBG0, SCL_RBG1, SCL_LNCL |
index | : Write start palette number |
num | : Color data table size |
color | : Color data table (Unit 32 or Unit 16) |
List | Title | Function | Function Name | No |
surface | : Screen type |
SCL_SPR | SCL_NBG0 | SCL_NBG1 | SCL_NBG2 | SCL_NBG3 | SCL_RBG0 | SCL_RBG1 | SCL_LNCL | |
The same palette can be shared by multiple screens by OR operation. | |
numOfColors | :Number of colors |
transparent | : Set whether to disable transparency. |
| |
|
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
surface | : Screen type |
SCL_SPR, SCL_NBG0, SCL_NBG1, SCL_NBG2, SCL_NBG3, SCL_RBG0, SCL_RBG1 | |
interval interval | : Interval (specified in 1/60 second units) |
index | : The beginning of the palette number to be changed |
numOfCol | : Number of colors |
numOfTbl | : Number of tables |
changeTbl [] | : Conversion table |
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
colMixPriority | : Sprite priority number (0-7) |
mode | :mode |
SCL_IF_FRONT, SCL_IF_EQUAL, SCL_IF_BEHIND |
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
surfaces | : Screen type |
SCL_SP0 | SCL_SP1 ... SCL_SP7 | SCL_NBG0 | SCL_NBG1 | | |
SCL_NBG2 | SCL_NBG3 | SCL_RBG0 | SCL_RBG1 | SCL_EXBG | |
Multiple simultaneous specifications are possible by using the OR operation | |
interval interval | : Interval (specified in 1/60 second units) |
time | : Specify the time it takes to finish the color change. (Specified in 1/60 second units) |
startRate | : Percentage at start |
endRate | : Percentage at the end |
List | Title | Function | Function Name | No |
offsetreg | : Specifies which color offset register to use. |
SCL_OFFSET_A, SCL_OFFSET_B | |
surfaces | : Screen type |
SCL_SP0 | SCL_SP1 ... SCL_SP7 | SCL_NBG0 | SCL_NBG1 | | |
SCL_NBG2 | SCL_NBG3 | SCL_RBG0 | SCL_RBG1 | SCL_EXBG | |
Multiple simultaneous specifications are possible by using the OR operation | |
red | : Color specification (red) |
green | : Color specification (green) |
blue | : Color specification (blue) |
List | Title | Function | Function Name | No |
offsetReg | : Specifies which color offset register to use. |
SCL_OFFSET_A, SCL_OFFSET_B | |
red | : Color specification (red) -255 ~ 255 |
green | : Color specification (green) -255 ~ 255 |
blue | : Color specification (blue) -255 ~ 255 |
List | Title | Function | Function Name | No |
offsetReg | : Specifies which color offset register to use. |
SCL_OFFSET_A, SCL_OFFSET_B | |
interval interval | : Interval (specified in 1/60 second units) |
time | : Specify the time it takes to finish the color change. (Specified in 1/60 second units) |
start | : Start color specification (red) -255 ~ 255 |
Start color specification (green)-255 ~ 255 | |
Start color specification (blue) -255 to 255 | |
end | : End color specification (red) -255 ~ 255 |
End color specification (green) -255 to 255 | |
End color specification (blue) -255 to 255 |
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
surface | : Screen type |
SCL_SPR, SCL_NBG0, SCL_NBG1, SCL_NBG2, SCL_NBG3, | |
SCL_RBG0, SCL_RBG1, SCL_EXBG |
List | Title | Function | Function Name | No |
surface | : Screen type |
SCL_SPR, SCL_NBG0, SCL_NBG1, SCL_NBG2, SCL_NBG3, | |
SCL_RBG0, SCL_RBG1, SCL_EXBG |
List | Title | Function | Function Name | No |
enable enable | : Specify the screen to display the shadow. |
Multiple can be specified at the same time by OR operation. | |
SCL_NBG0 | SCL_NBG1 | SCL_NBG2 | SCL_NBG3 | | |
SCL_RBG0 | SCL_RBG1 | SCL_BACK | SCL_EXBG | SCL_NON |
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
List | Title | Function | Function Name | No |
★ PROGRAMMER'S GUIDE ★ VDP2 library