HARDWARE ManualVDP2 User's Manual
BackForward
VDP2 User's Manual

Chapter 9 Sprite Data


■ 9.1 Sprite data

The sprite framebuffer data received from VDP1 can be 8 bits per dot or 16 bits per dot. When there are 16 bits per dot, there are those written in palette format and those written in RGB format, and set them on the VDP2 side in the same way as when setting them on the VDP1 side.

● Sprite type

When VDP2 receives palette-format sprite data written to the frame buffer by VDP1, there are a total of 16 types of bit configurations, 8 types for 16 bits per dot and 8 types for 8 bits, and these are sprite types. Is called. The data per dot consists of dot color data consisting of a dot color code and palette number, priority bits, color calculation ratio bits, and shadow bits, and the number of each bit varies depending on the sprite type. For each bit, the value of the missing high-order bit is considered to be 0.

If the sprite data is in RGB format, it is composed of 5 bits each for RGB and color format discrimination bits, and the priority bit, color calculation ratio bit, and shadow bit are considered to be 0.
Specify types 0 to 7 when the sprite data is 16 bits per dot, and specify types 8 to F when the sprite data is 8 bits per dot. When types C to F are specified, some bits share the priority bit, the color calculation ratio bit, and the dot color data bit. The shared bits are shown in Table 9.1.

Table 9.1 Shared bits
Sprite type Shared bit
SP1 SP0 SC1 SC0
Type C PR0 and DC7
Type D PR0 and DC7 CC0 and DC6
Type E PR1 and DC7 PR0 and DC6
Type F CC1 and DC7 CC0 and DC6
SP: Priority bit, color RAM address shared bit
SC: Bit for color calculation ratio, bit for sharing color RAM address
PR: Priority bit
DC: Dot color data
CC: Bit for color calculation ratio

The sprite type is shown in Figure 9.1.

Figure 9.1 Sprite type

◆ Type 0
 15
 14
 13
 12
 11
 Ten
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
PR1 ~ 0 CC2 ~ 0 DC10-0

◆ Type 1
 15
 14
 13
 12
 11
 Ten
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
PR2 ~ 0 CC1 ~ 0 DC10-0

◆ Type 2
 15
 14
 13
 12
 11
 Ten
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
SD PR0 CC2 ~ 0 DC10-0

◆ Type 3
 15
 14
 13
 12
 11
 Ten
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
SD PR1 ~ 0 CC1 ~ 0 DC10-0

◆ Type 4
 15
 14
 13
 12
 11
 Ten
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
SD PR1 ~ 0 CC2 ~ 0 DC9-0

◆ Type 5
 15
 14
 13
 12
 11
 Ten
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
SD PR2 ~ 0 CC0 DC10-0

◆ Type 6
 15
 14
 13
 12
 11
 Ten
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
SD PR2 ~ 0 CC1 ~ 0 DC9-0

◆ Type 7
 15
 14
 13
 12
 11
 Ten
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
SD PR2 ~ 0 CC2 ~ 0 DC8-0

◆ Type 8
 15
 14
 13
 12
 11
 Ten
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
PR0 DC6-0

◆ Type 9
 15
 14
 13
 12
 11
 Ten
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
PR0 CC0 DC5-0

◆ Type A
 15
 14
 13
 12
 11
 Ten
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
PR0 ~ 1 DC5-0

◆ Type B
 15
 14
 13
 12
 11
 Ten
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
CC0 ~ 1 DC5-0

◆ Type C
 15
 14
 13
 12
 11
 Ten
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
SP0 DC6-0

◆ Type D
 15
 14
 13
 12
 11
 Ten
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
SP0 SC0 DC5-0

◆ Type E
 15
 14
 13
 12
 11
 Ten
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
SP0 ~ 1 DC5-0

◆ Type F
 15
 14
 13
 12
 11
 Ten
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
SC0 ~ 1 DC5-0

The part is ignored.
SD: Shadow bit (or sprite window bit)
PR: Priority bit
CC: Bit for color calculation ratio
DC: Dot color data

● Sprite color mode

Similar to scroll screens, sprite character data includes palette format and RGB format. If the number of bits per dot is 16 bits and the data in the frame buffer is only in palette format, all 16 bits can be used with the bit configuration specified by the sprite type. However, when palette format and RGB format data are mixed, the most significant bit is used to determine the color format, so set it to 0 for palette format data and 1 for RGB format data. Palette format data is then treated with the most significant bit (priority bit or shadow bit) of the specified sprite type set to 0.

Figure 9.2 shows the sprite data when the palette format and RGB format data are mixed.

Figure 9.2 Sprite data when palette format and RGB format data are mixed

◆ Palette format
 15
 14
 13
 12
 11
 Ten
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
0 Dot color data and other 15 bits

◆ RGB format
 15
 14
 13
 12
 11
 Ten
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
1 BLUE data GREEN data RED data

● Normal shadow sprite

When using a palette-type sprite, the sprite may not be displayed depending on the pixel data of the sprite character and the value of the color bank (dot color data in the VDP2 hardware manual).
This is because the dot data is judged as VDP2 shadow function dot data (normal shadow data). Table 9.2 shows the sprite data that is judged as normal shadow data depending on the sprite type setting of VDP2.
See 14.1 Shadow Processing and 6.4 CMDCOLR (Color Control Word) in the VDP1 Hardware Manual.

Table 9.2 Sprite data that becomes normal shadow data
Sprite type Number of colors Palette code Color bank
Types 0-3, 5
 16
64
128
256
 1110
xx11 1110
x111 1110
1111 1110
 xxxx x111 1111 0000
xxxx x111 11xx 0000
xxxx x111 1xxx 0000
xxxx x111 xxxx 0000
Types 4, 6
 16
64
128
256
 1110
xx11 1110
x111 1110
1111 1110
 xxxx xx11 1111 0000
xxxx xx11 11xx 0000
xxxx xx11 1xxx 0000
xxxx xx11 xxxx 0000
Type 7
 16
64
128
256
 1110
xx11 1110
x111 1110
1111 1110
 xxxx xxx1 1111 0000
xxxx xxx1 11xx 0000
xxxx xxx1 1xxx 0000
xxxx xxx1 xxxx 0000
Types C to F
 16
64
128
256
 1110
xx11 1110
x111 1110
1111 1110
 xxxx xxxx 1111 0000
xxxx xxxx 11xx 0000
xxxx xxxx 1xxx 0000
Not relevant
Type 8
 16
64
128
256
 1110
xx11 1110
x111 1110
1111 1110
 xxxx xxxx x111 0000
xxxx xxxx x1xx 0000
Not relevant
Type 9-B
 16
64
128
256
 1110
xx11 1110
x111 1110
1111 1110
 xxxx xxxx xx11 0000
Not related Not related Not related

BackForward
HARDWARE ManualVDP2 User's Manual
Copyright SEGA ENTERPRISES, LTD., 1997