HARDWARE ManualVDP2 User's ManualChapter 11 Priority Function
BackForward
VDP2 User's Manual / Chapter 11 Priority Function

■ 11.2 Special priority function

The special priority function is a function that changes the least significant bit of the 3-bit priority number corresponding to each scroll screen for each character or dot. By using this function and changing the priority of only a certain part of the scroll screen, you can make one scroll screen look like multiple screens. Note that only the least significant bit of the priority number changes depending on the special priority function, and the register value is used as it is for the upper 2 bits. The special priority function has the following three modes.

  1. The least significant bit of the priority number is specified for each screen.
  2. The least significant bit of the priority number is specified for each character.
  3. The least significant bit of the priority number is specified for each dot.

When the least significant bit of the priority number is specified for each screen, the value of the priority number register corresponding to each scroll screen is used as it is.

When specified for each character, the value of the special priority bit in the pattern name data is used as the least significant bit of the priority number. For details on the special priority bits, refer to " 4.6 Pattern Name Table (Page) ".

When specifying for each dot, in the character pattern in which the special priority bit specified in the pattern name data is 1, only the dots that match the dot color code specified in the special function code have the least significant bit of the priority number set to 1. And other than that, the least significant bit is fixed to 0. Do not set this mode when the color format of the scroll screen is RGB format. For the dot color code, refer to " 10.3 Special Function Code ".

When the value of the 3-bit priority number obtained by the special priority function is 0H, the screen, character or dot is considered transparent.
Table 11.2 shows the special priority functions depending on the mode.

Table 11.2 Special priority functions by mode
 Special priority mode
 Special priority specification contents
 Color format
 The least significant bit value of the priority number
Mode 0
 Specify for each screen
 Palette format or RGB format
 The least significant bit value of the priority number register
Mode 1
 Specified for each character
 Palette format or RGB format
 Special priority bit value in pattern name data
Mode 2
 Specify for each dot
 Palette format
 When the special priority bit in the pattern name data = 1,
Only the dots that match the dot color code specified in the special function code will be 1, and the others will be 0.
RGB format Setting prohibited

When mode 1 or 2 is specified on a scroll screen whose display format is bitmap format, the special priority bit of the bitmap palette number register is used instead of the special priority bit in the pattern name data.

● Special priority mode register

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

SFPRMD 1800EAH
 15
 14
 13
 12
 11
 Ten
 09 09
 08 08
 ---
 ---
 ---
 ---
 ---
 ---
 R0SPRM1
 R0SPRM0

 07 07
 06 06
 05 05
 04
 03 03
 02 02
 01 01
 00
 N3SPRM1
 N3SPRM0
 N2SPRM1
 N2SPRM0
 N1SPRM1
 N1SPRM0
 N0SPRM1
 N0SPRM0

Special priority mode bit : Special priority mode bit
(N0SPRM1, N0SPRM0, N1SPRM1, N1SPRM0, N2SPRM1, N2SPRM0, N3SPRM1, N3SPRM0, R0SPRM1, R0SPRM0)
Specifies the mode of the special priority function for each scroll screen.

N0SPRM1, N0SPRM0 1800EAH Bits 1,0 For NBG0 (or for RBG1)
N1SPRM1, N1SPRM0 1800EAH Bits 3,2 For NBG1 (or for EXBG)
N2SPRM1, N2SPRM0 1800EAH Bits 5,4 For NBG2
N3SPRM1, N3SPRM0 1800EAH Bits 7,6 For NBG3
R0SPRM1, R0SPRM0 1800EAH Bits 9,8 For RBG0

xxSPRM1 xxSPRM0 mode process
 0
 0
Mode 0 Specify the least significant bit of the priority number for each screen
 0
 1
Mode 1 Specify the least significant bit of the priority number for each character
 1
 0
Mode 2 Specify the least significant bit of the priority number for each dot
 1
 1
Setting prohibited

Note The bit name xx can be N0, N1, N2, N3, or R0.

If the scroll screen color format is RGB mode, do not set mode 2.
In EXBG, do not set anything other than mode 0.
Characters or dots with a priority number of 0 are considered transparent.


BackForward
HARDWARE ManualVDP2 User's ManualChapter 11 Priority Function
Copyright SEGA ENTERPRISES, LTD., 1997