HARDWARE ManualVDP2 User's ManualChapter 10 Dot Color Data
BackForward
VDP2 User's Manual / Chapter 10 Dot Color Data

■ 10.3 Special function code

The special function is a function performed for each scroll screen, and has two functions, a special priority function and a special color calculation function. When these are used dot by dot, the dot color code that enables the special function can be specified in the two special function code registers, and each scroll screen has either of the two special function code registers. You can also specify whether to use.

The special function code register has two 8-bit registers for each of the special function code A and the special function code B, and each bit corresponds to two values of the lower four bits of the dot color code that use the special function. I am. The number of bits of the dot color code changes depending on the number of character colors on each scroll screen, but each bit of the special function code register always corresponds to the value of the lower 4 bits of the dot color code. Also, use the special function code only when the color format of the scroll screen is the palette format.

For details on how to use special functions, see 11.2 Special Priority Function and 12.2 Special Color Calculation Function .

Figure 10.7 shows the dot color code that corresponds to the special function code.

Figure 10.7 Dot color code corresponding to special function code
● When the number of character colors is 16 Bits 3 2 1 0
┌─┬─┬─┬─┐
│ Corresponding bit │ (4 bits)
└─┴─┴─┴─┘

● When the number of character colors is 256 Bits 7 6 5 4 3 2 1 0
┌─┬─┬─┬─┬─┬─┬─┬─┐
│-│-│-│-│ Corresponding bit │ (4 bits)
└─┴─┴─┴─┴─┴─┴─┴─┘

● When the number of character colors is 2048 Bits 15 8 7 3 2 1 0
┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
│-│-│-│-│-│-│-│-│-│-│-│-│ Corresponding bit │ (4 bits)
└─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘

● Special function code select register

The special function code select register specifies the special function code to be enabled for each scroll screen. A write-only 16-bit register located at address 180024H. After turning on the power or resetting, the value will be cleared to 0, so be sure to set it.

SFSEL 180024H
 15
 14
 13
 12
 11
 Ten
 09 09
 08 08
 ---
 ---
 ---
 ---
 ---
 ---
 ---
 ---

 07 07
 06 06
 05 05
 04
 03 03
 02 02
 01 01
 00
 ---
 ---
 ---
 R0SFCS
 N3SFCS
 N2SFCS
 N1SFCS
 N0SFCS

Special function code select bit : Special function code select bit (N0SFCS, N1SFCS, N2SFCS, N3SFCS, R0SFCS)
Specifies the special function code to enable for each scroll screen.

N0SFCS 180024H Bit 0 For NBG0 (or for RBG1)
N1SFCS 180024H Bit 1 For NBG1
N2SFCS 180024H Bit 2 For NBG2
N3SFCS 180024H Bit 3 For NBG3
R0SFCS 180024H Bit 4 For RBG0

xxSFCS process
0 Enable special function code A
1 Enable special function code B
Note The bit name xx can be N0, N1, N2, N3, or R0.

● Special function code register

The special function code register specifies special function code A and special function code B. A write-only 16-bit register located at address 180026H. After turning on the power or resetting, the value will be cleared to 0, so be sure to set it.

SFCODE 180026H
 15
 14
 13
 12
 11
 Ten
 09 09
 08 08
 SFCDB7
 SFCDB6
 SFCDB5
 SFCDB4
 SFCDB3
 SFCDB2
 SFCDB1
 SFCDB0

 07 07
 06 06
 05 05
 04
 03 03
 02 02
 01 01
 00
 SFCDA7
 SFCDA6
 SFCDA5
 SFCDA4
 SFCDA3
 SFCDA2
 SFCDA1
 SFCDA0

Special function code bits: Special function code bit
(SFCDA7 to SFCDA0, SFCDB7 to SFCDB0)
Specify the special function codes A and B.

SFCDA7 ~ SFCDA0 180026H Bits 7-0 For special function code A
SFCDB7 ~ SFCDB0 180026H Bits 15-8 For special function code B

Bit name Dot color code
SFCDx0 When the lower 4 bits of the dot color code are 0H or 1H
SFCDx1 When the lower 4 bits of the dot color code are 2H or 3H
SFCDx2 When the lower 4 bits of the dot color code are 4H or 5H
SFCDx3 When the lower 4 bits of the dot color code are 6H or 7H
SFCDx4 When the lower 4 bits of the dot color code are 8H or 9H
SFCDx5 When the lower 4 bits of the dot color code are AH or BH
SFCDx6 When the lower 4 bits of the dot color code are CH or DH
SFCDx7 When the lower 4 bits of the dot color code are EH or FH
Note The x in the bit name can be A or B.

Set value process
0 Do not use special features
1 Use special features

The special function code is used when mode 2 is specified in the special priority mode register or when mode 2 is specified in the special color operation mode register. For more information, see 11.2 Special Priority Features or 12.2 Special Color Calculator Features .


BackForward
HARDWARE ManualVDP2 User's ManualChapter 10 Dot Color Data
Copyright SEGA ENTERPRISES, LTD., 1997