ZX Spectrum ULA Types

Introduction

The heart of the ZX Spectrum series of computers is a custom chip called the ULA (Uncommitted Logic Array). This was a technology pioneered by Ferranti, of which Sinclair was one of the first adopters (incorporating all of the discrete logic of the ZX80, plus a NMI generation circuit into the initial ZX81 2C158E ULA).

The 16/48K Spectrum can be found with a number of different ULA types:

5C102E ULA
This was the original ULA type, and is to be found in Issue 1 (and a small number of Issue 2) Spectrums.

It suffered from a buggy I/O contention model which made I/O reads, particularly keyboard reads from machine code, unreliable, hence the addition of the ‘cockroach’ mod (basically a 74LS00 chip hand soldered on top of the PCB with flying lead connections, later contained on its own mini daughterboard).

5C112E, 5C112E-2, 5C112E-3 ULA
This was the second revision of the ULA and is found in Issue 2 Spectrums. It fixes the initial I/O contention issue, but unfortunately it was found that the resulting I/O contention was overly aggresive, contending ports that did not need to be.

This resulted in the implementation of the ‘spider’ mod, a ZTX313 transistor soldered over the CPU (or next to the upper RAM IC’s in some models). The mod was performed with a single diode and resistor on early Issue 2 machines.

Due to lack of available pins to properly fix this issue in subsequent ULA revisions, this transistor became part of the PCB layout (TR6) in Issue 3 and later PCB’s. If the transistor isn’t present then the machine will work properly except for the absence of the floating bus effect (see this article for a more detailed explanation).

It is unclear at this time what the differences between the original 5C112E and the -2 and -3 variants are.

6C001E-5 ULA
This is a comparatively rare revision, and seems to be the first attempt by Sinclair to use Ferranti’s new 6C process to reduce ULA power consumption. Timing changes introduced in this revision improve compatibility with some previously troublesome TV sets, but at the cost of moving the entire screen display one character position to the left (best seen by changing the border to black).

This ULA also incorporates a change to the internal pull up resistors which causes the EAR bit value to float between 0 and 1 until the ULA has warmed up, instead of persisting at logic 1 like the 5C series. The result of this is that software that reads the keyboard without masking off the non-keyboard data bits will not work properly.

Machines with this ULA typically have a small capacitor installed on the lower RAM /RAS line, presumably to compensate for marginal timing on this ULA generated signal.

These are exclusively found in late Issue 2 machines and have date codes between 8320 and 8324.

6C001E-6 ULA
First mainstream revision of the 6C ULA type, this is to be found in late Issue 2 PCB’s and most Issue 3/3B PCB’s. It presumably corrects the /RAS timing issue that the 6C001E-5 ULA exhibits, there are no other known differences.

6C001E-7 ULA
The final revision of the 48K ULA, this improves memory signal timing in conjunction with modifications starting with the Issue 4A PCB. This is the only ULA that is documented to work on all 48K issues.

Some very late 6C001E-7 ULA’s bear ‘PS’ markings or the Plessey ‘squiggle’ logo, these were manufactured after Plessey took over the Ferranti semiconductor business in 1988, and were presumably the last ordered by Amstrad for authorised repair centres.

7K010E-5 ULA / Amstrad 40056
This ULA type was produced for the Spectrum 128, and latterly for the grey +2. Despite their different designations, they are functionally identical. Other major differences include RGB output instead of YUV, and separate MIC and EAR pins (even though they are tied together on the PCB to emulate the original behaviour!)

+2A/+3 Gate Array (Amstrad 40077)
Not a ULA, but a gate array produced by Amstrad that incorprates functionality from the ULA, PCF and HAL chips into a single package. It comes in QFP form instead of the traditional DIP.

What ULA works in what machine?

The 6C001E-7 ULA is backwards compatible with every 48K machine from the Issue 1 right up to the Issue 6A. For other ULA revisions, the following holds:

  • 5C102E – Issue 1 and 2 PCB’s (requires cockroach mod).
  • 5C112E – Issue 1 PCB’s (remove the cockroach) and Issue 2 PCB’s
  • 6C001E-5,6 – Issue 1, 2 and Issue 3 PCB’s

Other combinations may work (I have seen a 5C112E ULA work in an Issue 6A with no problems), but the above is what was officially documented and supported in the service manual.

For 128/grey +2 machines, the 7K010E-5 ULA and Amstrad 40056 IC’s are interchangeable with no modifications required.

The +2A and +3 both use the same 40077 gate array.

(To add: NTSC ULA coverage).

Replacement ULA’s

Since the process used to manufacture the ULA chips is decades old and obsolete, new ULA’s have not been available for quite a number of years. Replicating the functionality has proved tricky due to the use by Sinclair of ULA peripheral cells to provide analogue functionality (YUV output, tape interface etc).

Nevertheless, in the last year replacements have come to market and are detailed below.

NebULA
A drop in replacement for 6C001E-7 and earlier ULA’s, which replicates 6C001E-7 functionality. Designed by Phil Ruston and Alessandro Dorigatti, and available here.

SLAM128
A drop in replacement for the 7K010E-5 ULA in 128 machines, or the Amstrad 40056 in grey +2’s, designed by Mark Smith and manufactured by Piotr Bugaj. Usually available on sellmyretro.com (search for seller zaxon, keywords SLAM 128 ULA).

No replacement is currently available for the 40077 gate array used in +2A and +3 Spectrums, fortunately these are normally quite reliable.

Further Reading

More information on the Spectrum ULA can be found in Chris Smith’s excellent book, “The ZX Spectrum ULA: How to Design a Microcomputer” (Amazon search link)

Chris’ blog containing a description of his journey reverse engineering ULA functionality can be found here.

Back to Technical