HARDWARE ManualVDP2 User's Manual
BackForward
VDP2 User's Manual

Chapter 11 Priority Function


VDP2 compares the value of the priority number of the sprite and each scroll screen to determine the display priority from the top to the third. At that time, the priority number of the sprite can be selected for each character from a maximum of 8 values, and the priority number of each scroll screen can be changed for each character or dot by using the special priority function. I can do it.

The line color screen can be inserted at the second position, one below that screen, when the specified screen has the highest priority.

■ 11.1 Priority function

The priority (display priority) of the sprite and each scroll screen is determined by comparing the size of the priority number value of the screen where the dots located at the same TV screen coordinates are not transparent for each dot. The higher the priority number value, the higher the priority of the screen, and the image composed of the dots with the highest priority is called the top image 061 third image. In addition, the back screen is displayed where the dots on the sprite and all scroll screens are transparent. The priority function is shown in Figure 11.1.

Figure 11.1 Priority function

● Priority number

The scroll screen has one 3-bit priority number register for each screen. This priority number is typically used for the entire face, but the special priority mode allows you to change the value of the least significant bit on a character-by-character or dot-by-dot basis. Sprite Priority Nan

The bar allows you to select one of the eight 3-bit priority number registers for each character. For information on selecting the sprite's priority number register, see " Priority Number Selection " in 9.2 Priority and Color Arithmetic.

The higher the priority number value, the higher the screen priority, but if they are equal, the priority is determined according to the order shown in Table 11.1. When the priority number value is 0H, it is considered transparent.

Table 11.1 Priority when the priority numbers are equal
 priority
 generally
 When inputting external screen data
 When displaying a rotary scroll screen on two sides
 Rotating scroll screen
When inputting an external screen on two sides
High ↑









Low
Sprite Sprite Sprite Sprite
RBG0 RBG0 RBG0 RBG0
NBG0 NBG0 RBG1 RBG1
NBG1 EXBG EXBG
NBG2 NBG2
NBG3 NBG3

● Priority number register

The priority number register specifies the priority number. This is a write-only 16-bit register located at addresses 1800F8H to 1800FCH. After turning on the power or resetting, the value will be cleared to 0, so be sure to set it.

PRINA 1800F8H
 15
 14
 13
 12
 11
 Ten
 09 09
 08 08
 ---
 ---
 ---
 ---
 ---
 N1PRIN2
 N1PRIN1
 N1PRIN0

 07 07
 06 06
 05 05
 04
 03 03
 02 02
 01 01
 00
 ---
 ---
 ---
 ---
 ---
 N0PRIN2
 N0PRIN1
 N0PRIN0 

PRINB 1800FAH
 15
 14
 13
 12
 11
 Ten
 09 09
 08 08
 ---
 ---
 ---
 ---
 ---
 N3PRIN2
 N3PRIN1
 N3PRIN0

 07 07
 06 06
 05 05
 04
 03 03
 02 02
 01 01
 00
 ---
 ---
 ---
 ---
 ---
 N2PRIN2
 N2PRIN1
 N2PRIN0 

PRIR 1800FCH
 15
 14
 13
 12
 11
 Ten
 09 09
 08 08
 ---
 ---
 ---
 ---
 ---
 ---
 ---
 ---

 07 07
 06 06
 05 05
 04
 03 03
 02 02
 01 01
 00
 ---
 ---
 ---
 ---
 ---
 R0PRIN2
 R0PRIN1
 R0PRIN0

Priority number bit (for scroll screen) : Priority number bit
(N0PRIN2 to N0PRIN0, N1PRIN2 to N1PRIN0, N2PRIN2 to N2PRIN0, N3PRIN2 to N3PRIN0, R0PRIN2 to R0PRIN0)
Specify the priority number of each scroll screen.

N0PRIN2 to N0PRIN0 1800F8H Bits 2-0 For NBG0 (or for RBG1)
N1PRIN2 to N1PRIN0 1800F8H Bits 10-8 For NBG1 (or for EXBG)
N2PRIN2 to N2PRIN0 1800FAH Bits 2-0 For NBG2
N3PRIN2 to N3PRIN0 1800FAH Bits 10-8 For NBG3
R0PRIN2 to R0PRIN0 1800FCH Bits 2-0 For RBG0

The higher the priority number, the higher the display priority. Also, when the priority number value is 0, it is considered transparent and is not displayed.
For the sprite priority number register, refer to " ● Priority Number Register " in "9.2 Priority and Color Calculation".


BackForward
HARDWARE ManualVDP2 User's Manual
Copyright SEGA ENTERPRISES, LTD., 1997