Japanese
HARDWARE ManualVDP1 User's Manual
BackForward
VDP1 User's Manual/Chapter 1 VDP1 Functions

●Parts

Parts are classified as follows:

Table 1.1 Classification of parts
 classification
 Part name
 function
 Definition method
 parts
 texture parts
 shaped sprite
 charactor,
Up/down, left/right flip,
 1 vertex and read direction
 rectangular sprite
 charactor,
Up/down, left/right flip,
Scaling/reducing/stretching
 2 vertices and readout direction, or
Fixed point, width and readout direction
 deformed sprite
 charactor,
Up/down, left/right flip,
Scaling, stretching,
rotation, twisting
 4 vertices and readout direction
 non-texture parts
 polygon
 square,
Fill in the inside
 4 vertices
 polyline
 square
 4 vertices
 line
 straight line
 start and end points

●Texture parts

Texture parts are called sprites. Sprites draw character patterns. Character patterns are defined in VRAM using pixel data as a character pattern table. The size of pixel data is determined by the color mode and character size.
Sprites include regular sprites, rectangular sprites, and deformed sprites. Regular sprites can be flipped vertically and horizontally, rectangular sprites can be flipped vertically and horizontally, scaled, and stretched; deformed sprites can be flipped vertically and horizontally, scaled, stretched, rotated, and twisted.

◆Standard sprite
Draws the character pattern at the specified position. Specify the coordinates of the upper left vertex to draw the character pattern. From the specified upper left coordinate, X draws to the right and Y draws downward. If you specify the reading direction of the character pattern to be vertically reversed or horizontally reversed, the right edge of the defined character pattern will be drawn from the left, or the bottom edge will be drawn from the top.
Fixed sprites cannot be rotated 90 degrees. If you want to rotate the sprite by 90 degrees, specify it using the transform sprite drawing command.

Figure 1.2 Regular sprite

◆Rectangular sprite
Enlarges or reduces the character pattern at the specified position and draws it. There are two ways to specify position and scaling. One is to specify the coordinates of the top left and bottom right vertices, and the other is to specify the fixed point (zoom point), its coordinates, and the vertical and horizontal display width. Rectangular sprites cannot be rotated 90 degrees. If you want to rotate the sprite by 90 degrees, specify it using the transform sprite drawing command.

Specify 2 coordinates
When specifying two coordinates, specify the coordinates of the two points to draw the upper left vertex and lower right vertex of the character pattern.
The drawing direction (orientation in which the character is drawn) is determined by the positional relationship between the specified upper left coordinate and the lower right coordinate. The character pattern is drawn from the top left coordinate to the bottom right coordinate.
If the X value of the lower right coordinate is smaller than the X value of the upper left coordinate, it will be drawn horizontally flipped, and if the Y value of the lower right coordinate is smaller than the Y value of the upper left coordinate, it will be drawn vertically flipped. .
Just like regular sprites, you can also specify inversion in the read direction. If you flip vertically in the coordinates and flip vertically in the read direction, the flipping will cancel out and the vertical flip specification will become invalid.

Figure 1.3 Rectangular sprite (2 coordinates specified)

Fixed point specification
You can draw a rectangular sprite by specifying a fixed point and display width. Specify the fixed point of the character pattern, the drawing coordinates of that fixed point, and the display width for drawing the character pattern.
Fixed point specifies which point on the character pattern is drawn as a fixed point. Select from the left, center, and right sides for the horizontal direction, and from the top, center, and bottom sides for the vertical direction.
Display width specifies the display width in the X and Y directions. If you specify the reading direction of a character pattern to be vertically flipped or horizontally flipped, the characters will be drawn vertically and horizontally flipped based on the fixed point of the character pattern.
The drawing area differs depending on whether it is flipped vertically or horizontally.

Figure 1.4 Rectangular sprite (fixed point specified)

◆Transforming sprite
Draw a character pattern by specifying four vertex coordinates. Specify four drawing coordinates for each of the four vertices of the character pattern. The relationship between the four coordinates is arbitrary, so you can flip, scale, rotate, or twist it depending on how you specify it.
Transform sprites draw character patterns as diagonal lines. At this time, fill in the holes so that there are no missing pixels. As a result, pixels are written twice, so results are not guaranteed for color calculations such as semi-transparent processing.
Drawing is done using lines, so when twisting or rotating, it may extend outside the shape connecting the four vertices.

Figure 1.5 Deformed sprite

Hole filling process
Transform sprites and polygons draw diagonal lines. At this time, fill in the holes so that there are no missing pixels. Here's how to fill in the blanks:

Figure 1.6 Hole filling process


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