HARDWARE ManualVDP1 User's Manual
BackForward
VDP1 User's Manual / Chapter 6 Command Table

■ 6.4 CMD COLR (color control word)

CMDCOLR specifies the color of the part. Functions differ depending on the part and color mode. Set the color bank, color lookup table address, or non-texture color. CMDCOLR is 16 bits at the command table start address + 06H.

bit
 15
 14
 13
 12
 11
 Ten
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0
CMDCOLR
+ 06H
Color bank, color look-up table / 8H ( LSB fixed at 00B ), non-texture

CMDCOLR: Command table start address + 06H
The texture part is the color bank in the color bank mode, the texture part is the color lookup table address in the lookup table mode, and the non-texture part is the non-texture color. This word is ignored when the texture part is in RGB mode.

Table 6.3 CMDCOLR
 parts
 Color mode
 CMDCOLR
 Texture parts
 Color bank mode
 Color bank
 Lookup table mode
 Color look-up table address
 RGB mode
 Ignored
 Non-textured parts
 Non-texture color

■ Color bank


Figure 6.17 Color bank
┌─────────────────────────────┐┐
Color bank │ Color bank 0 0 0 0 │ │ * 1
└─────────────┬───────┬───────┘┘
┌─────────────┴───────┼─┬─┬─┬─┐┐
16-color mode │ Color bank top 12 bits │ ○ │ ○ │ ○ │ ○ │ │ * 2
└─────────────┬───────┴─┴─┴─┴─┘│
┌─────────────┴───┬─┬─┬─┬─┬─┬─┐│
64 color mode │ Color bank top 10 bits │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ │
└─────────────┬───┴─┴─┴─┴─┴─┴─┘│
┌─────────────┴─┬─┬─┬─┬─┬─┬─┬─┐│
128 color mode │ color bank top 9 bits │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ │
└─────────────┬─┴─┴─┴─┴─┴─┴─┴─┘│
┌─────────────┼─┬─┬─┬─┬─┬─┬─┬─┐│
256 color mode │ color bank top 8 bits │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ │
└─────────────┼─┴─┴─┴─┴─┴─┴─┴─┘┘
└┬─────────────────────────────┘
↓ └┬──────────────┘
At 16 bit / pixel ↓
For 8bit / pixel ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
RGB mode │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ * 2
└─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘

┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
Lookup │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │ ○ │
└─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘
[Supplement] In the lookup table mode, the lookup table data referenced from the defined character pattern is written to the frame buffer. [Note] * 1 : The lower 4 bits of the color bank are fixed to "0". * 2 : For ○ marks, the bit data of the defined character pattern is written to the frame buffer.

Table 6.4 Example of relationship between color bank, definition data, and drawing data
 Color bank
 Justice data
 Drawing data
0000H 16 color mode
 DH
 0 0 0 DH
64 color mode
 CDH
 0 0 0 DH
128 color mode
 CDH
 0 0 4 DH
256 color mode
 CDH
 0 0 CDH
RGB mode
 ABCDH
 ABCDH
0010H 16 color mode
 DH
 0 0 1 DH
64 color mode
 CDH
 0 0 0 DH
128 color mode
 CDH
 0 0 4 DH
256 color mode
 CDH
 0 0 CDH
RGB mode
 ABCDH
 ABCDH
1230H 16 color mode
 DH
 1 2 3 DH
64 color mode
 CDH
 1 2 0 DH
128 color mode
 CDH
 1 2 4 DH
256 color mode
 CDH
 1 2 CDH
RGB mode
 ABCDH
 ABCDH
[Note]: The part in bold is the color bank code.

■ Color look-up table

Figure 6.18 Color look-up table
Specified by table address 
Character pattern 16 colors color look-up table frame buffer 
┏━━━━━━━━━━┓ ┏━━━━━━━━━━┓ ┏━━━━━━━━━━┓
┃ ┃ + 00H ┃ 16-bit data ┃ (0H color code) ┃ ┃
┃┃┠──────────┨┃┃
┃ ┃ + 02H ┃ 16-bit data ┃ (1H color code) ┃ ┃
┃┃┠──────────┨┃┃
┃ ┃ + 03H ┃ 16-bit data ┃ (2H color code) ┃ ┃
┃┃┠──────────┨┃┃
┃ ┃: ┃: ┃: ┃ ┃
┠──────────┨: ┃: ┃: ┠──────────┨
┃Definition 4-bit data ┃ →: ┃: ┃: → ┃Drawing 16-bit data ┃
┠──────────┨: ┃: ┃: ┠──────────┨
┃ ┃: ┃: ┃: ┃ ┃
┃┃┠──────────┨┃┃
┃ ┃ + 1CH ┃ 16-bit data ┃ (EH color code) ┃ ┃
┃┃┠──────────┨┃┃
┃ ┃ + 1EH ┃ 16-bit data ┃ (FH color code) ┃ ┃
┗━━━━━━━━━━┛ ┗━━━━━━━━━━┛ ┗━━━━━━━━━━┛
 
● The 16-bit data of the color lookup table selected with 4 bits of the character pattern remains as it is. 
It is written to the frame buffer as pixel data. 

■ Non-texture color


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