How Sinclair ZX Spectrum+ Generated Border Colors
The Sinclair ZX Spectrum+ produced its iconic colored borders through a dedicated hardware mechanism managed by its Uncommitted Logic Array (ULA), which controlled video output timing and color registration outside the main display area. This article explores the technical architecture behind the border generation, details the specific I/O port used to define the color value, and explains how the ULA synchronized these signals during the video blanking intervals to create the distinctive frame surrounding the pixel grid.
At the heart of the video generation process was the custom ULA chip, which coordinated the Z80 processor and the DRAM to produce the video signal. The screen layout was strictly defined into a central pixel area and a surrounding border region. While the central area fetched pixel and attribute data from memory to construct the image, the border area required no memory fetches for pixel data. Instead, the ULA simply output a solid color signal during the horizontal and vertical periods that fell outside the active display coordinates.
Control over this border color was achieved through a specific hardware register mapped to I/O port 0xFE. When software wrote a value to this port, the lower three bits determined the color based on the Spectrum’s standard eight-color palette. Because the border color was stored in a hardware latch rather than video memory, changing it was extremely fast and did not consume valuable CPU cycles needed for game logic or screen rendering. This allowed developers to alter the border color mid-frame for special effects without disrupting the main display.
The limitation of this system was that only one color could be displayed across the entire border at any given moment. Unlike the pixel area, which could utilize color attributes per 8x8 block, the border remained a uniform shade. Despite this restriction, the feature became a staple of Spectrum software, often used during loading screens to indicate progress or in games to signal status changes. The simplicity of the hardware design ensured that the Sinclair ZX Spectrum+ maintained its characteristic look, with the vibrant border serving as a visual hallmark of the platform.