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

●Sprite control register

The sprite control register controls sprite data. This is a 16-bit write-only register located at address 1800E0. The value is cleared to 0 after power-on or reset, so be sure to set it.

SPCTL 1800E0H
   15   
   14   
   13   
   12   
   11   
   10   
   09   
   08   
 -
 -
 SPCCCS1
 SPCCCS0
 -
 SPCCN2
 SPCCN1
 SPCCN0

   07   
   06   
   05   
   04   
   03   
   02   
   01   
   00   
 -
 -
 SPCLMD
 SPWINEN
 SPTYPE3
 SPTYPE2
 SPTYPE1
 SPTYPE0

Sprite color calculation condition bit : Sprite color calculation condition bit
(SPCCCSI,SPCCSO), bits 13,12
Specify the sprite color calculation conditions.

SPCCCS1 SPCCCS0 condition
0 0 Only when (priority number) ≦ (color calculation condition number)
0 1 Only when (priority number) = (color calculation condition number)
1 0 Only when (priority number) ≧ (color calculation condition number)
1 1 Only when the most significant bit of color data is 1

If the color format of the sprite is RGB, color calculations will always be performed if you set the condition to perform color calculations only when the most significant bit of the color data is 1.

Sprite color calculation condition number bit : Sprite color calculation condition number bit
(SPCCN2 to SPCCN0), bits 10 to 8
Specify the sprite's color calculation condition number. If the color calculation condition is set to perform color calculation only when the most significant bit of the color data is 1, this value will be ignored.

Sprite color mode bit : Sprite color mode bit (SPCLMD), bit 5
Specifies the sprite color mode.

SPCLMD Sprite color data format
0 All sprite data is in palette format only
1 Sprite data is a mixture of palette format and RGB format

Do not specify 1 if the sprite data is 8 bits per dot.

Sprite window enable bit : Sprite window enable bit (SPWINEN), bit 4
See 8.1 Window Area .

Sprite type bit : SPrite type bit (SPTYPE3 to SPTYPE0), bits 3 to 0
Specify the sprite type.

 SPTYPE3
 SPTYPE2
 SPTYPE1
 SPTYPE0
Sprite data type
0 0 0 0 type 0
0 0 0 1 type 1
0 0 1 0 type 2
0 0 1 1 type 3
0 1 0 0 type 4
0 1 0 1 type 5
0 1 1 0 type 6
0 1 1 1 type 7
1 0 0 0 type 8
1 0 0 1 type 9
1 0 1 0 Type A
1 0 1 1 Type B
1 1 0 0 Type C
1 1 0 1 Type D
1 1 1 0 Type E
1 1 1 1 Type F

If the sprite data is 16 bits per dot, specify types 0 to 7, and if it is 8 bits, specify types 8 to F.

●Priority number register

The priority number register specifies the priority number. This is a 16-bit write-only register located at addresses 1800F0H to 1800F6H. The value is cleared to 0 after power-on or reset, so be sure to set it.

PRISA 1800F0H
   15   
   14   
   13   
   12   
   11   
   10   
   09   
   08   
 -
 -
 -
 -
 -
 S1PRIN2
 S1PRIN1
 S1PRIN0

   07   
   06   
   05   
   04   
   03   
   02   
   01   
   00   
 -
 -
 -
 -
 -
 S0PRIN2
 S0PRIN1
 S0PRIN0 

PRISB 1800F2H
   15   
   14   
   13   
   12   
   11   
   10   
   09   
   08   
 -
 -
 -
 -
 -
 S3PRIN2
 S3PRIN1
 S3PRIN0

   07   
   06   
   05   
   04   
   03   
   02   
   01   
   00   
 -
 -
 -
 -
 -
 S2PRIN2
 S2PRIN1
 S2PRIN0 

PRISC 1800F4H
   15   
   14   
   13   
   12   
   11   
   10   
   09   
   08   
 -
 -
 -
 -
 -
 S5PRIN2
 S5PRIN1
 S5PRIN0

   07   
   06   
   05   
   04   
   03   
   02   
   01   
   00   
 -
 -
 -
 -
 -
 S4PRIN2
 S4PRIN1
 S4PRIN0 

PRISD 1800F6H
   15   
   14   
   13   
   12   
   11   
   10   
   09   
   08   
 -
 -
 -
 -
 -
 S7PRIN2
 S7PRIN1
 S7PRIN0

   07   
   06   
   05   
   04   
   03   
   02   
   01   
   00   
 -
 -
 -
 -
 -
 S6PRIN2
 S6PRIN1
 S6PRIN0

Priority number bit (for sprites) : Sprite priority number bit
(S0PRIN2~S0PRIN0, S1PRIN2~S1PRIN0, S2PRIN2~S2PRIN0, S3PRIN2~S3PRIN0, S4PRIN2~S4PRIN0, S5PRIN2~S5PRIN0, S6PRIN2~S6PRIN0, S7PRIN2~S7PRIN0)
Specify the sprite's priority number.

