HARDWARE ManualVDP2 User's ManualChapter 12 Color Calculation
BackForward
VDP2 User's Manual / Chapter 12 Color Calculation

● Color operation control register

The color operation control register controls the color operation. A write-only 16-bit register located at address 1800ECH. After turning on the power or resetting, the value will be cleared to 0, so be sure to set it.

CCCTL 1800ECH
 15
 14
 13
 12
 11
 Ten
 09 09
 08 08
 BOKEN
 BOKN2
 BOKN1
 BOKN0
 ---
 EXCCEN
 CCRTMD
 CCMD

 07 07
 06 06
 05 05
 04
 03 03
 02 02
 01 01
 00
 ---
 SPCCEN
 LCCCEN
 R0CCEN
 N3CCEN
 N2CCEN
 N1CCEN
 N0CCEN

Blur operation enable bit : Gradation enable bit (BOKEN), bit 15
Specifies whether to use the blur calculation function.

BOKEN process
0 Do not use the blur calculation function
1 Use the blur calculation function

Setting this bit to 1 disables the extended color calculation function.
The blur calculation function can be used only when the TV screen mode is normal mode and the color RAM mode is mode 0.

Blurred screen number bits : Gradation number bits (BOKN2 to BOKN0), bits 14 to 12
Specify the screen to use the blur calculation function.

BOKN2 BOKN1 BOKN0 Blur calculation function usage screen
0 0 0 Sprite
0 0 1 RBG0
0 1 0 NBG0 or RBG1
0 1 1 Setting prohibited
1 0 0 NBG1 or EXBG
1 0 1 NBG2
1 1 0 NBG3
1 1 1 Setting prohibited

Extended color arithmetic enable bit: Extended color calculation enable bit (EXCCEN ), bit 10
Specifies whether to use the extended color calculation function.

EXCCEN process
0 Do not use extended color calculation function
1 Use extended color calculation function

It cannot be used at the same time as the blur calculation function. When the BOKEN bit is 1, this bit is ignored.
The extended color calculation function can be used only when the TV screen mode is normal mode, not when it is in high resolution or dedicated monitor mode.

Color operation ratio mode bit: Color calculation ratio mode bit (CCRTMD ), bit 9
Specifies the color calculation ratio mode.

CCRTMD mode process
0 0 The color calculation ratio is specified on the top image side.
1 1 The color calculation ratio is specified on the second image side.

Whether or not to perform normal color calculation is always specified on the top image side.

Color operation mode bit: Color calculation mode bit (CCMD) , bit 8
Specifies the color calculation mode.

CCMD mode process
0 0 Add according to the value of the color calculation ratio register
1 1 Add as it is

In mode 1, the value of the color calculation ratio register of each screen is ignored.

Color calculation enable bit : Color calculation enable bit
(N0CCEN, N1CCEN, N2CCEN, N3CCEN, R0CCEN, LCCCEN, SPCCEN)
Specifies whether to perform color operations (color operation enabled).

N0CCEN 1800ECH Bit 0 For NBG0 (or for RBG1)
N1CCEN 1800ECH Bit 1 For NBG1 (or for EXBG)
N2CCEN 1800ECH Bit 2 For NBG2
N3CCEN 1800ECH Bit 3 For NBG3
R0CCEN 1800ECH Bit 4 For RBG0
LCCCEN 1800ECH Bit 5 For LNCL
SPCCEN 1800ECH Bit 6 For sprites

xxCCEN process
0 Do not perform color calculation
1 Perform color calculation
Note The bit name xx can be N0, N1, N2, N3, R0, LC, or SP.

When performing color calculation between the top image and the second image, it is controlled by the color calculation enable bit on the top image side. When the extended color calculation function is used, the color calculation enable bit on the second image side controls between the second image and the third image, and the color calculation enable bit on the third image side controls between the third image and the force image. increase.

 

● 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 180108H to 18010EH. After turning on the power or resetting, the value will be cleared to 0, so be sure to set it.

CCRNA 180108H
 15
 14
 13
 12
 11
 Ten
 09 09
 08 08
 ---
 ---
 ---
 N1CCRT4
 N1CCRT3
 N1CCRT2
 N1CCRT1
 N1CCRT0

 07 07
 06 06
 05 05
 04
 03 03
 02 02
 01 01
 00
 ---
 ---
 ---
 N0CCRT4
 N0CCRT3
 N0CCRT2
 N0CCRT1
 N0CCRT0 

CCRNB 18010AH
 15
 14
 13
 12
 11
 Ten
 09 09
 08 08
 ---
 ---
 ---
 N3CCRT4
 N3CCRT3
 N3CCRT2
 N3CCRT1
 N3CCRT0

 07 07
 06 06
 05 05
 04
 03 03
 02 02
 01 01
 00
 ---
 ---
 ---
 N2CCRT4
 N2CCRT3
 N2CCRT2
 N2CCRT1
 N2CCRT0 

CCRR 18010CH
 15
 14
 13
 12
 11
 Ten
 09 09
 08 08
 ---
 ---
 ---
 ---
 ---
 ---
 ---
 ---

 07 07
 06 06
 05 05
 04
 03 03
 02 02
 01 01
 00
 ---
 ---
 ---
 R0CCRT4
 R0CCRT3
 R0CCRT2
 R0CCRT1
 R0CCRT0 

CCRLB 18010EH
 15
 14
 13
 12
 11
 Ten
 09 09
 08 08
 ---
 ---
 ---
 BKCCRT4
 BKCCRT3
 BKCCRT2
 BKCCRT1
 BKCCRT0

 07 07
 06 06
 05 05
 04
 03 03
 02 02
 01 01
 00
 ---
 ---
 ---
 LCCCRT4
 LCCCRT3
 LCCCRT2
 LCCCRT1
 LCCCRT0

Color calculation ratio bit (for scroll screen) : Color calculation ratio bit
(N0CCRT4 to N0CCRT0, N1CCRT4 to N1CCRT0, N2CCRT4 to N2CCRT0, N3CCRT4 to N3CCRT0, R0CCRT4 to R0CCRT0, LCCCRT4 to LCCCRT0, BKCCRT4 to BKCCRT0)
Specify the color calculation ratio of each scroll screen. The color calculation ratio is for the value obtained by multiplying the color data of each RGB by 1/32.

N0CCRT4 to N0CCRT0 180108H Bits 4-0 For NBG0 (or for RBG1)
N1CCRT4 to N1CCRT0 180108H Bits 12-8 For NBG1 (or for EXBG)
N2CCRT4 to N2CCRT0 18010AH Bits 4-0 For NBG2
N3CCRT4 to N3CCRT0 18010AH Bits 12-8 For NBG3
R0CCRT4 to R0CCRT0 18010CH Bits 4-0 For RBG0
LCCCRT4 to LCCCRT0 18010EH Bits 4-0 For LNCL
BKCCRT4 to BKCCRT0 18010EH Bits 12-8 For BACK

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] The bit name xx contains N0, N1, N2, N3, R0, LC, or BK.

For the sprite color calculation ratio register, refer to " ● Color calculation ratio register " in "9.2 Priority and Color Calculation".


BackForward
HARDWARE ManualVDP2 User's ManualChapter 12 Color Calculation
Copyright SEGA ENTERPRISES, LTD., 1997