Japanese
HARDWARE ManualVDP2 User's ManualChapter 8 Window
BackForward
VDP2 User's Manual/Chapter 8 Window

●Normal line window

A normal line window can be obtained by storing the horizontal start point and end point coordinates of each window line as a table in VRAM, and specifying the vertical start and end point coordinates in the window position register . The area surrounded by the specified coordinates is inside, and the other area is outside. The window border is considered internal. The normal line window is shown in Figure 8.2.

Figure 8.3 shows the bit configuration of the data stored in the horizontal start point coordinate and end point coordinate table (line window table).
In non-interlace and double-dense interlace mode, coordinates can be specified for each line, but in single-dense interlace mode, coordinates can only be specified for every two lines. Figure 8.4 shows the structure of the normal line window table.
If the start point coordinates are larger than the end point coordinates in either the horizontal or vertical direction, the entire screen is considered to be the area outside the window.

Figure 8.2 Normal line window

Figure 8.3 Bit configuration of normal line window table data

+0
 15
 14
 13
 12
 11
 10
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
Horizontal starting point coordinates 10 bits

+2
 15
 14
 13
 12
 11
 10
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
Horizontal end point coordinates 10 bits

part is ignored.

Figure 8.4 Structure of normal line window table

●Non-interlaced and double-dense interlaced modes
 Bit 15 ← Back screen table (VRAM) → 0
+00H
+02H
Horizontal starting point coordinates of the 1st line
Horizontal end point coordinates of the 1st line
+04H
+06H
Horizontal starting point coordinates of the second line
Horizontal end point coordinates of the second line
+08H
+0AH
Horizontal starting point coordinates of the 3rd line
Horizontal end point coordinates of the 3rd line
:
:
:
:
[Note] For double-dense interlacing, the data of even and odd field lines is stored together.

●Single dense interlace mode
 Bit 15 ← Back screen table (VRAM) → 0
+00H
+02H
Horizontal starting point coordinates of 1st and 2nd lines
Horizontal end point coordinates of 1st and 2nd lines
+04H
+06H
Horizontal starting point coordinates of 3rd and 4th lines
Horizontal end point coordinates of 3rd and 4th lines
+08H
+0AH
Horizontal starting point coordinates of 5th and 6th lines
Horizontal end point coordinates of 5th and 6th lines
:
:
:
:

●Vertical setting
The vertical setting can be obtained by specifying the start point and end point coordinates in the window position register. However, please set any value for the horizontal direction (WPSXn, WPEXn). This setting value is ignored, but it will not be displayed correctly if the start and end points are reversed.
The relationship is WPSXn≦WPEXn.

Wind position register
 WPSXn
 15
 14
 13
 12
 11
 10
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
Arbitrary value (Note)

 WPSYn
 15
 14
 13
 12
 11
 10
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
Vertical start line 10 bits

 WPEXn
 15
 14
 13
 12
 11
 10
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
Arbitrary value (Note)

 WPEYn
 15
 14
 13
 12
 11
 10
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
Vertical end line 10 bits

n=0,1 (window 0, 1)
(Note) Relationship between WPSXn and WPEXn WPSXn≦WPEXn

●Line window table address register

The line window table address register specifies whether to make a normal window a line window and the start address of the table. This is a 16-bit write-only register located at addresses 1800D8H to 1800DEH. The value is cleared to 0 after power-on or reset, so be sure to set it.

LWTA0U 1800D8H
   15   
   14   
   13   
   12   
   11   
   10   
   09   
   08   
 W0LWE
 -
 -
 -
 -
 -
 -
 -

   07   
   06   
   05   
   04   
   03   
   02   
   01   
   00   
 -
 -
 -
 -
 -
 W0LWTA18
 W0LWTA17
 W0LWTA16 

LWTA0L 1800DAH
   15   
   14   
   13   
   12   
   11   
   10   
   09   
   08   
 W0LWTA15
 W0LWTA14
 W0LWTA13
 W0LWTA12
 W0LWTA11
 W0LWTA10
 W0LWTA9
 W0LWTA8

   07   
   06   
   05   
   04   
   03   
   02   
   01   
   00   
 W0LWTA7
 W0LWTA6
 W0LWTA5
 W0LWTA4
 W0LWTA3
 W0LWTA2
 W0LWTA1
 - 

LWTA1U 1800DCH
   15   
   14   
   13   
   12   
   11   
   10   
   09   
   08   
 W1LWE
 -
 -
 -
 -
 -
 -
 -

   07   
   06   
   05   
   04   
   03   
   02   
   01   
   00   
 -
 -
 -
 -
 -
 W1LWTA18
 W1LWTA17
 W1LWTA16 

LWTA1L 1800DEH
   15   
   14   
   13   
   12   
   11   
   10   
   09   
   08   
 W1LWTA15
 W1LWTA14
 W1LWTA13
 W1LWTA12
 W1LWTA11
 W1LWTA10
 W1LWTA9
 W1LWTA8

   07   
   06   
   05   
   04   
   03   
   02   
   01   
   00   
 W1LWTA7
 W1LWTA6
 W1LWTA5
 W1LWTA4
 W1LWTA3
 W1LWTA2
 W1LWTA1
 -

  
Line window enable bit : Line window enable bit (W0LWE, W1LWE)
Specifies whether to make the normal window a line window.

W0LWE 1800D8H bit 15 For W0
W1LWE 1800DCH bit 15 For W1

WxLWE process
 0
Do not turn normal window into line window
 1
Convert normal window to line window
[Note] 0 or 1 is entered for x in the bit name.

When this bit is 1, the line window table must be stored in VRAM.

  
Line window table address bit : Line window table address bit
(W0LWTA18〜W0LWTA1, W1LWTA18〜W1LWTA1)
Specify the start address of the line window table on VRAM.

W0LWTA18~W0LWTA16 1800D8H bits 2-0 For W0
W0LWTA15~W0LWTA1 1800DAH bits 15 to 1 For W0
W1LWTA18~W1LWTA16 1800DCH bits 2-0 For W1
W1LWTA15~W1LWTA1 1800DEH bits 15 to 1 For W1

The actual starting address is calculated using the following formula. If the VRAM capacity is 4Mbits, the most significant bit of the address is ignored.


(Start address of line window table)
           = (line window table address register value 18 bits) x 4H


BackForward
HARDWARE ManualVDP2 User's ManualChapter 8 Window
Copyright SEGA ENTERPRISES, LTD., 1997