Trying to restart a 33 years old ZX81 [SOLVED]

Discussions about Sinclair ZX80 and ZX81 Hardware
dinosaur
Posts: 44
Joined: Fri Aug 14, 2015 4:39 pm

Re: Trying to restart a 33 years old ZX81

Post by dinosaur »

Back home, and after a quick order to one of my favorite components suppliers, I received a brand new Z80 today (actually a Z84C0010, i.e. a 10MHz Z80), as well as a proper socket for it.

I soldered the socket, placed the Z80 into it, and powered the bare ZX81 board, linked just to the TV set. I immediately got a result, albeit not exactly the one I hoped for: instead of the plain white image I had with the dead Z80A, this one provides me with a psychedelic display (some sort of pattern can be seen, sometimes, but sometimes it changes continuously).

I reconnected the reset button as well as the keyboard (a mechanical one, from Indescomp), so that I could test the board and see if it's an ULA issue: at each reset, and as long as I keep the reset button pressed, I get the same white image as with the dead Z80A (which is logical), and as soon as I let the reset button go, the patterns start, each time different with each reset...
I also tried the SHIFT-F NEWLINE trick (switch to FAST mode, which should cause the screen to go blank, even if the ULA is broken and the rest of the ZX-81 working): no joy and still the same patterns.

I then plugged the Memotech 64Kb board I got, in case the culprits would be the RAM chips on the ZX-81 board, but still to no avail (just a new set of different patterns); of course, I can't be sure that the said extension RAM is still in working order either...

I finally checked the Z80 signals with a scope (alas I only have a 2 channels analog oscilloscope, so it's far from a logic analyzer), and from what I could see and infer, the Z80 is indeed executing "something", but that something is probably just random junk...

I'm now again wondering if the ROM is involved (it could have suffered the same Gremlins attack as the Z80A, or simply have lost its contents, like I originally suspected and described in my first post in this thread)... I could replace the original ROM with a 2764 (as long as I can get my old EPROM programmer to work: I'm not even sure the EPROM of the latter is still healthy...), but the pinout is different than the ROM on the ZX-81 board. There's however apparently room for a 2764 on that issue 3 board (did anyone already replace the ZX-81 ROM with an EPROM on an issue 3 board ?). Also, what ROM image should I use (are there different images for different board issues) ?
User avatar
1024MAK
Posts: 5103
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Trying to restart a 33 years old ZX81

Post by 1024MAK »

