Sunday, 8 May 2022

Sinclair 5x8 Keyboards

Today I am going to have a look at the evolution of the 5x8 matrix keyboards used on Z80 machines from Sinclair (and others).


They all follow a similar format to the matrix shown below on the keyboard PCB from one of my Minstrel ZX8x clones.


The matrix is composed of 8 rows of 5 keys. The 5 columns are mirrored on the right hand rows. Here you can see the rows are not ordered sequentially, presumably whatever was most convenient for PCB layout.

I have tried various ways of drawing the switches in those schematics, and I think those angled ones I drew are the clearest. 

I just need to be careful not to use them individually, as they keep reminding me of V.I.N.CENT from Black Hole when I do.


The ZX80

The first to use this format was the Sinclair ZX80. I am not aware of any machines before that which had a full alphanumeric keyboard with only 40 keys. Most were either 16-20 key hexadecimal keypads or much larger more traditional style keyboards.


For a closer view, here is one of my overlay stickers which can be used to convert a ZX81 membrane for use with other machines. You can see they use the 10 numbers, 26 letters, and the remaining 4 keys are shift, new line (a.k.a. enter or return), space and dot / comma. It would have been nice to have also had a delete key, but that is achieved on most of these keyboards as SHIFT + 0 (on the ZX80/81 called "rubout").


The next step is the ZX81, but a the ZX81 ROM was available as an upgrade for the ZX80 (supporting all functions apart from the new NMI controlled flicker free slow mode). In order to keep in style with the ZX80, I produced another overlay in the style of the ZX80, but with the ZX81 graphics and keywords.

The ZX81

The actual ZX81 used the more familiar colour scheme of black, white with red highlights.


This was also used on the TS1000 with some minor changes.


The ZX80, ZX81 and TS1000 all used the same key arrangement. The only changes on the TS1000 were the replacement of the names RUBOUT and NEW LINE by the more familiar terms DELETE and ENTER.


The changes from the ZX80's original integer maths based 4K BASIC to the floating point maths 8K ROM found in the other machines were more noticeable. Many new keywords were added, and most of the existing keywords and graphics were moved around.


Jupiter ACE

The first deviation from that key layout came with the Jupiter Ace. Not a Sinclair product, but close enough to be considered here.


At first glance, it appears to use the same layout, different graphics and keywords, but the keys are in the same places. However, although the physical keyboard placed symbol shift where the dot/comma key had been, electrically it is wired where Z would normally be. Z is where X would be, X where C would be and so on until M which is where dot/comma would have been.


I did make an overlay that would allow a ZX81 keyboard membrane to be used on a Jupiter Ace (or Minstrel 4th ). Here you can see the Z,X,C etc. keys are shifted one place to the right.


This may have been to avoid copyright (I am thinking of the Micro Ace ZX80 clone that tried to avoid copyright by swapping two of the data lines in the ROM so it was no longer binary identical when read outside of the machine). It is also useful to be able to check the two modifier keys on the same row.


If they had used the ZX81 matrix, the Symbol Shift would have been on Row 8 and Shift on row 6.

The ZX Spectrum

The next machine from Sinclair was the ZX Spectrum. This also had a 5x8 matrix keyboard from the ZX80 and ZX81, the use of Enter and Delete from the TS1000 and the Symbol Shift key from the Jupiter ACE. (oh, and it was colour and you could play Jet Pac on it etc.)


I did make an overlay in the Spectrum style for use with a Spectrum clone, You can see the Spectrum, although very compact is somewhat larger that it's predecessor.


The Spectrum also has a Symbol Shift key on the right, but this time it is in the matching location in the matrix. Other than the name changes, all the rest looks the same, but ah, no, two of the address lines have been switched.

I would have expected Sinclair to keep the same keyboard layout. I am not aware of any specific reason for the switch, routing the membrane maybe, but then that could have been switched on the PCB. Maybe the address lines used for the rows may have been accidentally transposed during the construction of the ZX Spectrum prototype (seen here at the Centre for Computing History - http://www.computinghistory.org.uk/det/51620/Sinclair-ZX-Spectrum-Prototype/


The ZX Spectrum +

The next machine to be released was a Spectrum+, this was a larger case, but had the same board inside, and therefore had to use the same 5x8 keyboard matrix. But it had extra keys?


The extra keys were created using trick membranes that pressed two keys simultaneously. All of the extra keys are simply combinations of two of the existing keys When you press the " key, it actually pressed Symbol Shift and P at the same time, so it is interpreted as ". Left arrow is Shift and 5 etc.


The Spectrum +2

This layout persisted to the end of the ZX Spectrum range, with the same technique being used on the Spectrum + 128K and the grey Spectrum +2. 


The grey +2 membrane looks more complex, but still has just the 5x8 matrix connections.


The Amstrad designed +2A/B/+3 black machines had the same external appearance, but underneath they had a different keyboard matrix.


Rather than 5x8 like all the previous keyboards, this was 11x13 and there was no magic double layered membrane.


With all the extra connections, it looks like an 11x13 matrix, but in fact it is the good old 5x8 matrix and a completely separate 6x5 matrix. (I'll cheat here and use the diagram from the service manual rather than redrawing it)

Other than those minor anomalies, the same matrix survived intact for most of the 1980s. Even the competition when trying to make a machine of a similar size and cost had 50% more keys.


After a long romance with 100+ key keyboards (like the beloved IBM Model M I am typing this on), it seems we will never go back to the elegant simplicity of 5x8 matrix keyboard. 

But again, saying that, with those awful touch screens taking over everywhere (give me a buckling spring any day), a return to a simpler interface with fewer keys does seem to be underway.

Third Party Keyboards

There were several after market keyboards for the ZX81 and ZX Spectrum that also added extra keys. How did they work? Well, tune in next week to find out. I will be reverse engineering some of them to see what all of this extra gubbins does. 


http://blog.tynemouthsoftware.co.uk/2022/05/reverse-engineering-a-zx-spectrum-keyboard.html

Advertisements

The various overlay stickers and keyboard PCBs for the ZX80, ZX81, Minstrel 2, 3 and 4th are available from my SellMyRetro store:

https://www.sellmyretro.com/store/tynemouth-software


This post is an updated version of a post from my Patreon. If you want advance previews of posts like this and behind the scenes progress on new projects, you can follow along and support me on Patreon:

https://www.patreon.com/tynemouthsoftware