ZX81PLUS35 ZX81 clone

From RevSpace
Jump to navigation Jump to search

The ZX15 (previously called the ZX14) retro homecomputer is a much improved Sinclair ZX81 [1] clone built with the modern materials techniques and components of 2015.

it will be fully open sourced effort (but note that the original design of the ZX81 and its BASIC interpreter firmware is still owned by Amstrad)

As for now comments and questions on the design can be made here [2] (raspberry PI forum off topic section)  :-)

Introduction to the ZX81+34

The ZX81+34 is a much improved ZX81 that people can build themselves.

The ZX81+34 should be fully compatible with the original ZX81, but with the following improvements over the original ZX81 :

  1. Includes turbo option switch giving more than double (220%) the speed of the original, with turbo LED, and dynamic turbo slide switch.
  2. Includes 16KB of RAM instead of the original 1K (should also support 32K mode) but should be compatible with "high resolution" software.
  3. RAM can be made permanent with a battery backup system (optional) so program remains even during power off
  4. Supports ZX81 BASIC in either a EEPROM or in an OTP (one time programmable ROM)
  5. Compatible with modern TV's thanks to better digital sync signal generation, giving sharp stable and high contrast pictures.
  6. Composite video (PAL or NTSC) output signal instead of RF signal, for even sharper picture, compatible with yellow RCA inputs, and SCART
  7. Wobble free real expansion connector (can be modified to be fully compatible with the ZX81) modules can fit inside ZX15 enclosure, compatible with ZX81 printer
  8. Uses simple microUSB chargers as power supply, with low power consumption
  9. Can drive a simple LCD display, and some external I/O for "stand alone" applications like driving tiny robots. Debug LED/Backlight LED support.
  10. Simple sound generation (full sound only when using fast mode)
  11. Supports a DB-9 joystick with up-down-left-right and fire, immediately compatible with games that use keyboard arrow keys (5,6,7 and 8) and 0 for "fire"
  12. Supports keyboard with real (moving) keys, using new keyboard overlay with holes for the keys, uses cheap 6x6mm buttons, keyboard layout also available. Using the original keyboard is also possible
  13. More sensitive and reliable cassette tape interface (can be reliably driven by MP3 players and such)
  14. Includes reset button option, and power LED.
  15. Alternative (nicer) ZX81+34 font available, to replace the standard one in the ROM.
  16. No need for the original ULA, it is replicated with conventional logic.
  17. Cheap to build by using low cost components, on small dual sided PCB, with single sided assembly only.
  18. Design files will be freely available (but do note that firmware is still © Amstrad!)

Current Status

At the moment the PCB of the first prototype has been designed, and is ready to be tested.

26/01/2015 2 PCB's are being made, waiting for delivery next week, also a component order list has been created. 27/01/2015 A component placement diagram has been made, and has been published here. 31/03/2015 one PCB has been assembled, a keyboard is being made, (the first keys I bought were unsuitable due to too short plungers so I bought new ones. A programmed EEPROM needs to be made, I will probably design my own EEPROM programmer. Problem is that I used a 32K classical EEPROM, which has a different pinout than 64K and bigger sizes, for which FLASH versions are available. This means I must use a real EEPROM programmer, instead of being able to flash program the PROM. Ill design a raspberry PI based simple programmer, also useable for other replacement of other RETRO EEPROMS.

3D Preview of early ZX81+34

Before I even designed the PCB I made a mockup with Altium. Here are two (3D rendered) previews of the ZX81+34 board, to the top one is an older small preview of the complete system, including how I envisaged the whole system with keyboard would look like, at the bottom you can see a picture of the more recent 3D rendering of ZX81+34 PCB, and to the right, as a size reference the original ZX81. Note both PCB's are about equally as tall (10 cm), but the ZX81+34 is much smaller, as it square, while the ZX81 is much wider than it is tall.

Preview ZX14 with keyboard.jpg

The botom picture also shows the four chips of the original ZX81, and what replaces them on the ZX81+34, green is the Z80 CPU, RED the (EE)PROM, Yellow the RAM (1K on the ZX81, 16/32K on the ZX81+34). Blue indicates the logic of the ULA, contained in a single 40-Pin IC on a ZX81, the ZX81+34 replicates it with 24 conventional but modern logic ICs.

ZX81+34 versus ZX81.jpg

Schematic 81+34

The latest schematic (.PDF) can be found here: File:ZX81+34 schema.pdf

There is also a color coded schematic (.PDF), it can be found here: File:ZX81+34 kleur rev 1.0.pdf.

Note that SMT components are depicted purple, and PTH ones green.

The Bill of Material (BOM) for the ZX81+34 can be found here File:Z81+34 BOM.ods

ZX14 schematic.png

Layout ZX81+34

