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

● Color

The color features and special features are:

There are two methods for expressing the color of pixels drawn (written) in the frame buffer: the color bank method and the RGB code method. The color bank method can express 16, 64, 128, 256 colors in one character, and the RGB code method can express 32768 colors in one character.

◆ Color bank method
The color bank method combines a palette code of 16, 64, 128, and 256 colors with a color bank to refer to the colors stored in the VDP2's color RAM. When there are 16 colors, the pixel data of the character pattern represents the palette code with 4 bits, the upper 12 bits are added from the color bank, and the 16 bit data is written to the frame buffer. When it is 8bit / pixel, the lower 8bit is written. For 64, 128, and 256 colors, the character pattern is 8bit / pixel, and for 64, 128, and 256 colors, the lower 6, 7, and 8 bits are valid, respectively. The top 10, 9, and 8 bits of the color bank are added.
The data written by the color bank method is processed by dividing it into the following function bits on the VDP2 side. See the VDP2 manual / for more information.

Figure 1.10 Color bank bit configuration

MSB LSB
┌──┬──┬──────┬───────────┐
│ │ │ Color bank │ Palette code │
└──┴──┴──────┴───────────┘
│ │ 
│ └ → Priority 
↓ 
Color calculation 

◆ RGB code method
The RGB code method represents color with a brightness of 5 bits each for RGB (red, green, blue). The brightness of each RGB is expressed from 00H to 1FH. The closer it is to 00H, the darker it becomes, and the closer it gets to 1FH, the brighter it becomes. There are 32768 colors that can be represented by RGB code. The RGB code is 16-bit data, the most significant bit (MSB) of which is 1.

◆ Parts color
Sprites set colors using the color bank method, color look-up table method, or RGB code method. Non-textures for polygons, polylines, and lines set non-texture colors. Set for each part.

◆ Color look-up table
The color look-up table refers to the 4-bit data of the character pattern with the 16-color color look-up table and exchanges it for 16-bit data.
Since the 16-bit data on the table is written to the frame buffer as it is, there is no distinction between color bank code and RGB code as texture data.
When read to VDP2, it is treated as a color bank code when the 16-bit MSB is 0, and as an RGB code when it is 1.

◆ Non-texture color
Non-texture colors are treated as pixel data as they are. Color banks and color look-up tables are not used.

◆ 8bit / pixel color
At high resolution, or when the frame buffer is rotated and the bit width is specified as 8bit / pixel, it is written to the frame buffer at 8bit / pixel. At this time, in the case of the color lookup table method or non-texture color, the lower 8 bits of 16 bits are written to the frame buffer.
Hereinafter, it is abbreviated as 8bit / pixel (high resolution or rotation 8).


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