Saturday 23 February 2013

Sinclair ZX80 Repair

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

I've been doing a number of projects recently on the ZX81, and one of the things that comes up from time to time, is its predecessor, the Sinclair ZX80. This was a similar machine, in many ways the ZX81 is a cost reduced version of the ZX80.
The ZX81 had a new version of BASIC, with various improvements. It also had additional hardware to support fast and slow modes, which allow it to temporarily disable the screen display (which takes up most of the processors time normally) to allow the program to have full use of the processor.
Internally, the main change is the 21 chips in the ZX80 were reduced to 4 (or 5) in the ZX81, which together with the reduction in board size this brings made it much cheaper to produce than the ZX80. Apart from fast mode, the spec is largely the same, 1K RAM, 3.25MHz Z80 CPU. The ZX81 version of BASIC is in an 8K ROM as opposed to the ZX80's 4K. The other difference is the external case of the ZX80 seems to be made of the same stuff they make yoghurt cartons out of, making them very susceptible to damage. The ZX81 has a more sturdy case.
I've been after a ZX80 for ages. Recently, I decided it would be interesting to build one from scratch. That's progressing, but currently looks like this, so there is still a bit to do.
Work has been interrupted as I have managed to get hold of an actual ZX80. It was sold as 'not working', but I'm never put off by that on something that should be perfectly serviceable. One of the beauties of the ZX80 is that is it build from mainly standard parts (no ULA's), so any faulty parts can be replaced. A bonus was that this ZX80 was built from a kit, so the chips are all socketed, making that even easier.
Like many computers of that age, this one had been modified over time. The ZX80 had a wire link to allow white on black or black on white mode, this has been wired to an external switch and a hole drilled on the case for the switch (covered by the sticker on the top, below the vent).
Sinclair also released the ZX81 version of BASIC for the ZX80 (albeit without support for fast / slow modes). Some of the keys changed function, so it would have been supplied with a new keyboard overlay for ZX81 mode (which I don't have). This unit has both ROM chips fitted 'piggy backed' with two pins each bent out and wired to a switch to select which version to use.
One of the issues these computers suffered from was the dreaded 'RAM pack wobble'. The RAM packs plugged into the back of the unit to expand the RAM to 16K. The connector used was susceptible to being knocked (or sometimes someone sneezing nearby), which usually resulted in the computer resetting and losing all the work you'd been doing. Talking to the original owner, this had beren remedied by soldering the RAM pack on via a ribbon cable. This has since been removed, but that process had left a few small solder bridges between pins on the connector, presumably leading to the 'not working' situation. There were also some loose wires on the switch, which was stopping the ZX80 ROM working. I took the (difficult) decision to undo the ROM modification. The ZX80 version was the one I wanted, and so I removed and separated the two ROM chips.
The one of the left is the 4732, the original 4K ROM. The one on the right, the 2364 is the 8K ZX81 style version. Presumably due to height restrictions, the socket had been removed and the chips soldered directly to the board. I decided to fit a socket, I tried to find one of a suitable vintage so it didn't look out of place. With everything cleaned up, I tried it out, with the 8K ZX81 ROM which had been working. No problems, still working. It's easy to tell it's 8K BASIC as some of the keys are different. For example 10 PRINT "hi" is 1, 0, p, shift p, h, i, shift p on the ZX81, it's 1, 0, o, shift y, h, i, shift y on the ZX80. The font is also narrower on the later BASIC.
Next I tried the ZX80 ROM which hadn't worked before, and I'm pleased to say that now worked.
Below is the result of
10 PRINT "HELLO ZX80" 
20 GOTO 10. 
Apologies for the photo, I haven't done the composite video mod (and don't intend to), so it's on a CRT monitor. However, you can still just see the ZX80 is has a winder font.
So, one ZX80 restored to original condition. I've left it with the original 4K ROM, so it's now in permanent ZX80 mode. The 8K version is there if I want it, but I doubt I'll switch back to that since I have no keyboard overlay (and several ZX81s if I do want to use the later version of BASIC).
The next task is to build a 16K RAM pack for it.....

Sunday 10 February 2013

Commodore VIC20 Repair

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

[UPDATE - VIC20 repair with 68766 EPROM]

