VRAM

From MegaDrive Wiki
Jump to: navigation, search

VRAM is a memory segment on graphics systems in computers that is used to hold pattern data (for tiled VDPs) or bitmap data, in the case of a bitmap VDP. It is common for video adaptors to not map the video memory directly into I/O space, nor allow instant read/writes to it during active display. Most times, VRAM is DRAM or SDRAM, although in rare cases it may be SRAM or another variation of DRAM.

Mega Drive VDP VRAM

The two µPD41264 graphics memories on a Model 1 Mega Drive

The Mega Drive's VDP has 64 KB of dual-port graphics buffer memory. To get the required 8 bits of memory bandwidth, two µPD41264's are used in ZIP package, with addresses and control signals shared. The DRAM has two data ports, one for serial reading and a regular 4 bit random access port, a basic dual-port memory. The DRAM requires 256 (one per row) refresh cycles per 4 ms which is accomplished through /CAS before /RAS refresh. During active display, a limited number of access slots are available to the VRAM, one per 32 pixels.

32X

The 32X also has VRAM, but instead of being outputted depending on sprites, tiles, and so on, it is a simple framebuffer. All rendering for it has to be done in software, which is usually what one or both of the SH2's are tasked with. The framebuffer can be put into various modes, allowing more colours, or a palette mode in which each pixel is an offset into a CRAM table.

A unique (but common to modern hardware) feature at the time was that the 32X was equipped with two different sets of VRAM, which allows for a technique called double buffering. By using double buffering, the VDP outputs one framebuffer while the processors are free to draw on the other framebuffer with none of the access restrictions usually imposed by having to access the video memory while the VDP is outputting a video signal, allowing for faster drawing and the ability to do more graphically complex operations.