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

Chapter 3 RAM


A dedicated VRAM for defining pattern name tables, character patterns, etc. is connected to VDP2. VRAM is divided into two parts of equal capacity called VRAM-A and VRAM-B, respectively. VRAM-A and VRAM-B can be divided into two with the same capacity, called bank 0 and bank 1, respectively. The four banks with 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
 Always when the display format is cell format.
Data that must be defined
 Display format is bitmap
For formats, be sure to define
data that must be
 Data defined as required
 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. A program written for a system using 4Mbits of VRAM can also be used on a system using 8Mbits of VRAM, but not vice versa.

The address map changes as shown in Figure 3.1 depending on the amount of VRAM used in the system.

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 readable and writable 16-bit register located at address 180006H. However, bits 3-0 are read-only bits. The value of bit 15 (VRAMSZ) is cleared to 0 after power-on or reset, so be sure to set it.

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

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

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

 VRAMSZ
 VRAM capacity
 0
 4Mbit
 1
 8Mbit

This bit must be set before writing data to VRAM.

Version number bit : Version number bit (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