There seem to be 8 priority registers (25f800f0 to fc), but there is no priority or type setting in the sprite command table, so I don't know how to set them.
To specify the priority register referenced for each sprite, use the priority bits in the color control word of the VDP1 command table.
Please note that which bit in the color control word corresponds to the priority bit varies depending on the sprite type used.
For more information, please refer to the sprite data section of the VDP2 manual.
Screen display mode | Aspect ratio (vertical: horizontal) | |
---|---|---|
NTSC | PAL | |
Normal graphics mode A (horizontal resolution 320 dots) | 1:0.90 | 1:1.10 |
Normal graphics 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 graphics 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
Note that in color mode 1 (color lookup table mode), RGB codes and palette codes can be mixed.
Lookup tables can contain RGB codes or color bank codes. (A mixture of both is also possible.)
VDP1 writes sprite pixel values as they are to the frame buffer in color bank mode or RGB mode, but in color lookup mode it writes the contents of this table as pixel values to the frame buffer.
If the color code in the lookup table is a color bank, the actual color specified by that bank is written to the VDP2's color RAM. The offset defaults to the beginning of the color RAM, and the boundary is in units of one color. (1Word/Color is 2 bytes, 2Word/Color is 4 bytes.)
If other color banks are specified, color calculation ratio bits, priority bits, and shadow bits can be added according to the sprite type.
To make this setting, use SBL 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 );
Make settings like this.
At SGL,
slSetScrTVMode( TV_320x224 );
*After making this setting, you will need to reset the cycle pattern.
slSetSprTVMode( TV_640x224 );
Make settings like this.
There are no particular restrictions on the order of settings.
If the image is compressed using vertical cell scrolling and line scrolling (Developers Information STN-14), the portion that overflows VRAM will be displayed repeatedly from the beginning of VRAM. (There are no hardware restrictions.)
However, changing from 320 to 640 or 352 to 704 is not a problem as long as the VRAM cycle pattern settings are correct.
In other words, in 352 dot mode, the display area is 10 dots larger when converted to 320 dot mode. The display image in this case is
This means that it will appear to be shifted 5 dots to the left.
(See 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 things to be careful of are:
The valid range of the cycle pattern register changes as follows:
Although this is not directly related to RBG0, it greatly affects normal scrolling.
In other words, if T4 to T7 are set to read normal scroll data, normal scroll will not be displayed correctly when switching to high resolution.
When the hardware receives Gouraud's instructions, it performs 16-bit interpolation for each RGB and writes only the lower 8 bits to the frame buffer.
Therefore, there are only 256 colors in the frame buffer, but it is possible to use Gouraud with some techniques.
Lower 8Bits of 16BitRBG = R 5Bit + G 3Bit. The data interpolated by the hardware is displayed in this bit, so if you write the data for Gouraud in the VDP2 color palette (256 entries), Gouraud with up to 256 colors will be displayed on the screen.
* However, this method is not recommended as it is difficult to manage the color RAM.
Also, even if RBG0 is in cell format, the coefficient table can be used for each dot on the color RAM side.