Assembly Language Fundamentals

Intermediate
Version:
1.1

The VDP

Introduction

Every pixel, character, and line that appears on the Tatung Einstein’s display is powered by one fundamental concept: Screen RAM. This is a dedicated block of memory that the video hardware reads many times per second to decide exactly what should be shown on screen.

Unlike modern systems, where your program might call a graphics library to “draw” directly, on the Einstein your program describes the screen in memory. The video hardware, driven by a dedicated chip called the Video Display Processor (VDP), constantly reads this memory and turns it into a live picture.

Once you understand how Screen RAM works and how the VDP uses it, you have the foundation for everything else: text, tiles, sprites, scrolling backgrounds, and pixel-perfect graphics.

The VDP: The Engine Behind the Screen

At the heart of the Einstein’s video system is a Texas Instruments chip called the TMS9129A, known as the Video Display Processor. This chip’s job is simple but powerful:

  1. Your Z80 program writes display data into Screen RAM.
  2. The VDP reads that data, about 50 times every second.
  3. The VDP uses the data to generate the video signal for the monitor.
  4. Each byte in Screen RAM represents something visible on screen
  5. In text mode, bytes represent characters.
  6. In graphics mode, bits represent pixels.

The CPU itself never “draws” the screen. Instead, the VDP does all the heavy lifting. That means if you change the data in Screen RAM, the display will update automatically the next time the VDP reads it, no redraw commands, no screen refresh functions.

Two Ways the VDP Uses Screen RAM

The TMS9129 can interpret Screen RAM in different ways depending on the display mode. There are a few modes, but the two most important are text mode and graphics mode.

Text Mode: Fast and Structured

In text mode, the screen is treated as a grid of character cells, 40 columns by 24 rows. Each cell corresponds to a single byte in Screen RAM, which stores a character code (like an ASCII number or an index into a font table).

When the VDP reads this memory:

This approach is very efficient: updating a single character on screen only requires changing one byte in memory. That’s why text mode is ideal for interfaces, menus, status screens, and text-based games.

The trade-off is that you’re limited to predefined character shapes (unless you redefine them) and you don’t have direct control over individual pixels.

Graphics Mode: Fine-Grained Pixel Control

Graphics mode works differently. Instead of storing character codes, Screen RAM now holds raw pixel data, individual bits that directly turn pixels on or off.

This gives you full creative freedom: you can draw anything you want, from lines and shapes to detailed game graphics. But it also increases complexity and memory use, you must calculate the correct memory locations and bit patterns yourself, and updating many pixels is slower than updating a single character.

Sprites: Hardware Help on Top of Screen RAM

While Screen RAM handles the background and static display, the VDP also supports sprites, small, independent graphic objects that can move around the screen without changing the underlying memory.

Sprites have their own memory space and are drawn by the VDP over the background layer. You control them simply by updating their position and appearance data. The VDP handles movement, layering, and collision detection automatically.

This feature is vital for games and animations, where characters and objects need to move smoothly without constantly redrawing the screen.

Why Understanding Screen RAM Matters

Everything in the Einstein’s display system is built on one simple principle: the screen is a direct reflection of memory.

Once you understand this memory-driven approach, everything else, from drawing lines to creating animations, becomes much easier to reason about. Your program doesn’t draw in the way a human would; it builds a description of the screen in memory, and the hardware turns that description into an image dozens of times per second.

Summary

Mastering how the VDP reads and interprets Screen RAM is the essential first step. In the next lesson, you’ll start putting this knowledge into practice, learning how to talk to the VDP directly and plotting your very first pixels on the screen.

Previous Module
Next Module