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

Chapter 9 Sprite data


■9.1 Sprite data

The sprite frame buffer data received from VDP1 is either 8 bits per dot or 16 bits per dot. When 16 bits per dot is used, there are two types: one written in palette format and the other written in RGB format. Set these settings on VDP2 side in the same way as you did on VDP1 side.

●Sprite type

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

In addition, if the sprite data is in RGB format, it consists of 5 bits each of RGB data and a bit for color format determination, and the priority bit, color calculation ratio bit, and shadow bit are assumed to be 0.
If the sprite data is 16 bits per dot, specify types 0 to 7, and if the sprite data is 8 bits per dot, specify types 8 to F. Also, when types C to F are specified, some bits are shared by the priority bits, color calculation ratio bits, and dot color data bits. Table 9.1 shows the shared bits.

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: Color calculation ratio bit, color RAM address common bit
PR: Priority bit
DC: Dot color data
CC: Color calculation ratio bit

Figure 9.1 shows the sprite types.

Figure 9.1 Sprite type

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

●Sprite color mode

Like the scroll screen, sprite character data comes in 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. At that time, the palette format data is processed as if the value of the most significant bit (priority bit or shadow bit) of the specified sprite type is 0.

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

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

◆Pallet format
 15
 14
 13
 12
 11
 10
 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
 10
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
1 BLUE data GREEN data RED data

●Normal shadow sprite

When using a palette format sprite, the sprite may not be displayed depending on the sprite character's pixel data and color bank value (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 determined as normal shadow data depending on the VDP2 sprite type settings.
Please refer to " 14.1 Shadow Processing " and " 6.4 CMDCOLR (Color Control Word) " in the VDP1 Hardware Manual.

Table 9.2 Sprite data as normal shadow data
sprite type number of colors pallet code color bank
Type 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
Type 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
Type C~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
Not relevant
Type 9~B
 16
64
128
256
 1110
xx11 1110
x111 1110
1111 1110
 xxxx xxxx xx11 0000
Not relevant
Not relevant
Not relevant

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