The Zx Spectrum Ula- How To Design A Microcomputer -zx Design Retro Computer- Access
To solve this without adding expensive dual-port RAM, the ULA implements . When the ULA is actively drawing the visible part of the screen, it takes absolute priority over the memory bus. If the Z80 CPU tries to access the lower RAM at that exact moment, the ULA dynamically pauses the CPU by halting its clock signal or pulling the Z80's WAIT line low. The CPU is only allowed to proceed during the brief microsecond windows when the ULA is drawing the screen borders or processing a horizontal blanking interval. 4. Keyboard Matrix Scanning
To understand the ULA, we must first understand the technology behind it. In the late 1970s and early 1980s, building a computer from standard TTL (transistor‑transistor logic) chips required dozens of separate integrated circuits, each performing a single function — counters, multiplexers, flip‑flops, and so on. The results were large, power‑hungry and expensive boards.
The book " The ZX Spectrum ULA: How to Design a Microcomputer
The ZX Spectrum ULA: How to Design a Microcomputer by Chris Smith is a comprehensive technical analysis covering the reverse-engineering and functional design of the Sinclair ZX Spectrum's Uncommitted Logic Array. The text details ULA operation, including video timing, memory contention, and the "snow effect," providing essential documentation for hardware cloning and modern FPGA implementations. For more information, visit zxdesign.info 0;ba4;0;819;. 0;16;
By creating one complex IC, Sinclair reduced the PCB (Printed Circuit Board) size, lowered assembly costs, and reduced the probability of hardware failure. To solve this without adding expensive dual-port RAM,
| Component | Specification | | :--- | :--- | | | Z80 bus, 3.5MHz contended, 7MHz uncontended (ROM) | | Memory Map | 16K ROM (0x0000), 48K RAM (0x4000) - no linear frame buffer | | Video RAM | 0x4000 to 0x5AFF (Pixels) + 0x5B00 to 0x5EFF (Attributes) | | Pixel format | Bit 1 = Bright, Bit 0 = Pixel. Two pixels per byte. | | Attribute byte | Bit 7 = Flash, Bit 6 = Bright, Bits 5-3 = Paper (BG), Bits 2-0 = Ink (FG) | | Contention pattern | CPU waits when accessing 0x4000-0x7FFF during active scanline. |
To keep the video stable, the ULA uses a 14 MHz clock derived from the Spectrum’s crystal oscillator. From this master clock, it generates all the timing signals for the display, including horizontal and vertical synchronisation pulses, blanking intervals and the pixel clock itself. The ULA also produces the CPU clock, which is a divided version of the 14 MHz signal — typically 3.5 MHz for the Z80.
Instead of populating the motherboard with dozens of discrete logic chips (which would have been costly and power-hungry), Sinclair used a custom . Imagine a silicon wafer pre-loaded with thousands of unconnected logic gates. The manufacturer would then apply a final metallization layer to connect these gates into a specific circuit defined by the client. This "semi-custom" approach was the cutting edge of cost-cutting technology, allowing Sinclair to create a purpose-built chip that performed the functions of multiple ICs for a fraction of the board space.
The ULA's primary functions include:
The benchmark resource for this architecture is the highly regarded book, The ZX Spectrum ULA: How to Design a Microcomputer by Chris Smith. It meticulously documents how Sinclair Research managed to engineer a revolutionary home computer utilizing nothing more than a standard television set and a consumer cassette recorder. 🏛️ The Architecture of an 8-Bit Microcomputer
The ULA was primarily a video controller. It generated the master clock signals for the entire system, deriving them from a 14MHz crystal oscillator. It was responsible for dividing this clock down to drive the Z80 CPU at 3.5MHz. Simultaneously, it handled the horizontal and vertical synchronization signals (HSYNC and VSYNC) required to display a steady image on standard PAL or NTSC television sets. Memory Arbitrating (The Contended Memory Problem)
(7 MHz) used to produce the PAL video signal and the iconic color attribute system. Memory Management
18;write_to_target_document7;default0;2dc;18;write_to_target_document1a;_XGrtac6NMbbz4-EP_-fH0Qk_20;92;0;a3; The CPU is only allowed to proceed during
An Uncommitted Logic Array was the precursor to modern FPGAs (Field Programmable Gate Arrays) and ASICs (Application-Specific Integrated Circuits).
Early issues of the Spectrum also suffered from a keyboard scanning bug that prevented some keys from being recognised correctly. This was fixed in a legendary hack: a small “spider” board containing a 74LS00 chip was mounted upside down next to the CPU, connected by bodge wires to correct the ULA’s flawed logic. Later ULA revisions (such as the 5C112) incorporated the fix directly.
Sinclair’s engineers designed a final, single metal layer to mask over these gates, interconnecting them into a specific, highly customized circuit architecture. This bypassed the astronomical costs of designing a fully custom microchip from scratch, allowing a small company to wield custom silicon power on a budget. Core Responsibilities of the Spectrum ULA