User Tools

Site Tools


Graphics Memory

The GameTank has two kinds of memory involved in graphics and video. Both are accessed in the range $4000-$7FFF when each is banked in by the system control registers.

When DMA_ENABLE is unset then DMA_CPU_TO_VRAM determines whether the CPU accesses the Framebuffers (when flag is 1) or Sprite RAM (when flag is 0).


The framebuffers are a region of memory that is directly output to the connected TV. The system uses a double framebuffer, meaning there are two 128×128 image buffers that can be drawn to or displayed separately.

System control registers determine which buffer is read by the video hardware and which is accessed by the CPU or the blitter.

Sprite RAM

Sprite RAM is a set of eight 256×256 pixel buffers. These are not directly displayed but serve as the source data for a blitter copy.

The blitter may read anywhere within a 256×256 page as a contiguous region. When accessed by the CPU however, only one quadrant of the currently selected sprite page is mapped in at a time.

The values of GX and GY last used by the Blitter will also influence which part of Sprite RAM the CPU can access in addition to the Banking Register. The video section of the memory map is only big enough for a 128×128 region. So the quadrant of Sprite RAM available to the CPU is determined by the most significant bit in the Sprite RAM coordinate counters. Typically these would be set before loading sprites by running a single-pixel blit operation copying from the target quadrant to an off-screen portion of the framebuffer.

graphics/memory.txt · Last modified: 2023/12/17 23:10 by clyde