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

■10.3 Special function code

Special functions are functions that are performed for each scroll screen, and there are two types: special priority function and special color calculation function. When using these dot by dot, the dot color code that enables the special function can be specified in two special function code registers, and each scroll screen can be specified in 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 each, special function code A and special function code B, and each bit corresponds to two values of the lower 4 bits of the dot color code that uses the special function. I am. The number of bits in the dot color code changes depending on the number of character colors on each scroll screen, but each bit in 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 palette format.

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

Figure 10.7 shows the dot color codes that correspond to the special function codes.

Figure 10.7 Dot color codes corresponding to special function codes
●If the number of character colors is 16
 Bit 3  2  1  0
    ┌──┬──┬──┬──┐
    │Compatible │ (4 bits)
    │bits       │
    └──┴──┴──┴──┘

●If the number of character colors is 256
 Bit 7  6  5  4  3  2  1  0
    ┌──┬──┬──┬──┬──┬──┬──┬──┐
    │− │− │− │− │Compatible │ (4 bits)
    │  │  │  │  │bits       │
    └──┴──┴──┴──┴──┴──┴──┴──┘

●If the number of character colors is 2048
 Bit 15                   8  7           3  2  1  0
    ┌──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┐
    │− │− │− │− │− │− │− │− │− │− │− │− │Compatible │ (4 bits)
    │  │  │  │  │  │  │  │  │  │  │  │  │bits       │
    └──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┘

●Special function code select register

The special function code select register specifies the special function code to be enabled for each scroll screen. This is a 16-bit write-only register located at address 180024H. The value is cleared to 0 after power-on or reset, so be sure to set it.

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

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

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] xx in the bit name is 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. This is a 16-bit write-only register located at address 180026H. The value is cleared to 0 after power-on or reset, so be sure to set it.

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

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

Special function code bit
(SFCDA7~SFCDA0, SFCDB7~SFCDB0)
Specify 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] A or B is entered for x in the bit name.

Setting value process
0 Don't 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 calculation mode register. For details, see " 11.2 Special priority function " or " 12.2 Special color calculation function ."


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