The Zx Spectrum Ula- How To Design A Microcomputer -zx Design Retro Computer- -
A ULA was a forerunner to modern Programmable Logic Devices (PLDs) and Field-Programmable Gate Arrays (FPGAs). Ferranti mass-produced master silicon wafers containing uncommitted logic gates. A customer like Sinclair would then specify a single, custom top-metal layer to interconnect these gates into a specific circuit design. This process eliminated the massive engineering costs of a fully custom Application-Specific Integrated Circuit (ASIC). The Functional Layout: Core Duties of the ULA
Your HDL code must monitor the CPU's memory request ( MREQ ) and address lines. If the address is below 0x8000 (the lower 16KB of RAM) and your video counters show the ULA is reading pixels, halt the CPU simulation until the ULA finishes its burst. Legacy of the ULA
Because the ZX Spectrum does not use expensive dual-port RAM, both the Z80 CPU and the ULA must share the 16KB contended RAM block via the same data and address buses. The ULA must scan this memory 50 times a second to render images to a television screen.
block of pixels shares a single byte specifying one of 8 foreground colors, one of 8 background colors, brightness, and flash state. Because of this A ULA was a forerunner to modern Programmable
However, the first ULA had a darker secret. It ran hot. In the rush to pack so much logic into the chip, the power consumption was higher than anticipated. The prototype machines, encased in the sleek black plastic designed by Rick Dickinson, would overheat after an hour of use.
Dynamic RAM (DRAM) forgets its data if it isn't refreshed constantly. While the standard Z80 CPU has a built-in refresh mechanism, the Spectrum's specific architecture required the ULA to handle memory refreshing during its video cycles, saving money on external refresh circuitry. 4. Peripherals and I/O Port Decoding
, a precursor to modern FPGAs. It was a "blank slate" of logic gates that could be custom-wired at the factory to replace nearly all the support circuitry of a microcomputer in one single chip. Core Functions: The ULA’s Busy Schedule This process eliminated the massive engineering costs of
During active screen drawing, the ULA follows a : it fetches a bitmap byte, an attribute byte, the next bitmap, and the next attribute, then releases the CPU for 4 T‑states before repeating. This cycle continues line by line until the beam reaches the border, where contention stops completely.
Early microcomputers had chaotic I/O. The Spectrum uses a "partial decode" strategy. To save transistors in the ULA, the Spectrum doesn't check all 16 address lines for I/O. Usually, it checks only the lower 8.
FFFF) bypasses the ULA entirely. The CPU can access this upper region at top speed without any execution delays. 🕹️ Input/Output and Hardware Anomalies Legacy of the ULA Because the ZX Spectrum
0;e8a;0;2cb; 0;908;0;f1; 0;88;0;98; 0;279;0;17a; 0;1234;0;b19;
This reverse‑engineering work has been central to many community projects. For example, the ULA is often the most sought‑after component for repairs, and modern replicas have become vital resources for keeping vintage machines alive.