HARDWARE ManualVDP1 User's Manual
BackForward
VDP1 User's Manual / Chapter 5 Table

■ 5.4 Command table

The command table consists of 1EH (30) Bytes. The command table is fetched every 20H (32) Byte, so define it with a 20H boundary. The 2 bytes following the command table are dummy and are skipped when fetching the command table.
The command table stored in VRAM is fetched from the start address (00000H) every frame. Be sure to store the command table at addresses 00000H to 0001EH. Drawing operation is not guaranteed if a table other than the command table (color lookup table, Gouraud shading table, character pattern table) is placed. VRAM is up to address 7FFFFH. Do not define a Gouraud shading table beyond address 80000H.

Figure 5.5 Command table
 15
 14
 13
 12
 11
 Ten
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
CMDCTRL + 00H END JP ZP 0 0 Dir Comm
CMDLINK + 02H LINK designation / 8H 0 0
CMDPMOD + 04H MON 0 0 HSS Pclp Clip Cmod Mesh ECD SPD Color mode Color operation bit
CMDCOLP + 06H Color bank, color look-up table / 8H (LSB fixed to 00B), non-texture
CMDSRCA + 08H Character address / 8H 0 0
CMDSIZE + 0AH 0 0 Character size X / 8 Character size Y / 8
CMDXA + 0CH Sign extension Vertex (A), X coordinate (XA) *
CMDYA + 0EH Sign extension Vertex (A), Y coordinate (YA)
CMDXB + 10H Sign extension Vertex (B), X coordinate (XB)
CMDYB + 12H Sign extension Vertex (B), Y coordinate (YB)
CMDXC + 14H Sign extension Vertex (C), X coordinate (XC)
CMDYC + 16H Sign extension Vertex (C), Y coordinate (YC)
CMDXD + 18H Sign extension Vertex (D), X coordinate (XD)
CMDYD + 1AH Sign extension Vertex (D), Y coordinate (YD)
CMDGRADA + 1CH Guro shading table / 8H
+ 1EH Dummy (skip when fetching table)
+ 20H Subsequent table
+ 40H Subsequent table
+ 60H :
:

[Note] * The first bit of vertex coordinates is the sign bit. Negative values are represented by 2's complement. Extend the code for the upper 6 bits.

The drawing order of each part, such as sprites, is determined by how this command table is placed in VRAM.
The drawing part processed first is the one farthest from the viewpoint, and the one processed last is the closest one.


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