Japanese
HARDWARE ManualVDP2 User's ManualChapter 9 Sprite Data
BackForward
VDP2 User's Manual/Chapter 9 Sprite Data

■9.2 Priority and color calculation

The priority of sprites and scroll screens is determined by the size of a 3-bit value called the priority number. Up to 8 priority numbers can be specified for a sprite, and one of them can be selected for each character depending on the priority bit in the sprite data.

When using the color calculation function between sprites and scroll screens, you can decide whether to perform color calculations depending on the priority number value selected by the sprite character. Additionally, up to eight color calculation ratios can be specified, and one of them can be selected for each character using the color calculation ratio bit in the sprite data.

●Priority number selection

The sprite priority number selects one of the eight priority numbers for each sprite character, depending on the priority bit of the specified sprite type. If the specified sprite type has 2 or fewer priority bits, the missing bits will be treated as 0, and if there are no priority bits, all 3 bits will be treated as 0. Also, if the sprite data is in RGB format, sprite register 0 will be selected.

Table 9.2 shows the priority number register selection based on the priority bit value.

Table 9.2 Sprite Priority Number Register Selection
Priority bit Priority number register selected
PR2 PR1 PR0
0 0 0 Sprite register 0 (1800F0H bits 2 to 0)
0 0 1 Sprite register 1 (1800F0H bits 10 to 8)
0 1 0 Sprite register 2 (1800F2H bits 2 to 0)
0 1 1 Sprite register 3 (1800F2H bits 10 to 8)
1 0 0 Sprite register 4 (1800F4H bits 2 to 0)
1 0 1 Sprite register 5 (1800F4H bits 10 to 8)
1 1 0 Sprite register 6 (1800F6H bits 2 to 0)
1 1 1 Sprite register 7 (1800F6H bits 10 to 8)

●Color calculation enable condition

For sprites, you can specify whether or not to perform color calculations not only for the entire sprite, but also by the value of the priority number selected for each character or the value of the most significant bit of color data selected for each dot. You can select from the following four conditions.

  1. Only when (priority number)≦(color calculation condition number)
  2. Only when (priority number) = (color calculation condition number)
  3. Only when (priority number) ≧ (color calculation condition number)
  4. Only when the most significant bit of color data is 1

The color calculation condition number is a 3-bit value that is used to compare the size with the priority number value selected for each sprite character, and is specified in the sprite control register. These conditions are valid only when the SPCCEN bit in the color calculation control register is 1; when it is 0, no color calculation is performed.

 

●Color calculation ratio selection

The sprite color calculation ratio selects one of the 8 color calculation ratios for each sprite character, depending on the color calculation ratio bit of the specified sprite type data. If the specified sprite type has 2 bits or less for color calculation ratio, the missing bits are considered to be 0, and if there are no color calculation ratio bits, all 3 bits are considered to be 0. Also, if the sprite data is in RGB format, sprite register 0 will be selected.

Table 9.3 shows the color calculation ratio register selection based on the value of the color calculation ratio bit.

Table 9.3 Sprite color calculation ratio register selection
Color calculation ratio bit Selected color calculation ratio register
CC2 CC1 CC0
0 0 0 Sprite register 0 (180100H bits 4 to 0)
0 0 1 Sprite register 1 (180100H bits 12 to 8)
0 1 0 Sprite register 2 (180102H bits 4 to 0)
0 1 1 Sprite register 3 (180102H bits 12 to 8)
1 0 0 Sprite register 4 (180104H bits 4 to 0)
1 0 1 Sprite register 5 (180104H bits 12 to 8)
1 1 0 Sprite register 6 (180106H bits 4 to 0)
1 1 1 Sprite register 7 (180106H bits 12 to 8)


BackForward
HARDWARE ManualVDP2 User's ManualChapter 9 Sprite Data
Copyright SEGA ENTERPRISES, LTD., 1997