HARDWARE ManualVDP2 User's Manual
BackForward
VDP2 User's Manual

Chapter 3 RAM


Dedicated VRAM for defining pattern name tables, character patterns, etc. is connected to VDP2. VRAM is divided into two parts with the same capacity called VRAM-A and VRAM-B, respectively. VRAM-A and VRAM-B can be divided into two parts with the same capacity called bank 0 and bank 1, respectively. The four banks of the same capacity divided in this way are called VRAM-A0, VRAM-A1, VRAM-B0, and VRAM-B1. Define the data shown in Table 3.1 in VRAM.
It also has built-in color RAM for defining color data for scroll screens and sprites.

Table 3.1 Data defined in VRAM
 Data that must be defined when the display format is cell format
 Data that must be defined when the display format is bitmap format
 Data to be defined as needed
 Pattern name table data Character pattern data



 Bitmap pattern data




 Line scroll table data Vertical cell scroll table data rotation parameter table data coefficient table data line color screen table data back screen table data line window table data

■ 3.1 Address map

VDP2 can support two types of VRAM, 4Mbit and 8Mbit. Programs written for systems using 4Mbit VRAM can also be used for systems using 8Mbit VRAM, but not vice versa.

Depending on the amount of VRAM used in your system, the address map will change as shown in Figure 3.1.

Figure 3.1 VRAM address map by capacity
 ● VRAM capacity: 4M bits 
000000H ┌───────────┐
│ │
│ VRAM-A0 │
01FFFFH │ │ │
020000H ├───────────┤
│ │
│ VRAM-A1 │
03FFFFH │ │ │
040000H ├───────────┤
│ │
│ VRAM-B0 │
05FFFFH │ │ │
060000H ├───────────┤
│ │
│ VRAM-B1 │
│ │
07FFFFH └───────────┘

 ● VRAM capacity: 8M bits 
000000H ┌───────────┐
│ │
│ │
│ VRAM-A0 │
│ │
03FFFFH │ │ │
040000H ├───────────┤
│ │
│ │
│ VRAM-A1 │
│ │
07FFFFH │ │ │
080000H ├───────────┤
│ │
│ │
│ VRAM-B0 │
│ │
0BFFFFH │ │ │
0C0000H ├───────────┤
│ │
│ │
│ VRAM-B1 │
│ │
│ │
0FFFFFH └───────────┘

● VRAM size register

The VRAM size register specifies the amount of VRAM used in the system. It is a read / write 16-bit register located at address 180006H. However, bits 3 to 0 are read-only bits. After turning on the power or resetting, the value of bit 15 (VRAMSZ) is cleared to 0, so be sure to set it.

VRSIZE 180006H
 15
 14
 13
 12
 11
 Ten
 09 09
 08 08
VRAMSZ --- --- --- --- --- --- ---

 07 07
 06 06
 05 05
 04
 03 03
 02 02
 01 01
 00
--- --- --- --- VER3 VER2 VER1 VER0

VRAM size bit : VRAM size bit (VRAMSZ), bit 15
Specifies the amount of VRAM used in the system.

 VRAMSZ
 VRAM capacity
 0
 4M bits
 1
 8M bits

Be sure to set this bit before writing data to VRAM.

Version number bits : Version number bits (VER3 to VER0), bits 3 to 0
Represents the version number of VDP2. Initially it is 0.


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