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

Chapter 5 Table


■5.1 Character pattern table

Character patterns are the source data for sprites drawn using texture drawing commands.
Define character patterns consecutively in VRAM as a table. The stored data is referenced by the character address in the command table, and the size of the data is determined by the character pattern size and sprite color mode.

●Character pattern table address
Please define the character pattern with a boundary of 20H (32) Bytes. However, it is not possible to define a character pattern starting from address 00000H of VRAM. Character patterns are stored on a 20HByte boundary, so any memory that is less than 20HByte will be free space.
VRAM is up to address 7FFFFH. Do not define character patterns beyond address 80000H.

●Table size
Depending on the color mode, 1 pixel of the character pattern becomes 4, 8, or 16 bit data.
The character size can be specified in the range of 8 to 504 pixels in 8-pixel units horizontally and 1 to 255 pixels in 1-pixel units vertically.
For example, to represent a character pattern of 8 pixels horizontally x 3 pixels vertically, 0CH (12) Bytes are required for 4 bits/pixel, 18H (24) Bytes for 8 bits/pixel, and 30H (48) Bytes for 16 bits/pixel.
The minimum size of the character pattern table is 8 pixels wide x 1 pixel high and 4 HByte when the data is 4 bits/pixel, and the maximum size is 504 pixels wide x 255 pixels high and 3EC10H (257040) Bytes is required when the data size is 16 bits/pixel.

Table 5.1 Character pattern table size
 item
 minimum
 maximum
 character size
 8 pixels horizontally x 1 pixel vertically
 504 pixels horizontally x 255 pixels vertically
 color mode
 4bit/pixel
 16bit/pixel
 character pattern
 4HByte *
 3EC10H (257040) Byte

[Note]* Please note that even a 4HByte character pattern requires 20HByte on VRAM.

●Character pattern table example
An example of a character pattern with a character size of 8 pixels horizontally and 3 pixels vertically is shown below.

Figure 5.1 Example of character pattern table
●0CH(12)byte is required for 4bit/pixel
pixel 0 1 2 3 4 5 6 7 
     ┏━┯━┳━┯━┳━┯━┳━┯━┓
     ┃ │ ┃ │ ┃ │ ┃ │ ┃
+00H ┃+00┃+01┃+02┃+03┃
     ┃ │ ┃ │ ┃ │ ┃ │ ┃
     ┣━┿━╋━┿━╋━┿━╋━┿━┫
     ┃ │ ┃ │ ┃ │ ┃ │ ┃
+04H ┃+04┃+05┃+06┃+07┃
     ┃ │ ┃ │ ┃ │ ┃ │ ┃
     ┣━┿━╋━┿━╋━┿━╋━┿━┫
     ┃ │ ┃ │ ┃ │ ┃ │ ┃
+08H ┃+08┃+09┃+0A┃+0B┃
     ┃ │ ┃ │ ┃ │ ┃ │ ┃
     ┗━┷━┻━┷━┻━┷━┻━┷━┛

●18H (24) bytes are required for 8bit/pixel
pixel  0   1   2   3   4   5   6   7 
     ┏━━━┳━━━┳━━━┳━━━┳━━━┳━━━┳━━━┳━━━┓
     ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃
+00H ┃+00┃+01┃+02┃+03┃+04┃+05┃+06┃+07┃
     ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃
     ┣━━━╋━━━╋━━━╋━━━╋━━━╋━━━╋━━━╋━━━┫
     ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃
+08H ┃+08┃+09┃+0A┃+0B┃+0C┃+0D┃+0E┃+0F┃
     ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃
     ┣━━━╋━━━╋━━━╋━━━╋━━━╋━━━╋━━━╋━━━┫
     ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃
+10H ┃+10┃+11┃+12┃+13┃+14┃+15┃+16┃+17┃
     ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃
     ┗━━━┻━━━┻━━━┻━━━┻━━━┻━━━┻━━━┻━━━┛

●18H (24) bytes are required for 8bit/pixel
pixel    0       1       2       3       4       5       6       7
     ┏━━━┯━━━┳━━━┯━━━┳━━━┯━━━┳━━━┯━━━┳━━━┯━━━┳━━━┯━━━┳━━━┯━━━┳━━━┯━━━┓
     ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃
+00H ┃+00│+01┃+02│+03┃+04│+05┃+06│+07┃+08│+09┃+0A│+0B┃+0C│+0D┃+0E│+0F┃
     ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃
     ┣━━━┿━━━╋━━━┿━━━╋━━━┿━━━╋━━━┿━━━╋━━━┿━━━╋━━━┿━━━╋━━━┿━━━╋━━━┿━━━┫
     ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃
+08H ┃+00│+01┃+02│+03┃+04│+05┃+06│+07┃+08│+09┃+0A│+0B┃+0C│+0D┃+0E│+0F┃
     ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃
     ┣━━━┿━━━╋━━━┿━━━╋━━━┿━━━╋━━━┿━━━╋━━━┿━━━╋━━━┿━━━╋━━━┿━━━╋━━━┿━━━┫
     ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃
+10H ┃+00│+01┃+02│+03┃+04│+05┃+06│+07┃+08│+09┃+0A│+0B┃+0C│+0D┃+0E│+0F┃
     ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃   │   ┃
     ┗━━━┷━━━┻━━━┷━━━┻━━━┷━━━┻━━━┷━━━┻━━━┷━━━┻━━━┷━━━┻━━━┷━━━┻━━━┷━━━┛



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