Baccalaureate & Commencement

Grove City College's Baccalaureate ceremony will be held at 7 p.m. Friday, May 8 and Commencement will be held Saturday, May 9 at 10 a.m.
Baccalaureate will be held inside the PLC Arena.
Both events will be livestreamed at www.gcc.edu/livegrad.

The Zx Spectrum Ula- How | To Design A Microcomputer -zx Design Retro Computer-

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.

The ZX Spectrum ULA: Designing a Retro Microcomputer The ZX Spectrum ULA (Uncommitted Logic Array) is widely regarded as the "heart" of the Sinclair ZX Spectrum. Originally manufactured by Ferranti, this custom gate array consolidated nearly all the discrete logic required to build a functional microcomputer into a single silicon chip. Understanding its design is essential for any hobbyist or engineer interested in retro-style computing or modern hardware preservation.

For those looking to dive deep into the technical architecture, the book The ZX Spectrum ULA: How to Design a Microcomputer by Chris Smith is the definitive resource. What is a ULA?

In the early 1980s, before the prevalence of CPLDs and FPGAs, the Uncommitted Logic Array was a revolutionary technology. It consisted of a pre-manufactured silicon die with a sea of uncommitted logic gates. A customer like Sinclair would provide a final "mask" to define the interconnections between these gates, resulting in a custom integrated circuit at a fraction of the cost of a full-custom design. Core Functions of the ZX Spectrum ULA

The ULA is responsible for several critical low-level functions that allow the Z80 CPU to interact with the outside world:

Title: The Ghost in the Gate Array

The winter of 1981 in Cambridge was damp, grey, and unforgiving. Inside the sterile, fluorescent-lit offices of Sinclair Research, the pressure was palpable. The Sinclair ZX81 had been a runaway success, but its successor—codenamed the ZX Spectrum—was behind schedule, and the clock was ticking.

Richard Altwasser, a young, brilliant engineer, sat hunched over a desk cluttered with logic datasheets and schematics. He was staring at a problem that seemed impossible to solve. The goal was to build a color computer with high-resolution graphics, sound, and a robust BASIC interpreter, all to be sold for a price that seemed laughable: under £100.

The competition was building machines with dozens of off-the-shelf chips. Texas Instruments and Commodore had budgets that dwarfed Sinclair’s. To compete, Altwasser knew he couldn’t follow the rules. He had to break the computer down to its absolute essence.

"The problem is the glue," he muttered to himself, tracing a line on a schematic. "Separate video chips, separate logic chips... it’s too expensive. It draws too much power. It takes up too much space."

He needed a single component to do the work of twenty. He needed a Uncommitted Logic Array—a ULA.

The Architecture of Necessity

The story of the Spectrum is the story of the ULA. It wasn’t just a chip; it was a philosophy. Altwasser envisioned a system where the Central Processing Unit (CPU)—a humble Z80—didn't just crunch numbers; it was a partner in a high-speed dance with memory.

In a standard computer of the era, the CPU would halt while the video circuitry read the screen memory to refresh the display. It was slow and clunky. Altwasser designed the ULA to act as a traffic cop. While the Z80 was processing the internal logic of a program, the ULA would steal tiny slices of time to fetch video data from the RAM, interleaving the accesses so neither component had to wait.

It was elegant, but it meant designing a custom chip from scratch. Altwasser sent his specifications to Ferranti, the semiconductor manufacturer. The blueprints detailed the logic gates, the timing sequences, and the video generation. They were creating the brain of a microcomputer on a slice of silicon no larger than a fingernail.

The Contention Problem

As the first batch of prototype ULAs arrived from the factory, the real work began. The theory was sound, but silicon has a way of revealing the flaws in theory.

Steve Vickers, the mathematician tasked with writing the ROM (Read-Only Memory) software, walked into the lab one afternoon. "The machine keeps crashing when I try to draw a circle in high-res mode," Vickers said, holding a circuit board.

They hooked up an oscilloscope. The jagged line of a signal danced across the screen. They realized the ULA was struggling to keep up. When the Z80 tried to access the memory at the exact moment the ULA was reading the screen, a collision occurred—a "contention" error.

Altwasser stared at the board. To fix it in hardware would require redesigning the chip, costing months they didn't have. "We don't change the hardware," he said, his voice steady. "We adapt the software."

They realized that the Z80 had a predictable rhythm. They could write wait-states into the machine code, deliberately slowing the processor down just enough to let the ULA pass. It was a hack, a compromise, but it worked. The machine breathed. The screen flickered to life with a cyan and magenta glow.

The Heat of Innovation

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.

The ULA was the heart of the machine, but it was a feverish heart. In a final, frantic engineering pivot, a small metal "heatsink" was clipped onto the ULA in later production models. It was an unsightly band-aid on a masterpiece of miniaturization, but it kept the computer alive.

The Launch

By the spring of 1982, the ZX Spectrum was ready. It looked unlike anything else on the market—tiny, futuristic, with rubber keys that felt like a calculator.

When the press saw it, they scoffed. "It’s too cheap to be taken seriously," one journalist wrote. "How can a computer that costs £125 be reliable?"

But the engineers knew the truth. They had done the impossible. They had designed a microcomputer not by throwing money at it, but by stripping it down to the barest logic. The ULA was a masterpiece of efficiency, a design that forced the Z80 to punch far above its weight class.