S0PRIN2~S0PRIN0 1800F0H bits 2-0 Sprite register 0
S1PRIN2~S1PRIN0 1800F0H bits 10-8 Sprite register 1
S2PRIN2~S2PRIN0 1800F2H bits 2-0 Sprite register 2
S3PRIN2~S3PRIN0 1800F2H bits 10-8 Sprite register 3
S4PRIN2~S4PRIN0 1800F4H bits 2-0 Sprite register 4
S5PRIN2~S5PRIN0 1800F4H bits 10-8 Sprite register 5
S6PRIN2~S6PRIN0 1800F6H bits 2-0 Sprite register 6
S7PRIN2~S7PRIN0 1800F6H bits 10-8 Sprite register 7

The higher the priority number, the higher the display priority. Also, sprite characters that use registers whose priority number is set to 0 are considered transparent and are not displayed.

●Color calculation ratio register

The color calculation ratio register specifies the color calculation ratio. This is a 16-bit write-only register located at addresses 180100H to 180106H. The value is cleared to 0 after power-on or reset, so be sure to set it.

CCRSA 180100H
   15   
   14   
   13   
   12   
   11   
   10   
   09   
   08   
 -
 -
 -
 S1CCRT4
 S1CCRT3
 S1CCRT2
 S1CCRT1
 S1CCRT0

   07   
   06   
   05   
   04   
   03   
   02   
   01   
   00   
 -
 -
 -
 S0CCRT4
 S0CCRT3
 S0CCRT2
 S0CCRT1
 S0CCRT0 

CCRSB 180102H
   15   
   14   
   13   
   12   
   11   
   10   
   09   
   08   
 -
 -
 -
 S3CCRT4
 S3CCRT3
 S3CCRT2
 S3CCRT1
 S3CCRT0

   07   
   06   
   05   
   04   
   03   
   02   
   01   
   00   
 -
 -
 -
 S2CCRT4
 S2CCRT3
 S2CCRT2
 S2CCRT1
 S2CCRT0 

CCRSC 180104H
   15   
   14   
   13   
   12   
   11   
   10   
   09   
   08   
 -
 -
 -
 S5CCRT4
 S5CCRT3
 S5CCRT2
 S5CCRT1
 S5CCRT0

   07   
   06   
   05   
   04   
   03   
   02   
   01   
   00   
 -
 -
 -
 S4CCRT4
 S4CCRT3
 S4CCRT2
 S4CCRT1
 S4CCRT0 

CCRSD 180106H
   15   
   14   
   13   
   12   
   11   
   10   
   09   
   08   
 -
 -
 -
 S7CCRT4
 S7CCRT3
 S7CCRT2
 S7CCRT1
 S7CCRT0

   07   
   06   
   05   
   04   
   03   
   02   
   01   
   00   
 -
 -
 -
 S6CCRT4
 S6CCRT3
 S6CCRT2
 S6CCRT1
 S6CCRT0

Color calculation ratio bit (for sprites) : Sprite color calculation ratio bit
(S0CCRT4~S0CCRT0, S1CCRT4~S1CCRT0, S2CCRT4~S2CCRT0, S3CCRT4~S3CCRT0, S4CCRT4~S4CCRT0, S5CCRT4~S5CCRT0, S6CCRT4~S6CCRT0, S7CCRT4~S7CCRT0)
Specifies the sprite color calculation ratio. The color calculation ratio is based on the value obtained by multiplying the RGB color data by 1/32.

S0CCRT4〜S0CCRT0 180100H bits 4-0 Sprite register 0
S1CCRT4~S1CCRT0 180100H bits 12-8 Sprite register 1
S2CCRT4~S2CCRT0 180102H bits 4-0 Sprite register 2
S3CCRT4~S3CCRT0 180102H bits 12-8 Sprite register 3
S4CCRT4~S4CCRT0 180104H bits 4-0 Sprite register 4
S5CCRT4~S5CCRT0 180104H bits 12-8 Sprite register 5
S6CCRT4~S6CCRT0 180106H bits 4-0 Sprite register 6
S7CCRT4~S7CCRT0 180106H bits 12-8 Sprite register 7

xxCCRT4 xxCCRT3 xxCCRT2 xxCCRT1 xxCCRT0 Color calculation ratio
Top image: Second image
0 0 0 0 0
 31:1
0 0 0 0 1
 30:2
0 0 0 1 0
 29:3
0 0 0 1 1
 28:4
0 0 1 0 0
 27:5
0 0 1 0 1
 26:6
0 0 1 1 0
 25:7
0 0 1 1 1
 24:8
0 1 0 0 0
 23:9
0 1 0 0 1
 22:10
0 1 0 1 0
 21:11
0 1 0 1 1
 20:12
0 1 1 0 0
 19:13
0 1 1 0 1
 18:14
0 1 1 1 0
 17:15
0 1 1 1 1
 16:16
1 0 0 0 0
 15:17
1 0 0 0 1
 14:18
1 0 0 1 0
 13:19
1 0 0 1 1
 12:20
1 0 1 0 0
 11:21
1 0 1 0 1
 10:22
1 0 1 1 0
 9:23
1 0 1 1 1
 8:24
1 1 0 0 0
 7:25
1 1 0 0 1
 6:26
1 1 0 1 0
 5:27
1 1 0 1 1
 4:28
1 1 1 0 0
 3:29
1 1 1 0 1
 2:30
1 1 1 1 0
 1:31
1 1 1 1 1
 0:32
[Note] S0 to S7 are placed in xx of the bit name.

This register is valid only when the CCMD bit of the color calculation control register is 0, and is ignored when it is 1.


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