The pin-out of the ROM socket will not directly take a 2764 EPROM :-(
However, with some careful rewiring, you can use a 2764 or a 27C64 EPROM

ZX81 Chip Pin-outs
Schematic
Updated Schematic (some errors corrected), but with French video circuit
2764 pin out:
Image

Thread about ROMs and EPROMs

You want the "improved" version 2 ROM 8k byte image with the maths bug fix. There has only ever been two ROM versions for the ZX81. But because the ROM is compatible with the ZX80, sometimes this causes confusion (the ZX80's original ROM is 4k bytes in size).
There are many copies on the web, I point you however in this direction Kio's Sinclair ZX Computers Archive

Good luck

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
dinosaur
Posts: 44
Joined: Fri Aug 14, 2015 4:39 pm

Re: Trying to restart a 33 years old ZX81

Post by dinosaur »

1024MAK wrote:The pin-out of the ROM socket will not directly take a 2764 EPROM :-(
Well, but for the ULA, my ZX-81 didn't have any socket... But the PCB at the ROM location got room for a 28 pins socket, thus why I wondered... I'll have a look at that socket wiring on the PCB however, because I can already see that pin 1 (for a DIP-28) and 28 are properly connected to the +5V, like they should for a 2764... Perhaps not much work to do to make it compatible (might work by bending upwards (till getting them horizontal) the pins of the 2764 that don't match and wiring them to the proper socket pins with small copper wires)...
However, with some careful rewiring, you can use a 2764 or a 27C64 EPROM
I think I'll even use a 27C128 (got tons of these in my "recycled spares", but not a single 27C64...).

The good news is that I exhumed my second oldest EPROM programmer (the oldest was using.... the ZX-81 itself !... Kind of a hen and egg issue now... and the newest was using a Sinclair QL, but the latter got a dead keyboard membrane...), and it seems to still be working; I remember that I reprogrammed its EPROM a decade ago or so, precisely because I feared the original programming would ebb away with time... I was well inspired. :D
Thanks for the links ! :)
Yes, I already found this schematics and got it printed as soon as I started investigating the problem.
You want the "improved" version 2 ROM 8k byte image with the maths bug fix. There has only ever been two ROM versions for the ZX81. But because the ROM is compatible with the ZX80, sometimes this causes confusion (the ZX80's original ROM is 4k bytes in size).
There are many copies on the web, I point you however in this direction Kio's Sinclair ZX Computers Archive
Many thanks ! :D
Good luck
I'll certainly need some, yes. :lol:
dinosaur
Posts: 44
Joined: Fri Aug 14, 2015 4:39 pm

Re: Trying to restart a 33 years old ZX81

Post by dinosaur »

It worked ! :D

Here is what I did:
  • I used a 27C128, programmed it with two ZX-81 ROM images in a row (so that the code could be accessed with A13 either at 0 or 1 level). Of course, a 27C64 programmed with just one image of the ROM would have worked just as well, but I didn't have one at hand.
  • I desoldered the original "ROM" (actually, and I'm pretty darn sure of it now that it is proved it lost at least part of its contents: an EPROM without an UV erasing window), and placed a 28 pins socket in it's place (i.e. using the full set of pads on the issue 3 board).
  • I checked the signals and, good news, pins 1 (Vpp), 28 (Vcc), 27 (~PGM) and 26 (A13) are all tied to the +5V (also meaning the upper image of the ZX-81 ROM is addressed in the 27C128). Another good surprise: pin 2 is conveniently duplicating A12 (which is also on pin 23, corresponding to pin 21 of the original, DIP-24 ROM). So, in fact, the only incompatible pins on the socket are pin 23 (connected to A12 instead of A11) and 20 (connected to A11 instead of a ~CE signal).
  • I therefore bent upwards (till they are horizontal) the pins 20 and 23 of the 27C128, and linked them (via a phone-line copper wire soldered at one end to the PCB and to the other to a single "tulip" cut from a socket, so that it can be connected to the horizontally bent pins) to (respectively) GND and A11.
Here is the result:
BackFromTheDead.jpg
TV picture
(354.83 KiB) Downloaded 532 times
(sorry for the low quality: the picture was taken with a cheap mobile phone and the motion blur is due to the low luminosity of the screen as well as, probably, me still trembling with excitement :lol: )

Now, is still got to revive the Memotech 64K RAM extension and HRG modules... :lol:

Thanks a bunch for your help, folks !
IanB
Posts: 60
Joined: Mon Jul 27, 2015 5:40 am
Location: Northampton UK

Re: Trying to restart a 33 years old ZX81

Post by IanB »

Congratulations!

Regarding the Memotech HRG, I bought one and remember being thoroughly disappointed. It came with a set of ROM routines for plotting, drawing lines, etc, but they were so hopelessly, orders of magnitude slow that it was clear that there was no use for them at all. I was a machine code programmer by then, but I'd hoped to at least be able to draw a few lines from a quick BASIC program, like to draw a graph etc. But several seconds to draw one line? Sheesh.

The thing that puzzled me was how Memotech had managed to write such pathetically slow routines and think them adequate for release in a product.
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: Trying to restart a 33 years old ZX81

Post by Moggy »

IanB wrote:Congratulations!

Regarding the Memotech HRG, I bought one and remember being thoroughly disappointed. It came with a set of ROM routines for plotting, drawing lines, etc, but they were so hopelessly, orders of magnitude slow that it was clear that there was no use for them at all. I was a machine code programmer by then, but I'd hoped to at least be able to draw a few lines from a quick BASIC program, like to draw a graph etc. But several seconds to draw one line? Sheesh.

The thing that puzzled me was how Memotech had managed to write such pathetically slow routines and think them adequate for release in a product.
Agreed I still have one for nostalgias sake but it is damn slow, their Z80 assembler module is fun to play with though.
Maybe we were more easily pleased back then. :lol:
IanB
Posts: 60
Joined: Mon Jul 27, 2015 5:40 am
Location: Northampton UK

Re: Trying to restart a 33 years old ZX81 [SOLVED]

Post by IanB »

I wasn't. I was really not pleased at all. :)
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: Trying to restart a 33 years old ZX81 [SOLVED]

Post by Moggy »

IanB wrote:I wasn't. I was really not pleased at all. :)
They were a little disappointing especially when you consider how relatively expensive they were.
dinosaur
Posts: 44
Joined: Fri Aug 14, 2015 4:39 pm

Re: Trying to restart a 33 years old ZX81 [SOLVED]

Post by dinosaur »

Got the Memopak 64k memory module back online and working; I changed the 7805 (which pins were so badly bent, apparently during the building process, that one was almost fully cracked and barely made a contact), as well as the filtering capacitor, then I had to reload with some tin the PCB tracks that make up the edge connectors of the ZX-81 and of the bus extender (provided with the Indescomp keyboard+box) in order to restore good contacts.

As for the HRG module, as you both pointed out, it was extremely disappointing and but for a math plotter program, I never really used it... I don't think I'll even bother restoring it (a couple of contacts of its connector are badly damaged) and will just call it a dead part.

By the way there was a purely software high resolution alternative: HRG v7.0 by Jean-Michel Cohen. It works by redefining the characters to 1 pixel high ones and by increasing the number of lines to 220, and moving the font address to point elsewhere in the ROM, giving a 256x220 pixels screen. Alas, there's no suite of bytes in the ROM that would allow exactly all the 256 combinations of 8x1 pixels characters and some character codes are actually reserved for the BASIC and can't be used, so the author only found an approximation and via a translation table, was able to provide 90 combinations. Still, when drawing a line, you could get a pixel missing, or slightly horizontally offset, or a second, spurious pixel appearing on the same line. It is quite fast however, MUCH faster than Memotech's HRG, and purely software !
IanB
Posts: 60
Joined: Mon Jul 27, 2015 5:40 am
Location: Northampton UK

Re: Trying to restart a 33 years old ZX81 [SOLVED]

Post by IanB »

I think there was an unofficial law in the 1980s that any 78/79 series regulator had to be overloaded, inadequately heatsinked, and preferably so badly mounted that either the pins would snap or it would tear the tracks off the circuit board. They must have been the most abused component in history :)
Post Reply