Japanese
HARDWARE ManualVDP2 User's ManualChapter 15 How to use VDP2
BackForward
VDP2 User's Manual/Chapter 15 How to use VDP2

■15.2 How to use RAM

When using VDP2, define and set data in VRAM, color RAM, and registers.

●VRAM

The data defined in VRAM varies depending on the scroll screen used, screen format, screen size, and image processing function used. Define each data in VRAM according to the register settings, and set the defined address in each address register. Table 15.1 shows the data defined in VRAM and the related main registers.

Table 15.1 Data defined in VRAM and related registers
 data
 What to define
 Related registers
 Data to set
 pattern name table
 character pattern
starting address of
 pattern name control register
(Text/Reference)
・Pattern name data size
・ Character number assistance mode
・ Pattern name auxiliary data
 Plane size register
(Text/Reference)
・Plain size when displaying in cell format
 Normal scroll screen map
register
(Text/Reference)
・Start address of pattern name table placed on each plane
 Rotating scroll screen map register
(Text/Reference)
・Start address of pattern name table placed on each plane
 map offset register
(Text/Reference)
・3-bit map offset value added to the upper part of the map register
 character pattern
 cell dot data
character control register
(Text/Reference)
・Number of character colors, character size
 bitmap pattern
 bitmap pattern
Data of
 character control register
(Text/Reference)
・Number of character colors (number of bitmap colors)
・ bitmap size
・ bitmap enable
 map offset register
(Text/Reference)
・Address of bitmap pattern boundary
 line scroll table
 horizontal and vertical
screen scroll value,
horizontal coordinate increment
 line scroll table address
register
(Text/Reference)
・Start address of line scroll table
 Line & vertical cell scroll control
register
(Text/Reference)
・Scroll function control data
 vertical cell scroll table
 Vertical screen scroll value
 Vertical cell scroll table address
register
(Text/Reference)
・Start address of vertical cell scroll table
 Line & vertical cell scroll control
register
(Text/Reference)
・Scroll function control data
 Rotation parameter table
 rotation parameters,
Related registers of coefficient table
RAM control register
(Text/Reference)
 - Purpose of using VRAM on rotating scroll screen
 Rotation parameter table address
register
(Text/Reference)
・Start address of parameter table
 Rotation parameter mode register
(Text/Reference)
・Specification of rotation parameter mode
 coefficient table
 Coefficient table data
(scaling coefficient kx, ky,
Starting point coordinates Xp after rotation transformation)
 RAM control register
(Text/Reference)
 - Purpose of using VRAM on rotating scroll screen
 Coefficient table control
register
(Text/Reference)
・Coefficient data mode
・ Data size of coefficient data
・ Coefficient table enable
 Coefficient table address offset
register
(Text/Reference)
・Start address offset value of coefficient table
 line color screen table
 color ram address
line color screen table address
register
(Text/Reference)
・Color mode of line color screen
・ Start address of line color screen table
 back screen table
 RGB color data
 Back screen table address
register
(Text/Reference)
・Back screen color mode
・ Back screen table start address
 line window table
 horizontal starting point coordinates,
Horizontal end point coordinates
 line window table ad
response register
(Text/Reference)
・Line window enable
・ Start address of line window table

●Definition of color RAM

Define color data for palette-style sprites and scroll screens. The color data stored in the color RAM is in RGB format and has three modes. The mode selection is specified by the color RAM mode (CRMD1, CRMD0, bits 13 and 12) of the RAM control register (18000EH).

The most significant bit of the color data stored in the color RAM is the enable bit when the special color calculation mode is mode 3. When the special color calculation mode is mode 3, the color format is palette format, and the color calculation enable bit is 1, color calculation is performed on a dot-by-dot basis using color data whose most significant bit is 1. Masu.

●Color RAM reference

Color RAM is referenced from data in character patterns, bitmap patterns, and line color screen tables. Color RAM addresses are represented by 11 bits. If the number of character colors or bitmap colors is 16, a 7-bit palette number is added to the upper part, making it 11 bits, and if it is 256 colors, a 3-bit palette number is added to the upper part, making it 11 bits. Masu. The palette number of a character pattern is located in the pattern name data and auxiliary data of the pattern name control register, and the palette number of a bitmap pattern is located in the bitmap palette number register.

●Register

Registers are generally 16 bits that are write-only and specify the functionality of VDP2. One function may span several registers, and some functions may be grouped together in one register.
Set the registers that correspond to the functions you want to use as necessary.


BackForward
HARDWARE ManualVDP2 User's ManualChapter 15 How to use VDP2
Copyright SEGA ENTERPRISES, LTD., 1997