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 rotating BG ...
Please tell me what happens when you use slMakeKtable.

A)
The SGL coefficient table has a scrolling reciprocal table to match with sprites. It works with the rotation matrix, and SGL passes the address position of the coefficient table.
Therefore, if the coefficient table is created by the user, the processing of 3D rotation of SGL cannot be guaranteed.
For the coefficient table that is normally used, it is recommended to refer to the method used in SBL.


I want to use RGB0 in a bitmap.

Q)
How do I use a 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: Number of colors type (16 colors, 256 colors, 2048 colors, 32768 colors)
size: size: Bitmap screen size
512x256, 512x512, 1024x256, 1024x512
addr: VRAM address. 0x20000 boundary

I want to put the RBG coefficient in color RAM.

Q)
Please tell me the setting to put the RBG coefficient in Color RAM.

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


How far can the image effect function of VDP2 be used with SGL?

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

Please let me know if it exists.

A)
As for scrolling, we have functions for everything that can be done in hardware. There are no special function functions that are not in the hardware.
For the special scroll function, 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 in 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 often does not work properly because it does not match the actual VRAM.

In the sl16MapRA function and sl16MapRB function, assuming that the page number in the table is a serial number counted from the beginning of VRAM, the 0th element of the table is multiplied by 0x800 and registered 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)

If there is a pattern name in the B0 bank of VRAM, the table must be set to a value such as 128,132,136 ...
(It seems that there are 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 prepared for the surface of revolution.

Q)
In SGL sample 8-11, it seems that ASCII characters are displayed on the surface of revolution, but as far as the program is seen, such a description is not found.
Where on earth are ASCII characters set in VRAM?

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


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

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

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

In this case, the easiest way is to set Div_B (split only VRAM-B) or NULL in the argument with the slVRAMMode function (see the document) to display it.


BackForward
FAQSGL programming related
Copyright SEGA ENTERPRISES, LTD ,. 1997