★ FAQ ★ Program in generalIt seems that there are 8 priority registers (25f800f0 to fc), but I don't know how to do it because there is no priority or type setting in the sprite command table.
To specify the priority register to be referenced for each sprite, use the priority bit in the color control word of the VDP1 command table.
Note that which bit in the color control word corresponds to the priority bit depends on the sprite type used.
For more information, see the Sprite Data section of the VDP2 manual.
| Screen display mode | Aspect ratio (vertical: horizontal) | |
|---|---|---|
| NTSC | PAL | |
| Normal graphic mode A (horizontal resolution 320 dots) | 1: 0.90 | 1: 1.10 |
| Normal graphic mode B (horizontal resolution 352 dots) | 1: 0.86 | 1: 0.96 |
| High resolution graphic mode A (horizontal resolution 640 dots) | 1: 0.45 | 1: 0.55 |
| High resolution graphic mode B (horizontal resolution 704 dots) | 1: 0.43 | 1: 0.48 |
| Monitor graphic mode (horizontal resolution 640 dots) | 1: 0.90 | |
| High-definition graphic mode (horizontal resolution 704 dots) | 1: 1.10 | |
FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF 0001 0001 0001 0001 0001 0001 FFFF FFFF 0001 0001 0001 0001 0001 0001 FFFF FFFF 0001 0001 0001 0001 0001 0001 FFFF FFFF 0001 0001 0001 0001 0001 0001 FFFF FFFF 0001 0001 0001 0001 0001 0001 FFFF FFFF 0001 0001 0001 0001 0001 0001 FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF
In color mode 1 (color look-up table mode), RGB code and palette code can be mixed.
You can put RGB code or color bank code in the look-up table. (It is possible that both are mixed.)
VDP1 writes the pixel value of the sprite to the framebuffer as it is in color bank mode or RGB mode, but writes the contents of this table as pixel value to the framebuffer in color lookup mode.
If the color code of the lookup table is a color bank, the actual color specified by that bank is written in the color RAM of VDP2. The offset is at the beginning of the color RAM by default, and the boundary is in one color. (2 bytes for 1Word / Color, 4 bytes for 2Word / Color.)
If another color bank is specified, a bit for color calculation ratio, a bit for priority, and a bit for shadow can be added according to the sprite type.
To make this setting, the setting method in SBL is to execute the mode set function for each of VDP1 and VDP2. for example,
SPR_2SetTvMode (SPR_TV_NORMAL, SPR_TV_320x224, OFF); SCL_SetDisplayMode (SCL_NON_INTER, SCL_224LINE, SCL_HIRESO_A);
And so on.
In SGL
slSetScrTVMode (TV_320x224);
* After making this setting, it is necessary to reset the cycle pattern.
slSetSprTVMode (TV_640x224);
And so on.
There are no particular restrictions on the setting order.
If the image is compressed using vertical cell scrolling and line scrolling (Developpers Information STN-14,), the part that overflows VRAM is displayed repeatedly from the beginning of VRAM. (There are no hardware restrictions.)
However, changing from 320 to 640 and from 352 to 704 is okay as long as the VRAM cycle pattern is set correctly.
In other words, 352 dot mode is equivalent to 320 dot mode, which is 10 dots larger than the display area. The display image in this case is
As a result, it will be shifted to the left by 5 dots.
(Refer to the display image below for details)
(Display image)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ | ____ | H-Sync
| ======= 63.5556us (NTSC) =============== |
● 320 Mode
| _______ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ___________ |
H-blank display 1280 CLK (47.6295us) H-blank
0.1.2.3.4.5.6.7.8 ................. 319 dot
012345678 ......................... 639 dot
● 352 Mode
| _____ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ________ |
H-blank display 1408 CLK (49.1682us) H-blank
0.1.2.3.4.5.6 ..................... 351 dot
012345678 ............................... 703 dot
When changing from low resolution to high resolution, the most important thing to pay attention to is
The effective range of the cycle pattern register changes as follows.
This is not directly related to RBG0, but it has a significant effect on normal scrolling.
In other words, if T4 to T7 are set to read the normal scroll data, the normal scroll will not be displayed correctly when switching to high resolution.
When the hardware is specified by Gouraud, it writes only the lower 8 bits to the frame buffer while interpolating for each RGB with 16 bits.
So there are only 256 colors in the framebuffer, but you can also googlow there using techniques.
The lower 8 Bit of 16Bit RBG = R 5Bit + G 3 Bit. The data interpolated by the hardware appears in this bit, so if you write the data for Gouraud in the VDP2 color palette (256 entries), the Gouraud within 256 colors will be displayed on the screen.
* However, this method is not recommended because it is difficult to manage the color RAM.
Even if RBG0 is in cell format, the coefficient table can be used dot by dot on the color RAM side.
★ FAQ ★ Program in general