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 coordinates and end point coordinates for each line of the window in VRAM as a table, and specifying the vertical start point coordinates and end point coordinates in the window position register. The area surrounded by the specified coordinates is the inside, and the other areas are the outside. The window border is considered inside. 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 and end coordinates table (line window table).
In non-interlaced and double-dense interlaced modes, coordinates can be specified for each line, but in single-dense interlaced mode, coordinates can only be specified for every two lines. Figure 8.4 shows the configuration 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 judged as 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
 Ten
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
Horizontal start point coordinates 10 bits

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

The part is ignored.

Figure 8.4 Normal line window table configuration

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

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

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

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

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

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

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

n = 0,1 (wind 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 the normal window a line window and the start address of the table. This is a write-only 16-bit register located at addresses 1800D8H to 1800DEH. After turning on the power or resetting, the value will be cleared to 0, so be sure to set it.

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

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

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

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

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

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

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

 07 07
 06 06
 05 05
 04
 03 03
 02 02
 01 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 change the normal window to a line window
 1
Make the normal window a line window
Note The x in the bit name can be 0 or 1.

Be sure to store the line window table in VRAM when this bit is 1.

  
Line window table address bit : Line window table address bit
(W0LWTA18 ~ W0LWTA1, W1LWTA18 ~ W1LWTA1)
Specifies the start address of the line window table in 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 start address is calculated by the following formula. If the VRAM capacity is 4M bits, 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