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!