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

■ 12.2 Special color calculation function

The special color calculation function is a function that specifies the color calculation enable not only for the entire screen but also for each character or dot, and has the following four modes.

  1. Color calculation enable is specified for each screen
  2. Color calculation enable is specified for each character
  3. Color calculation enable is specified for each dot
  4. The color operation enable is specified by the most significant bit of the color data.

When the color calculation enable is specified for each screen, the color calculation is performed when the value of the color calculation enable bit in the color calculation control register corresponding to each scroll screen is 1.
When specifying for each character, on the scroll screen in which the color calculation enable bit is set to 1, color calculation is performed only for the character pattern in which the value of the special color calculation bit in the pattern name data is 1. For the special color operation bits in the pattern name data, refer to "4.6 Pattern Name Table (Page)".

When specifying for each dot, the dot specified in the special function code in the character pattern in which the value of the special color calculation bit in the pattern name data of the scroll screen with the color calculation enable bit specified as 1 is specified as 1. Color calculation is performed only on the dots that match the color code. Do not set this mode when the color format of the scroll screen is RGB format. For the special function code, refer to " 10.3 Special Function Code ".

When specifying with the most significant bit of color data, when the scroll screen with the color calculation enable bit set to 1 is in palette format, color calculation is performed only for dots using color data with the most significant bit set to 1. I will do it. If this mode is specified when the scroll screen with the color calculation enable bit set to 1 is in RGB format, color calculation is always performed.

When mode 1 or 2 is specified on a scroll screen whose display format is bitmap format, the special color operation bit of the bitmap palette number register is used instead of the special color operation bit in the pattern name data.
The special color calculation modes are shown in Table 12.3.

Table 12.3 Special color calculation mode
 Special color calculation mode
 Special color calculation specifications
 Color format
 Color operation enable condition
Mode 0 Specify for each screen Palette format or RGB format Color operation enable bit = 1
Mode 1 Specified for each character Palette format or RGB format Color operation enable bit = 1
And the special color operation bit in the pattern name data = 1
Mode 2 Specify for each dot Palette format Color operation enable bit = 1
And the special color operation bit in the pattern name data = 1
And the dots that match the dot color code specified in the special function code
RGB format Setting prohibited
Mode 3 Specified by the most significant bit of color data Palette format Color operation enable bit = 1
And dots using color data with the most significant bit = 1
RGB format Color operation enable bit = 1

The special color calculation mode can be specified only for the top image. Special color calculation modes other than the top image are fixed to mode 0.

 

● Special color calculation mode register

The special color calculation mode register specifies the mode of the special color calculation function for each scroll screen. A write-only 16-bit register located at address 1800EEH. After turning on the power or resetting, the value will be cleared to 0, so be sure to set it.

SFCCMD 1800EEH
 15
 14
 13
 12
 11
 Ten
 09 09
 08 08
 ---
 ---
 ---
 ---
 ---
 ---
 R0SCCM1
 R0SCCM0

 07 07
 06 06
 05 05
 04
 03 03
 02 02
 01 01
 00
 N3SCCM1
 N3SCCM0
 N2SCCM1
 N2SCCM0
 N1SCCM1
 N1SCCM0
 N0SCCM1
 N0SCCM0

Special color calculation mode bit : Special color calculation mode bit
(N0SCCM1, N0SCCM0, N1SCCM1, N1SCCM0, N2SCCM1, N2SCCM0, N3SCCM1, N3SCCM0, R0SCCM1, R0SCCM0)
Specifies the mode of the special color calculation function of each scroll screen.

N0SCCM1, N0SCCM0 1800EEH Bits 1,0 For NBG0 (or for RBG1)
N1SCCM1, N1SCCM0 1800EEH Bits 3,2 For NBG1 (or for EXBG)
N2SCCM1, N2SCCM0 1800EEH Bits 5,4 For NBG2
N3SCCM1, N3SCCM0 1800EEH Bits 7,6 For NBG3
R0SCCM1, R0SCCM0 1800EEH Bits 9,8 For RBG0

xxSCCM1 xxSCCM0 mode process
 0
 0
 0
Color calculation enable is specified for each screen
 0
 1
 1
Color calculation enable is specified for each character
 1
 0
 2
Color calculation enable is specified for each dot
 1
 1
 3
The color operation enable is specified by the most significant bit of the color data.
Note The bit name xx can be N0, N1, N2, N3, or R0.

The special color calculation mode specification is valid only when each screen is the top image. When it is not the top image, it is fixed to mode 0.
If the color format of the scroll screen is RGB format, do not set it to mode 2. In addition, when mode 3 is specified, color calculation is performed for all dots.
Do not specify mode 1 and mode 2 in EXBG.


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