Japanese
FAQSGL programming related
BackForward
FAQ/SGL programming related

scroll



I want to create a rotation coefficient table.

Q)
I would like to create a coefficient table for rotation BG...
Please tell me what happens when you use slMakeKtable.

A)
SGL's coefficient table has a reciprocal scroll table to match the sprite. It is linked with the rotation matrix, and SGL is passing the address position of the coefficient table.
Therefore, if the coefficient table is created by the user, SGL's 3D rotation processing cannot be guaranteed.
For the coefficient table normally used, it is best to refer to the method used in SBL.


I want to use RGB0 in a bitmap.

Q)
Please tell me how to use the function that uses RBG0 in a bitmap.

A)
This is possible by using the slBitMapRbg0 function.

【declaration】
void slMitMapRbg0( Uint16 type, Uint16 size, void *addr )
type: Type of number of colors (16 colors, 256 colors, 2048 colors, 32768 colors)
size: bitmap screen size
512x256, 512x512, 1024x256, 1024x512
addr: VRAM address. 0x20000 boundary

I want to store RBG coefficients in color RAM.

Q)
Please tell me the settings to place RBG coefficients in Color RAM.

A)
This is possible by specifying the color RAM address (0x25F00000) with the slKtbleRA function and slKtableRB function.


To what extent can VDP2's image effect function be used with SGL?

Q)
Screen special effects in SGL include mosaic, line scrolling, and color calculations, but are there any other functions for screen special effects (currently not disclosed)?

Please let me know if it exists.

A)
Regarding scrolling, we provide functions for everything that can be done with hardware. There are no special functions that are not present in the hardware.
For the functions of special scrolling functions, please see scroll.txt in the SGL doc directory.


I want to use the line color of the rotating surface.

Q)
I would like to combine the 3D scroll surface and line color to make it darker towards the back.

A)
Please refer to the sample program in the archive.


slMap16RA does not work.

Q)
sl16MapRA() does not work properly.

A)
It seems that the page number table passed to the sl16MapRA function does not match the actual VRAM, so it is not working correctly.

The sl16MapRA and sl16MapRB functions assume that the page numbers in the table are serial numbers counted from the beginning of VRAM, and multiply the 0th element of the table by 0x800 and register it as an address.

for example,

#define RBG0_CEL_ADR (VDP2_VRAM_A0)
#define RBG0_MAP_ADR (VDP2_VRAM_B0)
#define RBG0_COL_ADR (VDP2_COLRAM)
#define RBG0_KTB_ADR (VDP2_VRAM_A1)
#define RBG0_PRA_ADR (VDP2_VRAM_A1+ 0x1fe00)

For example, if the pattern name is in bank B0 of VRAM, the table must be populated with values such as 128,132,136...
(There seem to be many cases where data such as 0,4,8... is set)

#define MAPOFFSET (RBG0_MAP_ADR-VDP_VRAM_A0)/0x800
#define DD 4+MAPOFFSET
Uint8 map[16] = {
    0*DD, 1*DD, 2*DD, 3*DD,
    4*DD, 5*DD, 6*DD, 7*DD,
    8*DD, 9*DD,10*DD,11*DD,
   12*DD,13*DD,14*DD,15*DD,
};
#undef DD
sl16MapRA(map);


It seems that ASCII data is available for rotating surfaces.

Q)
In SGL sample 8-11, ASCII characters appear to be displayed on the rotating surface, but as far as I look at the program, I can't find any such description.
Where exactly are ASCII characters set in VRAM?

A)
This is not described in the manual, but when slInitSystem is executed, ASCII data is transferred to 0x25e00000 in addition to 0x25e60000, which is mentioned in the manual.
The SGL sample uses this CG data.


When displaying 512 x 512 with 256 colors using rotary scrolling, only 256 vertical minutes can be displayed.

Q)
When displaying 512 x 512 with 256 colors using rotary scrolling, only 256 vertical minutes can be displayed.

A)
For 256 colors, you will be using all of VRAM-A or VRAM-B.
The most likely cause is that VRAM-A is still in split mode, and only VRAM-A0 is accessing the RBG0 character pattern, and VRAM-A1 is not being accessed.

In this case, the easiest way is to display it by using the slVRAMMode function (see documentation) and setting Div_B (divides only VRAM-B) or NULL as the argument.


BackForward
FAQSGL programming related
Copyright SEGA ENTERPRISES, LTD. 1997