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

■ 9.2 Priority and color calculation

Sprite and scroll screen priorities are determined by the magnitude of a 3-bit value called the priority number. The sprite can specify up to eight priority numbers, and one of them can be selected for each character by the priority bit in the sprite data.

When using the color calculation function between the sprite and the scroll screen, the value of the priority number selected by the sprite character can determine whether or not to perform color calculation. In addition, up to 8 color calculation ratios can be specified, and one of them can be selected for each character by 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 less than 2 priority bits, the missing bits are considered to be 0, and if there are no priority bits, all 3 bits are considered to be 0. If the sprite data is in RGB format, the sprite register 0 is selected.

Table 9.2 shows the selection of the priority number register by the value of the priority bit.

Table 9.2 Sprite priority number register selection
Priority bit Selected priority number register
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-8)
1 0 0 Sprite register 4 (1800F4H bits 2 to 0)
1 0 1 Sprite register 5 (1800F4H bits 10-8)
1 1 0 Sprite register 6 (1800F6H bits 2 to 0)
1 1 1 Sprite register 7 (1800F6H bits 10-8)

● Color operation enable condition

The sprite can be specified not only by the value of the priority number selected for each character or the value of the most significant bit of the color data selected for each dot, as well as whether or not to perform color calculation for the entire sprite. The conditions can be selected from the following four.

  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 for comparing the size with the value of the priority number selected for each sprite character, and is specified in the sprite control register. These conditions are valid only when the SPCCEN bit of the color operation control register is 1, and no color operation is performed when it is 0.

 

● Color calculation ratio selection

The color calculation ratio of the sprite selects one of the eight color calculation ratios for each sprite character according to the color calculation ratio bit of the specified sprite type data. If the specified sprite type color calculation ratio bit is 2 bits or less, the missing bit is regarded as 0, and if there is no color calculation ratio bit, all 3 bits are regarded as 0. If the sprite data is in RGB format, the sprite register 0 is selected.

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

Table 9.3 Selection of sprite color arithmetic ratio register
Bits for color calculation ratio Selected color arithmetic 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-8)
0 1 0 Sprite register 2 (180102H bits 4 to 0)
0 1 1 Sprite register 3 (180102H bits 12-8)
1 0 0 Sprite register 4 (180104H bits 4 to 0)
1 0 1 Sprite register 5 (180104H bits 12-8)
1 1 0 Sprite register 6 (180106H bits 4 to 0)
1 1 1 Sprite register 7 (180106H bits 12-8)


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