The Zx Spectrum Ula How To Design A Microcomputer Zx Design Retro Computer Portable [Essential ◉]
Let’s design a modern, portable Spectrum clone. We will call it the "ZX LapPak."
An FPGA (e.g., Lattice iCE40 UP5K or Sipeed Tang Nano) can replicate the ULA’s parallel logic exactly.
Advantages:
Architecture:
Key VHDL/Verilog snippet – Contended memory state machine:
always @(posedge clk_14m) begin
if (hcount < 128) begin // 64 us fetch period
mem_oe = 1; // ULA reads screen
cpu_wait = 1; // Stall Z80
end else begin
mem_oe = 0;
cpu_wait = 0;
end
end
Before soldering, we must redefine the goal. A "portable" retro computer is not just a Spectrum in a lunchbox. It must adhere to three constraints:
The true art of how to design a microcomputer here is re-timing. The original Spectrum relied on a 14.218MHz master crystal (4x the 3.5469MHz pixel clock). For a portable with an LCD, you don’t need a PAL TV signal. You can generate 60Hz VGA or HDMI, but you must maintain 100% timing compatibility with the Z80 software. This is the "ULA replacement" problem.
If you want, I can:
Which of those would you like next?
The ZX Spectrum ULA: How to Design a Microcomputer - A Journey into Retro Computing
The ZX Spectrum, released in 1982, was one of the most popular home computers of the 1980s. Its success can be attributed to its affordability, accessibility, and the creativity of its users. At the heart of the ZX Spectrum lies the Uncommitted Logic Array (ULA) chip, a custom-designed integrated circuit that played a crucial role in the machine's performance and capabilities. In this article, we'll delve into the world of retro computing and explore how to design a microcomputer using the ZX Spectrum ULA.
What is a ULA?
A ULA is a type of integrated circuit that contains a large number of logic gates, which can be connected to perform specific functions. In the case of the ZX Spectrum, the ULA (U8066) was designed by Ferranti, a leading semiconductor company, in collaboration with Sinclair Research Ltd., the company behind the ZX Spectrum. The ULA chip contains 22,000 logic gates, which was a significant number for its time.
The Role of the ULA in the ZX Spectrum
The ULA chip in the ZX Spectrum performed several critical functions:
Designing a Microcomputer with a ULA
To design a microcomputer using a ULA, you'll need to understand the basics of digital logic, computer architecture, and integrated circuit design. Here's a step-by-step guide to get you started:
Challenges and Considerations
Designing a microcomputer with a ULA is a complex task that requires careful consideration of several factors:
Retro Computing and Portable Design
The ZX Spectrum's portability and compact design were key factors in its popularity. When designing a retro-style microcomputer, consider the following:
Tools and Resources
To get started with designing a microcomputer using a ULA, you'll need: Let’s design a modern, portable Spectrum clone
Conclusion
The ZX Spectrum ULA is an iconic example of innovative design in the early days of personal computing. By understanding the principles behind the ULA and the challenges of designing a microcomputer, you can create your own retro-style computer or even a modern portable device. While the design process can be complex, the rewards are well worth the effort. So, if you're up for the challenge, grab your tools, and start designing your own microcomputer with a ULA!
Additional Resources
For those interested in exploring more:
Get Building!
Now that you've read about the ZX Spectrum ULA and the process of designing a microcomputer, it's time to get started on your own project! Share your experiences, ask questions, and showcase your creations with the retro computing community. Happy building!
The ZX Spectrum’s Uncommitted Logic Array (ULA) is the heart of Sinclair’s 1982 masterpiece. It represents a masterclass in cost-effective engineering, condensing what would have been dozens of discrete chips into a single custom component. What is the ULA?
In the early 80s, building a microcomputer usually required a "glue logic" board filled with standard chips to manage memory and video. Sinclair contracted Ferranti to create a custom ULA—a semi-custom chip where the logic gates were pre-fabricated, but the final metal layer was "committed" to Sinclair’s specific design. This reduced the part count, lowered costs, and made the Spectrum’s small form factor possible. Key Functions
The ULA is the "traffic cop" of the system, handling three critical tasks:
Video Generation: It reads the display data from RAM, translates it into pixel and color information, and generates the television signal.
Memory Management: It manages the bus between the Z80 CPU and the RAM. To avoid "snow" on the screen, it often pauses the CPU (contention) when both need access to memory simultaneously.
I/O Control: It handles the "beeper" sound, the tape recorder interface for saving/loading data, and the iconic rubber keyboard matrix. Designing a Modern "Retro" Version
If you are looking to design a portable or modern ZX-compatible machine today, you generally have two paths:
The FPGA Approach: Most modern recreations (like the ZX Spectrum Next) use an FPGA (Field Programmable Gate Array) to "clone" the ULA’s logic at the hardware level. This allows for 100% accuracy and the ability to add "enhanced" ULA modes (more colors, higher resolution).
The Discrete Logic Approach: Enthusiasts often use "Harlequin" boards, which replace the single ULA chip with many small, widely available 74-series logic chips. This is great for learning exactly how the timing and video generation work step-by-step. Designing for Portability
To make a ZX design portable, the ULA logic must be integrated into a low-power system. Modern builders often pair an FPGA or a microcontroller (like the ESP32 or Pi Pico) with a small LCD. Since the original ULA output a composite/RF signal for old TVs, a modern portable design requires the ULA code to output VGA or HDMI signals compatible with modern panels.
The ULA remains a focal point for retro-engineering because it defines the "personality" of the Spectrum—from its unique color clash to its specific timing quirks.
The ZX Spectrum ULA: How to Design a Microcomputer " by Chris Smith is widely considered a "masterclass in technical forensics" and the definitive guide for understanding the "soul" of the Sinclair ZX Spectrum. Based on extensive reverse-engineering of the original Ferranti Uncommitted Logic Array (ULA) chip, the book provides a transistor-level deconstruction of the hardware that powered the iconic 1980s microcomputer. Key Strengths
Comprehensive Reverse-Engineering: The author exposes the inner workings of the ULA in minute detail, featuring over 140 illustrations and circuit diagrams.
Educational Depth: Beyond just documentation, the book acts as a case study for designing an 8-bit microcomputer, covering memory contention, video display generation, and timing.
Unveiling "Hidden Secrets": It documents known design bugs like "The Snow Effect" and subtle hardware quirks that were previously undocumented for decades.
Actionability for Modern Projects: Reviewers note that the level of detail is sufficient to help hobbyists create their own Spectrum replicas or replacement ULAs using modern FPGA or CPLD devices. Reader Considerations Architecture :
The ZX Spectrum Ula: How to Design a Microcomputer ... - Amazon.de
Designing a retro microcomputer based on the ZX Spectrum involves understanding its "heart"—the Uncommitted Logic Array (ULA). This custom chip replaced dozens of discrete logic components, making the original Spectrum affordable and compact. The Core: The ZX Spectrum ULA
The ULA is the central manager for the microcomputer's timing and peripherals.
Video Generation: It reads the lower 6,912 bytes of RAM 50 times per second to generate the 256x192 pixel display and 32x24 attribute grid.
Clock Management: It takes a 14 MHz master clock, dividing it to provide a 7 MHz pixel clock and a 3.5 MHz clock for the Z80 CPU.
Memory Contention: To avoid collisions, the ULA has priority access to the "lower RAM" (0x4000 to 0x7FFF) for video drawing. If the CPU tries to access this area at the same time, the ULA halts the CPU clock, a behavior known as contention.
Peripherals: It handles keyboard scanning, border color control, and the "beeper" sound output/input. Designing a Modern Retro Microcomputer
To build a functional clone or inspired design today, you have three primary paths: 1. Discrete Logic (The "Harlequin" Method)
You can replicate the ULA's functions using standard, off-the-shelf logic chips.
Project Example: The Harlequin is a 100% compatible Spectrum clone that uses discrete through-hole parts instead of the custom ULA.
Advantage: Uses readily available parts and avoids "ULA bugs" like the "snow effect". 2. FPGA-Based Design
Field-Programmable Gate Arrays (FPGAs) can be programmed to act exactly like the original hardware at a gate level. Hardware: Boards like the or ZX Spectrum Next
use FPGAs to run "cores" that simulate the ULA and Z80 with high accuracy.
Enhancements: This path allows for modern features like VGA/HDMI output, SD card storage (via interfaces like DivMMC), and "ULAplus" for expanded color palettes. 3. Microcontroller Emulation
For a simpler, more portable build, use a powerful microcontroller to emulate the hardware in software. Example: The Raspberry Pi Pico Go to product viewer dialog for this item.
can run emulators that mimic the Z80 and ULA, driving a small LCD screen for a handheld device.
Connectivity: These often use a matrix-wired tactile keyboard connected to the microcontroller's I/O pins. Creating a Portable "Pocket" Design
If your goal is a portable device, focus on these integration steps: Building a Pocket ZX Spectrum | PDF - Scribd
The text you provided is the title of a highly regarded technical book by Chris Smith The ZX Spectrum ULA: How to Design a Microcomputer Published in 2010 by ZX Design and Media
, it is a definitive resource for retro-computing enthusiasts interested in the internal architecture of the Sinclair ZX Spectrum. Core Content & Technical Focus The book is a 324-page deep dive into the Uncommitted Logic Array (ULA)
, the custom Ferranti chip that served as the "heart" of the Spectrum, handling video generation, audio, and I/O.
The genius of the ZX Spectrum ULA was doing more with less. In a portable remake, you shouldn't copy its limitations (low-res composite, heavy power draw, heat). Instead, use an RP2040 or small FPGA to behave like a ULA while giving you modern interfaces: SPI LCD, SD card, USB, and Li-Ion power. Key VHDL/Verilog snippet – Contended memory state machine:
The result isn't a "clone" – it's a re-imagined portable ZX machine that fits in your pocket, boots instantly, runs original software (via .tap/.z80 files), and respects the spirit of the original: clever hardware design that punches above its weight.
Pro tip: If you want a weekend project, start with a ZX81 ULA replacement first – it's simpler (monochrome, no contention). Then scale up to the Spectrum's color and timing complexity.
Happy building, and remember – every cycle counts when you're stealing them from the Z80
Designing a retro microcomputer based on the ZX Spectrum architecture requires mastering the Uncommitted Logic Array (ULA), the custom chip responsible for video generation, memory management, and I/O. Core Architecture of the ZX Spectrum ULA
The original ULA was a custom Ferranti chip that integrated several discrete logic functions into one package to reduce costs. Key responsibilities included:
Video Generation: Fetching pixel and attribute data from memory and converting it into a composite video signal.
Clock Management: Dividing a 14MHz master clock to provide 7MHz for video and 3.5MHz for the Z80 CPU.
Memory Contention: Delaying the CPU's access to the lower 16KB of RAM when the ULA needs it for the display, leading to "contended memory" behavior.
Peripherals: Handling keyboard input, tape EAR/MIC ports, and beeper sound. Modern Design & Implementation Strategies
For a modern retro-build or portable device, you can replace the original ULA using these methods: ZX MAX 128 ZX Spectrum Clone Build
The year was 1982, and the air in Richard’s workshop was thick with the scent of solder and ozone. On his desk sat a "dead" ZX Spectrum
, its iconic rainbow stripe mocking him while its screen remained a stubborn, frozen pattern of black and white blocks.
Richard wasn’t just a hobbyist; he was a dreamer who wanted to shrink the power of Clive Sinclair's masterpiece into something that could fit in a coat pocket. To do it, he had to master the "Black Box" at the heart of the machine: the Uncommitted Logic Array (ULA) The Secret Heart
In those days, most computers were a mess of dozens of tiny chips. But the Spectrum was different. The
was a custom-designed piece of silicon that did the work of forty chips at once. It handled the video display, managed the memory timing, and even "spoke" to the tape recorder [2, 3].
Richard spent nights poring over blurry technical manuals. He learned that the ULA was the gatekeeper
. It had to constantly "steal" time from the Z80 processor to draw the screen, a delicate dance called contended memory
[3]. If the timing was off by even a microsecond, the whole system crashed. The Portable Vision
"It needs to be smaller," Richard muttered, sketching a clamshell design in his notebook. His plan for the "ZX-Portable" Replacing the ULA:
Since original Ferranti ULA chips were hard to find, he decided to use a modern CPLD (Complex Programmable Logic Device) to mimic the old silicon's logic [4]. The Screen: Instead of a heavy CRT television, he wired up a 3.5-inch used for car backup cameras. He swapped the bulky power brick for a Lithium-Polymer battery
, using a voltage regulator to keep the delicate 5V rails steady. The First Boot
After six months of burnt fingertips and thousands of lines of code to simulate the ULA's video timing, the moment arrived. He flicked the toggle switch.
The tiny LCD flickered. For a second, it was just static. Then, the legendary crisp white background appeared, and at the bottom of the screen, the words he had worked half a year to see: © 1982 Sinclair Research Ltd Richard tapped the rubber keys he’d salvaged. 10 PRINT "IT LIVES!" 20 GOTO 10
. As the words scrolled infinitely on his handheld creation, he realized he hadn't just built a computer; he’d bottled lightning. specific logic equations used to replicate the ULA, or should we look at the PCB layout requirements for a portable build?