★ FAQ ★ SGL programming related| 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 |
Please let me know if it exists.
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);
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.
★ FAQ ★ SGL programming related