The book " The ZX Spectrum ULA: How to Design a Microcomputer
" by Chris Smith is a seminal work for retrocomputing enthusiasts, offering a comprehensive, transistor-level deconstruction of the Sinclair ZX Spectrum's custom heart. Published in 2010 by ZX Design and Media, it serves as both a historical record and a practical technical manual for designing 8-bit hardware. The Role of the ULA (Uncommitted Logic Array)
At the center of the ZX Spectrum's design was the Ferranti ULA, a semi-custom logic chip that allowed Clive Sinclair to significantly reduce manufacturing costs. The ULA was responsible for several critical functions:
Video Generation: It read data from video memory and converted it into signals for a television set.
Memory Contention: It managed the priority between the Z80 CPU and video display needs, often pausing the CPU to avoid screen flickering. System Timing: It generated the 3.5 MHz clock for the CPU.
I/O Management: It handled keyboard scanning and audio input/output via the cassette interface. Key Technical Insights from the Book
Chris Smith’s work is highly regarded for its reverse-engineering approach, which involves stripping the chip down to its circuit diagrams.
In the annals of computing history, few machines evoke as much nostalgia and technical fascination as the ZX Spectrum. Released in 1982 by Sinclair Research, it wasn’t just a computer; it was a masterclass in minimalist engineering. At the heart of this "rubber-keyed" wonder sat a single, mysterious chip: the Uncommitted Logic Array, or ULA.
Designing a microcomputer—whether a 1980s retro classic or a modern FPGA-based recreation—revolves around the delicate dance between the CPU and its supporting logic. This article explores how the ZX Spectrum ULA redefined hardware design and what it takes to recreate that magic today. 1. The Heart of the Machine: What is a ULA?
In the early 80s, building a computer typically required dozens of discrete logic chips. Sir Clive Sinclair, obsessed with reducing costs and size, turned to Ferranti’s ULA technology.
A ULA is a "semi-custom" chip. Ferranti would manufacture a base wafer with thousands of unconnected logic gates. A customer (like Sinclair) would then provide a single final metal layer to "wire" those gates into a specific circuit. This was the precursor to the modern Gate Array and FPGA. Key functions of the ZX Spectrum ULA included:
Video Generation: It read data from the "Lower RAM" (0x4000 to 0x7FFF) and converted it into signals for a television.
Clock Management: It generated the 3.5 MHz clock for the Z80 CPU.
Memory Contention: This is the ULA’s most famous "quirk." Since the ULA and CPU both need the memory to function, the ULA would "halt" the CPU clock whenever it needed to draw the screen, leading to what programmers call contended memory.
I/O Handling: It managed the keyboard matrix, the "beeper" speaker, and the cassette tape interface. 2. Designing the "ZX Design" Architecture
To design a microcomputer in the style of the Spectrum, you must balance three primary pillars: Cost, Compatibility, and Complexity. The Z80 CPU
was the brain of the operation. Unlike the MOS 6502 (used in the Apple II or Commodore 64), the Z80 featured a rich instruction set that made it a favorite for software developers. In a modern "ZX Design" project, engineers often use IP cores—digital descriptions of the Z80 that can run on an FPGA. The Memory Map The Spectrum's architecture is iconic for its simplicity: 0000–3FFF: 16KB ROM (containing Sinclair BASIC). 4000–7FFF: 16KB "Lower RAM" (Contended by the ULA). 8000–FFFF: 32KB "Upper RAM" (Fast, uncontended memory). The Video Display The book " The ZX Spectrum ULA: How
The ULA produced a 256x192 pixel display with a limited but bright 15-color palette (8 colors with two brightness levels, plus black). Its unique "attribute" system—where color was applied to 8x8 pixel blocks—saved memory but led to the infamous "attribute clash" where a character's color would bleed into the background. 3. Modern Recreations: From ULA to FPGA
Because original ULAs are no longer manufactured and prone to overheating, the retro community has turned to modern technology to keep the Spectrum alive.
FPGA Implementations: Projects like the ZX Spectrum Next or ZX Fusion use Field-Programmable Gate Arrays to recreate the ULA’s logic with cycle-perfect accuracy. These allow for modern luxuries like HDMI output and SD card storage while running original Sinclair BASIC code.
The Harlequin Project: A famous "super-clone" that replaces the ULA with standard, off-the-shelf logic chips, effectively "reverse-engineering" the ULA back into its component parts so hobbyists can solder their own computer from scratch. 4. Why "ZX Design" Matters Today
Studying the ZX Spectrum ULA isn't just for collectors; it's a lesson in efficient design. In an era of multi-gigabyte apps, the Spectrum reminds us what is possible with just 48KB of RAM and a cleverly designed custom chip. Whether you are a hardware enthusiast or a coder, the "ZX Design" philosophy—doing more with less—remains a foundational principle of great engineering.
The ZX Spectrum ULA: How to Design a Microcomputer is a technical masterclass by Chris Smith that serves as the definitive forensic analysis of the Sinclair ZX Spectrum’s custom heart. Published by ZX Design Technology and Media
in 2010, the book is the result of Smith's years-long effort to reverse-engineer the Ferranti Uncommitted Logic Array (ULA) down to the transistor level. Core Technical Focus
The book meticulously documents how the ULA managed nearly every critical function of the computer within a single chip, including: Video Display Generation : Explains the precise timing and pixel clock
(7 MHz) used to produce the PAL video signal and the iconic color attribute system. Memory Management
: Details the "contention" that occurs when both the CPU and ULA attempt to access the lower 16K of RAM simultaneously. I/O Handling
: Covers the management of keyboard input, tape loading (EAR/MIC), and internal audio. www.amazon.com Key Sections and Content
The 324-page volume is structured to take a reader from basic semiconductor theory to full system implementation: www.librador.com The ZX Spectrum Ula: How to Design a Microcomputer - Amazon
The Ferranti Uncommitted Logic Array (ULA) was the "secret sauce" of the Sinclair ZX Spectrum. It packed an entire motherboard of logic into a single chip, making the computer affordable for the masses. 🕹️ The Role of the ULA
The ULA acted as the traffic controller for the entire system. It managed: Video Generation: Reading memory to produce the TV signal. Memory Management: Handling access between the CPU and RAM.
I/O Control: Managing the keyboard, cassette port, and speaker. System Clock: Providing the timing for the Z80 processor. 🛠️ Key Design Challenges
Designing a microcomputer around a ULA required overcoming specific hurdles: Final Verdict The ZX Spectrum ULA is not
Contended Memory: Both the CPU and ULA need the RAM. The ULA wins, "pausing" the CPU to draw the screen.
Heat Dissipation: These chips ran notoriously hot, often leading to failures in early models.
The "Attribute" Limit: To save memory, color was limited to 8x8 blocks, creating the famous "color clash." 💡 Modern Engineering Lessons
If you are studying Chris Smith's The ZX Spectrum ULA or building your own retro project, keep these takeaways in mind:
Integration is King: Moving discrete logic into one chip reduces cost and footprint.
Timing is Everything: Microsecond-perfect synchronization is required for stable video signals.
Work Within Constraints: The Spectrum’s quirks (like color clash) became its iconic aesthetic. 🚀 Resources for Builders
Logic Analyzers: Essential for debugging ULA-based timing issues.
FPGA Recreations: Projects like the ZX Uno use FPGAs to mimic ULA logic perfectly.
Schematics: Study the "Issue 2" motherboard to see the simplest ULA implementation.
If you'd like to dive deeper into the exact logic gates used for video timing or need help troubleshooting a specific hardware issue on an original board, let me know!
The ZX Spectrum ULA: How to Design a Microcomputer is a comprehensive technical book by Chris Smith, published by ZX Design Technology and Media. It serves as a deep-dive case study into the Sinclair ZX Spectrum's custom "heart"—the Ferranti Uncommitted Logic Array (ULA). Feature Overview
The book is widely considered the definitive resource for understanding the ZX Spectrum's internal hardware. It documents Smith's multi-year effort to reverse-engineer the chip down to the transistor level.
Core Focus: It explores how the ULA manages video display generation, memory contention, and I/O for the keyboard and cassette.
Design Principles: Smith uses the Spectrum as a template to teach the principles of designing a cost-effective 8-bit microcomputer.
Technical Detail: Contains over 140 illustrations and circuit diagrams, making it a guide for electronics hobbyists or students interested in retro-computing. Start with a 40-pin CPLD
Educational Path: Topics start with general microcomputer architecture and the Ferranti manufacturing process before moving into the specific functional layout of the Spectrum. Key Hardware Insights
The book uncovers several technical "secrets" and historical quirks of the 1980s icon:
"The Snow Effect": A famous design bug explained through memory contention and timing analysis.
Memory Management: Details how the ULA handles the shared 16KB bank of RAM where both the CPU and the display circuitry compete for access.
PAL Video Standard: Documentation of how the ULA generates video signals, including deviations from standard PAL sync signals.
ULA Variations: A breakdown of the differences between various production versions of the chip.
The ZX Spectrum ULA is not a "graphics chip" like the VIC-II or the TMS9918. It is a minimal Turing-complete video memory arbiter that just barely worked.
If you want to design a retro computer today:
Because the magic of the Spectrum wasn't despite the ULA—it was because of it.
Further digging:
In the pantheon of classic hardware, few devices inspire as much forensic engineering fascination as the ZX Spectrum. Released in 1982, Sir Clive Sinclair’s machine democratized computing for a generation. But ask any hardware hacker what the Spectrum’s "soul" is, and they won’t point to the Z80 CPU. They will point to a single, unassuming black blob of epoxy or a ceramic chip: The ULA (Uncommitted Logic Array).
Understanding the ZX Spectrum ULA is not just an exercise in retro nostalgia; it is a masterclass in how to design a microcomputer when you have no money, no room, and zero tolerance for excess components.
This article deconstructs the genius, the compromises, and the brutal efficiency of the Spectrum’s core logic. Whether you are building a ZX Design retro computer from scratch or simply want to understand how 1980s British engineers beat Japan at their own game, read on.
The ULA (Type 5C112E) is a 40-pin DIP package containing roughly 4,000 gates. It performs three distinct, conflicting tasks on a cycle-by-cycle basis:
module ula( input clk_14M, input nRST, inout [7:0] data_bus, input [15:0] address, output nWAIT, output nINT, output composite_video );
// Video timing counters & sync generation... // Memory contention logic... // Keyboard scan on IOREQ & A0 low... endmodule