Japanese
HARDWARE ManualVDP1 User's Manual
BackForward
VDP1 User's Manual

Chapter 3 Process flow


●Flow of drawing procedure

The flow of the drawing procedure using VDP1 is as follows.

step 1.
Power on the system.

Step 2.
Set the required values in the VDP1 system registers.

Step 3.
Write the required character pattern table to VRAM.

Step 4.
Write the required color lookup table to VRAM.

Step 5.
Write the required Gouraud shading table to VRAM.

Step 6.
Write the required command table to VRAM.

Step 7.
At the same time as a frame change, drawing automatically begins in the frame buffer and will be displayed at the next frame change.

Step 8.
Repeat steps 3-6 as necessary.

●Table access

The steps for VDP1 to access and draw a table on VRAM are as follows:

step 1.
Controls drawing and display according to instructions set in system registers.

Step 2.
Fetch the command table at the start address of VRAM.

Step 3.
The fetched command table is

(1) When using the drawing end command, drawing ends. → Step 9

(2) When the jump format is skip, the command table is ignored. Reading of the table is finished and the table is not processed. → Step 8

(3) In cases other than (1) and (2) above, go to step 4.

Step 4.
For clipping coordinate setting commands and relative coordinate setting commands, the respective processing is performed. → Step 8

Step 5.
When using a drawing command, if specified, reads the Gouraud shading table and color lookup table.

Step 6.
When drawing textures, reads the character pattern table and writes it to the frame buffer according to the specifications. At this time, it handles color mode processing, color calculations, flipping, scaling, and rotation.

Step 7.
When drawing non-texture, writes to the frame buffer according to the specifications.

Step 8.
Follow the instructions in the jump format to fetch the next command table and repeatedly process the command table. → Step 3

Step 9.
Repeats drawing at the start of the frame. → Step 1

●Command table flow

For all commands other than the drawing end command, you can specify the jump format to the next command table to be processed. Jump formats include:

An example of the command flow in jump format is as follows:

Figure 3.1 Command table flow
VRAM command table
┌───────────┐
│Clipping   │
│coordinates│·
├───────────┤│
│Relative   ││
│coordinates││
├───────────┤│
│Parts      ││
├───────────┤↓
│Subroutine ││
│call       │└─┐·The specified table is called as a subroutine
├───────────┤  │
│Parts      │┌←┼─┐
├───────────┤│ │ │
│Parts      ││ │ │
├───────────┤↓ │ │
│Jump       │└─┼─┼─┐·Moves to the specified table
├───────────┤  │ │ │
│:          │  │ │ │
├───────────┤  │ │ │
│Parts      │┌←┘ │ │
├───────────┤│   │ │
│Parts      ││   │ │
├───────────┤↓   │ │
│Return     │└───┘ │
├───────────┤      │
│:          │      │
├───────────┤      │
│Parts      │┌←────┘
├───────────┤│
│Parts      ││
├───────────┤↓
│Skip/Parts │·Skip (this part will not be drawn)
├───────────┤│
│Parts      ││
├───────────┤│
│Parts      ││
├───────────┤↓
│Jump       │└─┐
├───────────┤  │
│Parts      │  │
├───────────┤  │
│Parts      │  │
├───────────┤  │
│Jump       │  │
├───────────┤  │
│:          │  │
├───────────┤  │
│Changing   │  │
│clipping   │┌←┘
│coordinates││
├───────────┤│
│Parts      ││
├───────────┤│
│Relative   ││
│coordinate ││
│change     ││
├───────────┤│
│Parts      ││
├───────────┤│
│:          ││
├───────────┤↓
│End drawing│·End drawing
├───────────┤
│:          │
└───────────┘

●Table reference

References to tables stored in VRAM are made from the command table.

Figure 3.2 Table reference
        VRAM 
┌──────────────────┐
│        :         │
│        :         │
┣━━━━━━━━━━━━━━━━━━┫
┃   Parts drawing  ┃
┃   commands       ┃
┃        :         ┃
┠──────────────────┨
┃ Color mode,      ┃
┃ color calculation┃
┠──────────────────┨
┃ Lookup table     ┃
┃ address          ┃─┐
┠──────────────────┨ │
┃Character address ┃─┼─┐
┠──────────────────┨ │ │
┃Character size    ┃ │ │
┠──────────────────┨ │ │
┃        :         ┃ │ │
┃        :         ┃ │ │
┠──────────────────┨ │ │
┃Guro shading      ┃ │ │
┃table address     ┃─┼┐│
┠──────────────────┨ │││
┃        :         ┃ │││
┣━━━━━━━━━━━━━━━━━━┫ │││
│        :         │ │││
│        :         │ │││
┣━━━━━━━━━━━━━━━━━━┫ │││
┃Color lookup table┃←┘││
┃        :         ┃  ││
┣━━━━━━━━━━━━━━━━━━┫  ││
│        :         │  ││
│        :         │  ││
┣━━━━━━━━━━━━━━━━━━┫  ││
┃Guro shading table┃←─┘│
┃        :         ┃   │
┃        :         ┃   │
┣━━━━━━━━━━━━━━━━━━┫   │
│        :         │   │
│        :         │   │
┣━━━━━━━━━━━━━━━━━━┫   │
┃Character pattern ┃←──┘
┃table             ┃
┃        :         ┃
┣━━━━━━━━━━━━━━━━━━┫
│        :         │
│        :         │

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