Japanese
HARDWARE ManualVDP1 User's ManualChapter 7 Command
BackForward
VDP1 User's Manual/Chapter 7 Commands

■7.2 User clipping coordinate setting command

User clipping can be set freely using the software. When the command selection bit is 1000B, this is a user clipping coordinate setting command.
The contents of the user clipping coordinate setting command table are as follows:

 bit
 15
 14
 13
 12
 11
 10
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
CMDCTRL
+00
0 JP 0 0 0 0 0 0 0 0 1 0 0 0
CMDLINK
+02
LINK specification/8H 0 0
+04
+06
+08
+0A
CMDXA
+0C
0 0 0 0 0 0 Upper left X coordinate (XA)
CMDYA
+0E
0 0 0 0 0 0 0 Upper left Y coordinate (YA)
+10
+12
CMDXC
+14
0 0 0 0 0 0 Lower right X coordinate (XC)
CMDYC
+16
0 0 0 0 0 0 0 Lower right Y coordinate (YC)
+18
+1A
+1C
【note】
is ignored (don't care)

The user clipping coordinate setting command is defined as follows.

●User clipping

User clipping can be selected in the software, and you can enable user clipping for each part, or choose whether to clip outside or inside the user clipping setting area.

User clipping coordinates can be selected as valid or invalid using the user clipping valid bit (Clip bit, bit 10 of command table start address +04H). When disabled, user clipping coordinates are disabled and the part will only be clipped at the system clipping coordinates. When enabled, user clipping coordinates are enabled and the part will be clipped using system clipping coordinates and user clipping coordinates.

When user clipping is enabled, the clipping mode bit (Cmod bit, bit 9 of the command table start address +40H) allows you to select whether the user clipping is inside drawing mode or outside drawing mode. When in inside drawing mode, only the inside of the area set by the user clipping coordinates is drawn for that part, and when in outside drawing mode, the outside is drawn.

System clipping is handled independently of user clipping.

Set the clipping coordinates using a rectangle. The specification method is upper left coordinates (XA, YA) and lower right coordinates (XC, YC), and define the values of these two coordinates in the command table.

Clipping coordinates are not checked, so please set them in advance so that XA≦XC and YA≦YC. XC< XA or YC< If set to YA, operation is not guaranteed.

Please set the user clipping coordinates inside the system clipping coordinate setting area (including online). Operation is not guaranteed if the user clipping coordinates are set outside the system clipping setting area.

Points on the clipping line are treated as inside the clipping region. It is drawn when in inside drawing mode, and not drawn when in outside drawing mode.

Two or more user clipping commands can be set within the same frame. The clipping coordinate set command rewrites the internal clipping coordinate register. Subsequent parts that have been rewritten will be drawn referring to that value.

The user clipping coordinates must be set before drawing starts, as the values are undefined after power is turned on or reset.

Figure 7.2 User clipping settings
(a) User clipping settings
Please set so that XA≦XC and YA≦YC.
(b) Incorrect user clipping settings
XC< XA, YA< Operation is not guaranteed when set to YC.
Figure 7.3 User clipping
(a) User clipping disabled
Since user clipping is disabled,
Draws inside the system clipping area.
(b) Inside drawing mode
When user clipping is enabled and inside drawing mode is enabled,
Draws inside the user clipping area.
(c) Outside drawing mode
When user clipping is enabled and outside drawing mode is enabled,
The area outside and between the system clipping areas is drawn.
(c) Setting prohibited
Be sure to set the user clipping area inside the system clipping area.
Operation is not guaranteed if it is set outside.

BackForward
HARDWARE ManualVDP1 User's ManualChapter 7 Command
Copyright SEGA ENTERPRISES, LTD., 1997