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

Chapter 11 Priority Function


VDP2 compares the priority number values of the sprite and each scroll screen to determine the display priority up to the third from the top. 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. can.

A line color screen can be inserted in the second position below the specified screen when it has the highest priority.

■11.1 Priority function

The priority (display priority order) of the sprite and each scroll screen is determined by comparing the size of the priority number value of the non-transparent screen dot by dot located at the same TV screen coordinates. The screen priority increases as the priority number increases, and the image made up of dots with the highest priority is called the top image 061 third image. Also, the back screen is displayed where all dots on the sprite and each scroll screen are transparent. The priority function is shown in Figure 11.1.

Figure 11.1 Priority function

●Priority number

The scrolling screens have one 3-bit priority number register per screen. This priority number is normally used for the entire surface, but special priority modes allow you to change the value of the least significant bit on a character-by-character or dot-by-dot basis. sprite priority number

The bar can select one of eight 3-bit priority number registers for each character. For information on selecting a sprite's priority number register, see " Priority number selection " in " 9.2 Priority and color operations ."

The higher the priority number, 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 priority numbers are equal
 priority
 usually
 External screen data
When entering
 rotating scroll screen
When displaying on two sides
 rotating scroll screen
External screen on 2 sides
When entering
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 16-bit write-only register located at addresses 1800F8H to 1800FCH. The value is cleared to 0 after power-on or reset, so be sure to set it.

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

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

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

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

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

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

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

N0PRIN2~N0PRIN0 1800F8H bits 2-0 For NBG0 (or for RBG1)
N1PRIN2~N1PRIN0 1800F8H bits 10-8 For NBG1 (or for EXBG)
N2PRIN2~N2PRIN0 1800FAH bits 2-0 For NBG2
N3PRIN2~N3PRIN0 1800FAH bits 10-8 For NBG3
R0PRIN2~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 information on sprite priority number registers, see " ●Priority number register " in " 9.2 Priority and color operations ".


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