Even though I was hospitalized, then immobilized for several months (in the months of June July and August 2014) due to an operation on my leg, I still managed to work a bit on the layout of the ZX14. And on November 25, 2014 The layout work reached 100% connectivity. Here is a preview of how the work was progressed at that time . Clean-up, optimizing and copper filling followed somewhat later. The picture below on the left was actually a screen shot from a gerber viewer of how the board looked in September 16, 2014, note the lack of copper fill to make it easier to follow the connections around. Some weeks later the cleanup was ready, and this is a picture of how the PCB will more or less look like, when it is finished.

Component placement 16 September 2014.png ZX81+34 final.png

Keyboard for ZX81+34

Early on I was also busy designing a solution for the keyboard. My solution was to use commercially available cheap 6x6mm buttons, which (with some effort by bending the pins a bit) can be mounted on an EuroCard sized piece of 1/10"raster perfboard, the result would like something like the picture on the left.

Here is the schematic (plus board layout) of the keyboard: File:KB matrix schematic.pdf

I also designed a new keyboard overlay suitable for such a keyboard with the keys going through holes in the overlay. On the right is a drawing showing how it would look, note the brown dots are actually the actuators of the push buttons going through the holes in the overlay.

Here is a .PDF version that should be correctly scaled when printed on A4 paper. You can also use it to create a replacement keyboard for your ZX81.

File:Nieuw keyboard ZX14.pdf

Perfboard keyboard preview.png

  Nieuw keyboard overlay.png

Alternative font for ZX81+34

I also designed an alternative (fun) font for the zx81+34 that can replace the one in ROM, it should be compatible with existing software, so graphic symbols are unchanged. As inverted characters are a hardware function, inverted characers (and graphics) are simply inverted copies of the original characters. Here is a preview.

ZX81+34 opgeleukte fontset.png

Here is the original to compare it with.

ZX81 CHARSET.png

The final ZX81+34

Finally mid January 2015 the PCB of the ZX81+34 was finished, a mounting hole was added (needed to mount in an enclosure). The picture below is a 3D rendered preview, some of the texts on the preview are there to comment some of the functions, and will not be present on the silkscreen of the final PCB.


Final preview.png

The assembly drawing of the ZX81+34

Here is a drawing to help assembling the right components at the right places (A placement drawing), it was made from the real silkscreen gerber-file (in red)comments and component values in black.

Overview met component values.png


Starting the assembly

Starting the assembly of the ZX81+34 small.JPG

just started with soldering the various resistors with a hot air soldering station

Finished assembly

ZX81+34 shot without case.jpg

Assembly of the ZX81+34 and its keyboard has finished. Still waiting for a programmed EEPROM before it can be tested.

The bare board looks like this:

ZX81+34 bare board.jpg

Design of a (wooden) enclosure has started, also there is a chance I can lend an EEPROM programmer.

Testing

After I managed to program an EEPROM, I started testing the device, unfortunately disaster struck! I could not get the device powered up, and after some searching I found out I made a mistake in the creation of the footprint of the microUSB connector, that caused the reversal of the GND and 5V pins. This means that for some time (minutes) the whole device was fed with negative 5V, a disaster! From previous experience I know that some CMOS devices can survive this, with the exception of (older types) of EEPROM's which are often erased by feeding the wrong polarity of signals. Normally I add protection in the form of a diode between +5V and GND, but because voltage inversions normally cannot happen with an USB fed design I failed to take that precaution. :-(. A very bad start indeed, its possible any and all CMOS logic was destroyed.

After fixing the polarity problem I tried powering on again, and 5V came up with just 100mA consumption, but no life in the system. I found the main (13MHz) crystal oscillator was not running, and the problem seemed that the footprint for the crystal was for a 5 x 7mm device, while the only 13MHz crystal I could find was a 5 x 3mm device. The crystal seemed not to make contact. I replaced it for one that could be soldered to the edges of the crystal, but the oscillator still did not ran! I tried replacing the 33pF load capacitors with 15pF ones, but no luck. The "tiny logic" inverter used in the oscillator seemed to work with static logic signals, but did not want to oscillate, perhaps it was "blown up", I replaced it, and after some effort the oscillator proved to be working (jay!). I followed the clock signal through the timing chain, and it seemed to be working in all the SO-logic devices, but when it came to the last buffer before clocking the Z80 that tiny logic buffer failed! It was in a difficult place to desolder, and I had no replacement, so I arranged for a new one, to be de-soldered at work, where I can re-work with hot air under a microscope. Meanwhile the microUSB connector had fallen off the board (sigh), and was replaced by a contraption with a normal size USB type B connector on a small PCB, its ugly but it works.

now waiting until I can test with the new buffer and the Z80 in place, so far only tiny logic devices seem to have been damaged by the polarity inversion, lets hope northing else was.

-to be continued- (Saturday 11 july 2015)