Legacy

Years later, when enthusiasts de-capped the old Ferranti ULAs to reverse engineer them, they found ghosts in the machine. They found the exact layout of the gates, the precise timing of the video signal, and the elegant solution to the memory contention problem.

The book The ZX Spectrum ULA: How to Design a Microcomputer is not just a technical manual; it is the forensic analysis of that winter in Cambridge. It tells the story of how a small team of engineers, armed with nothing but logic gates and determination, built a machine that introduced a generation to the digital world. The Spectrum wasn't just a computer; it was a testament to the art of designing within limits.

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 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 book " The ZX Spectrum ULA: How

The ZX Spectrum ULA: How to Design a Microcomputer by Chris Smith is widely considered the definitive technical resource for understanding the "heart" of Sinclair’s iconic 8-bit machine. Published in 2010, the book is the result of Smith's painstaking reverse-engineering

of the custom Ferranti Uncommitted Logic Array (ULA) chip down to the transistor level. Key Technical Focus Areas

The book serves as a case study for 8-bit microcomputer design, detailing: The Ferranti ULA:

An in-depth look at the manufacturing process and how these "blank" chips were configured for the Spectrum. Video Generation:

Explains how the ULA handles screen timing and the generation of the PAL video signal. Memory Contention:

Details the complex dance between the Z80 CPU and the ULA as they both compete for access to the same 16KB of RAM. Engineering Quirks: Documents famous "bugs" that became features, such as the "snow effect" caused by refresh cycles and non-standard sync pulses. Significance for Retro Computing

Smith’s work was a catalyst for the retro hardware community. It provided the logic required for developers to create:


Historical context

  • Sinclair Research released the ZX Spectrum in 1982; cost constraints and tight timelines motivated radical simplification.
  • The ULA replaced many TTL chips and performed mixed tasks: video timing, much of the I/O and bus arbitration. It reduced parts count, PCB complexity and assembly cost.
  • The tradeoff: the ULA was semi‑custom and not user-programmable; hardware fixes required new silicon or board changes. But for a mass-market consumer device, the cost savings were decisive.

Chapter 5: The Modern ULA Replacement

You cannot buy a Ferranti ULA today. But you can design its modern equivalent using:

| Technology | Difficulty | Authenticity | Cost | |------------|------------|--------------|------| | Discrete 74LS logic | Hard (100+ chips) | High | High | | CPLD (e.g., XC2C64A) | Medium | Medium (fast) | Low | | FPGA (e.g., Ice40) | Medium | Low (overkill) | Medium | | Raspberry Pi RP2040 PIO | Low | Low (emulation) | Very Low |

Recommended for your design: Use an Altera/Intel MAX V CPLD or Lattice LCMXO2 FPGA. Program it with ULA-like logic: video timing, contention, and I/O decoding.

Chapter 4: Keyboard & I/O Decoding

The Spectrum ULA maps the keyboard to port 0xFE. It reads 5 rows of keys (Shift, Z–M, etc.) via IN instructions.

Design steps:

  1. Use a counter or decoder to scan the keyboard matrix.
  2. On an I/O read to 0xFE, return the current row’s key states on bits 0–4.
  3. Additionally, read cassette input and output to a beeper via the same or a separate port.

Bonus: Add a simpler design variant – use a modern microcontroller to scan keys and send serial data to the main CPU, but that misses the ULA’s charm.

How to Build a ULA "Harness"

If you are building a ZX Design retro computer clone today (like the Harlequin or the ZX-UNO), you must replicate these ULA signals:

  • /ROMCS: Allows the ULA to disable the ROM after boot, handing control to RAM.
  • /RAS0 & /CAS: The Row Address Strobe and Column Address Strobe for the video DRAM. If your ULA replacement (or FPGA) gets these timings off by 50 nanoseconds, the screen glitches or crashes.
  • /INT: The ULA generates an interrupt every 20ms (matching the TV frame rate). The Z80 jumps to 0x0038 to run the interrupt routine. No interrupt? No keyboard response, no game logic.

Further steps (if recreating or studying the design)

  • Start with an HDL implementation of the video timing, pixel shift registers and simple memory arbiter. Test in a simulator and on an FPGA dev board.
  • Incrementally add keyboard scanning, tape I/O and audio.
  • Compare behavior against an original Spectrum (or emulator) to validate timing and quirks.

If you’d like, I can:

  • Provide a sample HDL module for a minimal ULA-style video fetch and shift engine (Verilog/VHDL).
  • Produce a simplified timing diagram and cycle-by-cycle bus map for display line fetches.
  • Outline a parts list and schematic for a hybrid FPGA + SRAM retro-Spectrum replica.

3. The Critical Flaw (Attribute Clash)

Here is the design lesson: Every optimization has a consequence. To save memory, the ULA used a "color attribute" system. Every 8x8 pixel block shared one foreground color and one background color.

  • Memory saved: 6,144 bytes for pixels + 768 bytes for attributes = 6,912 bytes total.
  • The result: If a blue sprite moved over a red background, the ULA had to choose: make the sprite's background blue (corrupting the backdrop) or leave it red (making the sprite look like Swiss cheese).

Modern retro designers call this "attribute clash." 1980s kids called it "the Spectrum look." Historical context