How the ZX80 Works

mariuz1 pts0 comments

Tynemouth Software: How the ZX80 works

Sunday, 13 October 2019

How the ZX80 works

I have been expanding the instruction manual for my Minstrel ZX80 Clone to include more information on how the ZX80 works. I thought it would be good to expand on that even more here. So, how does the ZX80 work?

The Sinclair ZX80 is a low cost home computer, launched in 1980 with a price tag of £99, considerably cheaper than it's contemporary counterparts. How did they do that? Well, the first thing to know about the ZX80 is that it's main job is not to run your code. That's very much a side task. The thing it spends most of it's time doing is drawing a picture on the TV screen. And it does that by executing mainly NOP instructions.

Unlike most other computers of it's era, it doesn't have a video chip. It doesn't have any custom chips in fact. There is a Z80 CPU, a 4K ROM chip, two 1K x 4 bit static RAM chips, and seventeen 74 series TTL chips, and that's it.

Quite an achievement to make a functional computer out of that, and how it does it is very clever, and I hope to try an explain that here. I am using schematics, screenshots and logic plots from my Minstrel ZX80 clones. These follow the same design, using the same chips, and the only modern substitutions being more easily available ROM and RAM chips, and an extra TTL chip to bring the composite video closer to that required by most modern TV sets.

Oh, and I do have better keyboards available, but you can go back to a membrane if you wish.

The Z80

Well, first off, the heart of the system is the Z80 processor. This has been in continuous production since 1976, and is still going strong. Here a Z80 or Z80A is clocked at 3.25MHz (yes, more than three times faster than the 6502 in the PET, VIC20 and even the C64), although in practice, the Z80 takes more cycles per instruction that the 6502, so there's not much in it. The /Halt, /NMI and /BusRequest control inputs to the Z80 are pulled high, leaving them in a stable state and able to be driven low to activate them. A minimal reset circuit is used, consisting of a resistor and capacitor. This holds the reset line low for around 100mS until the 1uF capacitor has charged to past the logic low level.

The Edge Connector

The ZX80 expansion edge connector is connected pretty much directly to the Z80. This exposes most of the pins of the Z80 to allow expansion to the system. It also includes power for peripherals, and a way to disable the onboard RAM. The ZX81 that followed used the same edge connector, other than a spare pin was used to also allow you to disable the onboard ROM. That has been implemented on the Minstrel ZX80 clone in the same way as the ZX81.

RAM

The ZX80 originally came with 1K of static RAM as two 2114 SRAM chips. Unlike the Z80 and all the TTL chips, the small SRAM chips are out of production. However larger modern RAM chips are available which can be addressed in the same way. In the Minstrel ZX80 clone, a 32K RAM chip has been used, as that is the most easily available (8K chips are available but are often more expensive than the 32K versions). The address decoding is identical, and is fairly minimal. If A14 is high, and the Z80 is performing a memory request, the RAM is enabled. Resistor R19 is connected between the two chips to allow the chip select signal at the chip side to be connected to the edge connector. Pulling this high will disable the internal RAM and allow an external peripheral to replace the RAM. This happened in the ZX80 and ZX81 when a 16K RAM pack was fitted, the internal 1K of RAM was disabled (a bit wasteful given the price of RAM in those days). The initial offering for the ZX80 was a 3K expansion that used another six 2114 chips to take the RAM to 4K. Using A14 as the only decoding means the RAM is present at address 4000-7FFF and mirrored at C000-FFFF. Originally the 1K would have also been mirrored 16 times within each of those blocks, but here the full 16K block is used as RAM. The RAM chip is a 32K chip, but has the highest address line tied high, so half of the chip is not used. Due to the way the RAM is used, it would have required additional decoding logic to add the other 16K, so it is not used to maintain compatibility, and very little software would had used it.

ROM

The original ZX80 came with a 4K ROM chip. The chip select line was activated when there was a memory request and A14 was low. That meant the ROM chip was enabled from 0000-3FFF and duplicated at 8000-BFFF, and the 4K chip is mirrored 4 times in each 16K block. The ZX80 could be upgraded to ZX81 style BASIC, which came in an 8K ROM. The Minstrel ZX80 clone uses a larger EPROM, a 27C64 up to a 27C512, with multiple 8K chunks selectable via jumpers so you can have a choice of ROM versions.

Memory Map

The following table shows the memory map for four machines. An original ZX80; a ZX80 which has been upgraded with the 8K BASIC ROM and a 3K RAM pack (giving 4K in total); a ZX80 that has been upgraded...

zx80 chip chips minstrel available works

Related Articles