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 the sprite data. A write-only 16-bit register located at address 1800E0. After turning on the power or resetting, the value will be cleared to 0, so be sure to set it.

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

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

Sprite color operation condition bit: Sprite color calculation condition bit
(SPCCCSI, SPCCSO), bits 13,12
Specifies the color calculation conditions for sprites.

SPCCCS1 SPCCCS0 Matters
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.

When the color format of the sprite is RGB format, the color calculation is always performed if the condition is that the color calculation is performed only when the most significant bit of the color data is 1.

Sprite color operation conditions Number bit: Sprite color calculation condition number bit
(SPCCN2 to SPCCN0), bits 10 to 8
Specifies the color calculation condition number of the sprite. If the color calculation condition is that the color calculation is performed only when the most significant bit of the color data is 1, this value is 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 bits : SPrite type bits (SPTYPE3 to SPTYPE0), bits 3 to 0
Specifies 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 write-only 16-bit register located at addresses 1800F0H to 1800F6H. After turning on the power or resetting, the value will be cleared to 0, so be sure to set it.

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

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

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

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

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

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

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

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

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

S0PRIN2 to S0PRIN0 1800F0H Bits 2-0 Sprite register 0
S1PRIN2 to S1PRIN0 1800F0H Bits 10-8 Sprite register 1
S2PRIN2 to S2PRIN0 1800F2H Bits 2-0 Sprite register 2
S3PRIN2 to S3PRIN0 1800F2H Bits 10-8 Sprite register 3
S4PRIN2 to S4PRIN0 1800F4H Bits 2-0 Sprite register 4
S5PRIN2 to S5PRIN0 1800F4H Bits 10-8 Sprite register 5
S6PRIN2 to 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 using registers with the priority number value set to 0 are considered transparent and will not be displayed.

● Color calculation ratio register

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

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

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

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

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

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

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

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

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

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

S0CCRT4 to S0CCRT0 180100H Bits 4-0 Sprite register 0
S1CCRT4 to S1CCRT0 180100H Bits 12-8 Sprite register 1
S2CCRT4 to S2CCRT0 180102H Bits 4-0 Sprite register 2
S3CCRT4 to S3CCRT0 180102H Bits 12-8 Sprite register 3
S4CCRT4 to S4CCRT0 180104H Bits 4-0 Sprite register 4
S5CCRT4 to S5CCRT0 180104H Bits 12-8 Sprite register 5
S6CCRT4 to S6CCRT0 180106H Bits 4-0 Sprite register 6
S7CCRT4 to 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 entered in xx of the bit name.

This register is valid only when the CCMD bit of the color operation 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