The new ZXKBD v3 keyboard add-on hardware project introducing various improvements and peripherals to enhance the operation of a real ZX81.
The objective of the original ZXKBD project was to add an external MEMOTECH style keyboard plugged directly into the ZX81 edge connector. To the ZX81 it looks just like the key matrix same scanning technology as the original, which makes the keyboard completely compatible with any software ever written for that computer.
This ZXKBDv3 design enhances the original ZXKBD project by adding a high speed communications port and optional joystick port. The keyboard portion of this design is virtually the same as the original ZXKBD but some pins on U2 have been swapped.
THE ZX81 BUFFERED KEYBOARD (ZXBKB v3)
The ZXBKB project provides the same functionality as the Memotech keyboard. It requires a PC keyboard or equivalent rewired using the same matrix as the ZX81 keyboard as shown in the schematic. Many older PC keyboards use single sided PCBs making it easy to isolate and rewire the keys. The 14 conductor connecting cable can be up to 6 ft long.
The BKB circuit operation is quite straightforward. The circuit board is assembled on perforated board and is connected to the ZX external edge connector. Alternatively, the circuit can be placed inside the ZX81 housing and directly wired to the signals on the motherboard. Either way the circuit is connected with a 14 conductor flat cable to the rows and columns of the modified keyboard.
The signals from the ZX81 are buffered with two 74HC245 chips. The 8 address lines A8-A15 are normally connected through diodes to scan the rows of keyboard contacts. This direct connection would load down and distort the signals on the address lines especially when using a long connecting cable.
In the BKB these address lines are first buffered with 74HC245 gates before connecting through the diodes to scan the keyboard rows. This ensures that the keyboard connections do not load the ZX system address signals.
Similarly, the A0, IRQ and RD signals are buffered before connecting them to the diode logic I/O address decoder.
This address decoder will respond to any IO read with A0 low (eg $FE), which is identical to the decoding of the keyboard port in the ZX81 ULA. Note how U1 is used to buffer and decode this address and generate the enable signal for U2. Since IORQ is used to enable U1 only when required, the amount of switching noise radiated from the A8-A15 scan lines is greatly reduced despite the longer cable length.
U2 is connected to the 5 rows of keyboard switch contacts and when the keyboard is “read”, the state of the rows is transferred to ZX81 data bits D0-D4 in parallel with the ULA keyboard port. These two sources of keyboard information are logically OR’d ideal for two player games (if there were any).
The same $FE I/O address used for keyboard decoding is also used by the ZX tape LOAD command to read the TAPE IN signal on data line D7. The BKBv3 project provides a single pin TTL compatible asynchronous serial input that can be used for normal speed loading of ZX programs via the PC printer ports.
In addition the ZXBKDv3 design emulates the No$ZX high speed nibble wide com port which is normally directly wired to the ZX81 motherboard. The port is wired up to a male DB25 connector designed to plug into a PC printer port. This nibble port is set up with a short boot loader using the slow speed asynch port and then loads the program from the PC to the ZX81 at a fast rate of 115kB.
Since they share a common data bus, do not use the ZX keyboard(s) or the Joystick while transferring data from the PC.
For more info on the No$ZX ZX81 emulator with build in assembler and debugger check out NO$ZX
Finally the ZXKBD v3 design can interface an Atari style joystick with through a DB9 game connector to the ZX81. The joystick acts as the 5 keys on row 1 of the ZX keyboard. The schematic shows the firing button and Up, Down, Left, Right contacts connected to the shift, Z,X,C and V keys respectively.
That’s it. For discussion or comments please visit the www.ts1000.us Hardware Forum.
The ZXKBD project evolved from several earlier projects
In 1983, after I became sufficiently familiar with the ZX81 hardware, I designed my first ZX keyboard interface which used about 10 chips to connect a parallel ASCII encoded keyboard to a set of decoder chips which selected analog gates to simulate the ZX key matrix. Overly complex but it worked. I don’t have the documentation of that project but in any case, it would be a waste of time to recreate the original kludge design in view of what I now know. 8^)
Since then I designed a commercially marketed software programmable Atari joystick port that could generate any combination of ZX keys for any combination of joystick and switch positions. Quite clever in concept, an article on this design will be posted soon.
Many years later (1997) I posted an article on the ZX81 mailing list hosted by Jack Raats, describing a keyboard interface called ROMKEY which consisted of just a single EPROM connected between a PC printer port and the ZX edge connector that translated 7 bit parallel ASCII to ZX scanning codes. The PC printer port could easily be replaced by an Apple II keyboard, which also provides parallel ASCII out. Now that is what I call a simple design.
The ROMKEY project used just one chip – a 32K EPROM to translate a 7 bit ASCII code on a PC printer port (or any other source) to the scan code of the ZX matrix keyboard. ROMKEY.htm
In a discussion on the mailing list at that time with Alvin Albrecht, I also proposed using a 8x8 analog cross point switch to replace the ZX keyboard membrane contacts with 64 addressable analog switches in one chip. The cross point switches are controlled through the PC printer port or a decoded PC keyboard parallel output. A similar design is said to be available for the Spectrum.
A number of XT keyboard compatible circuits were designed and posted using discrete logic, some of which were quite elegant.
A short time later I (and Kay Fisher more recently) used this ROMKEY idea together with a micro controller chip to interface a standard AT style keyboard to the ZX edge connector but these designs are limited to using a single PC keyboard key to simulate one or more ZX keys down (with or without shift). While not 100% compatible with all ZX games this is as close to a plug and play enhanced ZX keyboard system as one can get. ZXATKEY.htm
From 1998 to the present I concentrated on my robotics interests and rarely played with the ZX81 hardware. But I recently discovered a spate of ZX81 activity had occurred during my absence, which prompted me to once again pick up the ZX gauntlet. Let’s see where it takes us.