I while ago, as part of a box of old computers, I acquired a Commodore VIC20. Specifically, the VIC20 CR (the 'Cost Reduced' version with the smaller main board and Commodore 64 style DIN power connector). Like the rest of the collection, it was a bit tatty and didn't work.
When powered on, it produced a black screen. It was producing a video signal, there just wasn't anything on it, no text, no border. Looking at the board, there was some corrosion around the pins of the two 6522 chips which drive the keyboard and the user port.
I removed the two corroded chips and fitted sockets - it should power on without these chips present (but obviously the keyboard and user port won't work. I tried it again but the screen was still black. A bit of tracing around with the scope showed the CPU wasn't clocking and was getting warm. I removed that as well, and fitted a socket and a known working 6502. Still black. The finger was now pointing at the chip which controls the video output, the VIC chip.
This was another of those custom chips which seem popular in machines of this vintage, they run hot, fail and are impossible to replace. It looked OK, and wasn't running too hot, but I didn't have a replacement to try. And there I left it for quite a while until I was able to get hold of a working VIC 20 motherboard to do some testing with. When I got the second board, I tried swapping the VIC chips, and it turned out they both worked. So the VIC was not guilty after all. Further probing found some of the data lines were being held low. This could have been anything on the bus, one several TTL chips, an assortment of RAM and ROM chips - the VIC, 6522 VIA's and the 6502 CPU had been ruled out. The VIC has three ROMs, the OS ('kernal' seems to be how it is spelled in all the documentation I've seen), BASIC and a character ROM for the display. The kernal is socketed, the others aren't, so I tried that first, and rather surprisingly it turned out to be the thing causing the fault. Normally 80's mask ROM's are pretty indestructible, I had the Sinclair ZX81 ROM from my very first computer on my desk for many years, and even with bent and missing pins, I managed to get that working when I was testing some ZX81 stuff last year.
I tried cleaning the pins and the socket and reseating the chip, but couldn't get it to work. The custom 901486-07 ROM is an 8K 24 pin device, and difficult to replace directly with an EPROM. The standard 8K EPROM is a 2764, which is 28 pin. The correct signals are there, just not all on the same pins, so I made an adapter out of a 24 pin DIL header and a 28 pin socket. Most of the pins are straight through, but a few of the pins have to be rerouted.
All I need then was to program the image onto the EPROM. At this point I could have built the reverse adapter and then read in the working ROM, but I cheated and downloaded an image of the ROM from the net. Burning an EPROM used to be a common task, I remember burning several sets of BIOS ROMs for early PC's network boot ROMs and many, many BBC Micro ROMs. But it has been a couple of years since I last did that. I reached for the box on the top shelf marked 'EPROM Programmer' and found my old programmer inside, together with my trusty EPROM eraser. It is actually a PSION datapak formatter, but it does the same job - expose the silicon to UV light through the window in the top to erase the contents (PSION datapaks were just EPROMs in a cartridge).
The programmer was a cheap Chinese one from ebay about 5 years ago, and that proved to be quite an issue.
Although there is a USB socket onboard, it's actually only for power and the data is transferred using the parallel port. Parallel port? Oh dear, doesn't look like any of these PCs have a parallel port anymore. I did have a parallel / serial PCI Express card, so I fitted that, found the drivers and tried the programmer software. No luck, I think it needed a 'real' parallel port, i.e. one on the motherboard, using one of the standard 278/378/3BC addresses. There were also issues with compatibility with modern operating systems. Eventually, I ended up dusting off (literally) an old Windows 98 SE laptop I used to use for this purpose. The software was still on there and seemed to work this time.
Takes you back eh? All I had to do then was get the image onto the laptop. Sadly 98SE had poor support for the fledgling idea of USB sticks, and doesn't support most of them, and no one supplies 98 drivers these days. Oh dear. I eventually ended up using a compact flash to PCMCIA adapter that I used for loading things onto my Amiga 1200, and finally copied the image onto the laptop. Once the image was on the laptop, it was just a case of burning the image onto the ROM. Installing the ROM into the adapter and installing the adapter into the VIC 20.
Fingers crossed, I turned it on.
Success! Now that was a lot more difficult than I had been expecting!