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

■6.4 CMDCOLR (color control word)

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

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

CMDCOLR: Command table start address +06H
When a texture part is in color bank mode, it is a color bank, when a texture part is in lookup table mode, it is a color lookup table address, and when it is a non-texture part, it is a non-texture color. This word is ignored when in RGB mode with texture parts.

Table 6.3 CMDCOLR
 parts
 color mode
 CMDCOLR
 texture parts
 color bank mode
 color bank
 lookup table mode
 color lookup table
address
 RGB mode
 will be ignored
 non-textured parts
 non-textured color

■Color bank


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

        ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
RGB mode│○│○│○│○│○│○│○│○│○│○│○│○│○│○│○│ *2
        └─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘

        ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
Lookup  │○│○│○│○│○│○│○│○│○│○│○│○│○│○│○│
        └─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘
[Supplement] In 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 : ○ indicates that 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
 Definition 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 bold part is the color bank code

■Color lookup table

Figure 6.18 Color lookup table
               Specified by table address                
Character         16 color                   Frame buffer
pattern           lookup table                           
┏━━━━━━━━━━━┓     ┏━━━━━━━━━━━┓               ┏━━━━━━━━━━━┓
┃           ┃ +00H┃16-bit data┃(0H color code)┃           ┃
┃           ┃     ┠───────────┨               ┃           ┃
┃           ┃ +02H┃16-bit data┃(1H color code)┃           ┃
┃           ┃     ┠───────────┨               ┃           ┃
┃           ┃ +03H┃16-bit data┃(2H color code)┃           ┃
┃           ┃     ┠───────────┨               ┃           ┃
┃           ┃   : ┃     :     ┃      :        ┃           ┃
┠━━━━━━━━━━━┨   : ┃     :     ┃      :        ┠━━━━━━━━━━━┨
┃Definition ┃→  : ┃     :     ┃      :       →┃Drawing    ┃
┃4-bit data ┃→  : ┃     :     ┃      :       →┃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 by the 4-bit character
pattern is written directly to the frame buffer as pixel data.

■Non-texture color


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