#include "sgl.h"
Uint16 type;
void slVRAMMode (type);
Uint16 type --How to split VRAM (see below).
void --Nothing is returned.
Set the VRAM division method.
type is
Div_A , Div_B
Specify only those that divide.
Specify NULL if you want to stop splitting.
Of the VRAM of VDP2, only VRAM B is split (A is not split).
slVRAMMode ( Div_B );
#include "sgl.h"
Uint32 a0;
Uint32 a1;
Uint32 b0;
Uint32 b1;
void slScrCycleSet (a0, a1, b0, b1);
Uint32 a0 --Cycle pattern for bank a0.
Uint32 a1-Cycle pattern for bank a1.
Uint32 b0 --Cycle pattern for bank b0.
Uint32 b1-Circuit pattern for bank b1.
void --Nothing is returned.
Set the cycle pattern for each bank. If each bank is divided, you can set the cycle pattern to a0, a1, b0, b1. When the banks are not split, you can set cycle patterns for a0 and b0.
Uint32 a0 = 0xfffffeee;
Uint32 a1 = 0x4455feee;
Uint32 b0 = 0x01feeeee;
Uint32 b1 = 0xfffeeeee;
slScrCycleSet (a0, a1, b0, b1);
slScrDisp ( NBG0ON | NBG1ON | NBG2OFF | NBG3OFF );
If you use this function to set the cycle pattern without using slScrAutoDisp , you must specify the surface to draw with slScrDisp.
When this function is executed, each setting value is immediately set in the register of VDP2.
slScrAutoDisp | slScrDisp | VDP2_CYCA0L | VDP2_CYCA0U |
VDP2_CYCA1L | VDP2_CYCA1U | VDP2_CYCB0L | VDP2_CYCB0U |
VDP2_CYCB1L | VDP2_CYCB1U |
#include "sgl.h"
Uint32 mode;
Bool slScrAutoDisp (mode);
Uint32 mode --The surface for which you want to set the function (multiple can be specified with'|') (described later).
Bool --Error status (see below)
Register the system of the scroll surface for which the function settings have been completed.
The function automatically sets the access specification (cycle pattern register) to VRAM of the scroll screen specified as a parameter, and at the same time, turns on the drawing setting of the registered scroll.
In mode,
NBG0ON , NBG1ON , NBG2ON , NBG3ON , RBG0ON
Is entered.
If the setting cannot create a cycle pattern, NG is returned.
If you want to set the drawing settings for multiple scroll planes at the same time, set the mode of each plane to "|".
Please specify by connecting with.
The error status is NG if the cycle pattern cannot be set.
Returns OK if the configuration completes successfully.
Use NBG1 in addition to the debug string display (NBG0) plane.
slCharNbg1 (...);
slPageNbg1 (...);
slPlaneNbg1 (...);
slMapNbg1 (...);
slScrAutoDisp ( NBG0ON | NBG1ON );
This function does not support all patterns of VDP2 VRAM access. Also, since this function takes some time to process, it is strongly recommended to set it with a combination of slScrCycleSet and slScrDisp in the end.
The result of this function will be reflected when the following functions are executed in advance.
slCharNbg0
slCharNbg1
slCharNbg2
slCharNbg3
slCharRbg0
slPageNbg0
slPageNbg1
slPageNbg2
slPageNbg3
slPageRbg0
slMapNbg0
slMapNbg1
slMapNbg2
slMapNbg3
sl1MapRA
sl1MapRB
However, even the settings of these functions do not support the following cases.
In that case, you need to set it manually using slScrDisp and slScrCycleSet.
-When reduction settings are made for NBG0 and NBG1.
-When character data or map data spans multiple VRAM areas.
For example, when character data occupies VRAM A0 and A1.
#include "sgl.h"
Uint32 mode;
void slScrDisp (mode);
Uint32 mode --The surface to draw (multiple can be specified with'|') (described later).
void --Nothing is returned.
Sets the drawing of the scroll surface specified as a parameter.
mode contains the following predefined macros.
NBG0ON | NBG0OFF
NBG1ON | NBG1OFF
NBG2ON | NBG2OFF
NBG3ON | NBG3OFF
RBG0ON | RBG0OFF
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 "|".
The settings of the scroll plane that are not specified do not change.
Display NBG0 ~ 2 and do not display NBG3.
slScrDisp ( NBG0ON | NBG1ON | NBG2ON | NBG3OFF );
If only the BG is enabled with this function, and if other BG faces have already been enabled, the setting will continue.
If you want to output only a specific BG surface, you need to explicitly disable the other surface.
(Even if the cycle pattern is not set, if the display of the BG surface is specified, that BG
Will be displayed. )
slScrAutoDisp | slScrCycleSet | VDP2_BGON |
#include "sgl.h"
Uint16 mode;
void slColRAMMode (mode);
Uint16 mode --Color RAM mode name (see below).
void --Nothing is returned.
Determines the color RAM mode.
Be sure to determine the color RAM mode before storing color data in the color RAM.
Substitute the following values corresponding to the color RAM mode for mode.
CRM16_1024 : Color RAM mode 0 (16-bit color 1024 colors x 2 banks)
CRM16_2048 : Color RAM mode 1 (16-bit color 2048 colors)
CRM32_1024 : Color RAM mode 2 (24-bit color 1024 colors)
Set the color RAM mode to 16-bit color 2048 colors.
slColRAMMode ( CRM16_2048 );
slGradationOn | VDP2_RAMCTL |
#include "sgl.h"
Uint16 offset;
void slColRAMOffsetNbg0 (offset);
void slColRAMOffsetNbg1 (offset);
void slColRAMOffsetNbg2 (offset);
void slColRAMOffsetNbg3 (offset);
void slColRAMOffsetRbg0 (offset);
void slColRAMOffsetSpr (offset);
Uint16 offset-Start address of color RAM.
void --Nothing is returned.
Offset the start address of the color RAM used on each screen with a 256-color boundary ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Over you.
Offset is 0 to 7 (but 3 if color RAM mode is 0 or 2)
To).
Use NBG1 with color RAM address 25F00200H as offset 0.
slColRAMOffsetNbg1 (1);
slPageNbg0 | slPageNbg1 | slPageNbg2 | slPageNbg3 |
slPageRbg0 | VDP2_CRAOFA | VDP2_CRAOFB |