Saturday 30 November 2013

Commodore 64 PLA Replacement

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

As I have mentioned before, the Achilles heel of many vintage computers are custom chips. These PLA (in Commodore terminology) or ULA (in Sinclair terminology) chips were a way to reduce cost and size by combining the functionality of a number of logic chips into a single package. Sometimes doing simple address decoding (as in many Commodore machines) and also generating sound and video (as in the case of the ZX81 and ZX Spectrum, Acorn Electron etc.).
The trouble with these is they tend to run hot and eventually fail, and replacements they haven't been produced in the last 20 years, the so lead to the demise of many machines.
Over the years, many methods have been used to replace these. The Sinclair ones contain a lot of functionality, so replacement is quite complex, as in my ZX81 Clone.
The Commodore ones are a lot simpler and are mainly address decoding. So the inputs are the address lines, and the outputs are a series of enable lines. So for this address range, enable this chip, for that address range, enable that chip, and so on. There isn't any state or anything more complicated than a simple truth table.
Many people have suggested an EPROM could be used to replace this, the one I followed was here (in German) The pinouts aren't exactly the same, so a few pins need to be redirected. I built a simple adapter for this.
I used a wirewrap socket, pushing it part way through and then soldering it, before cutting of the pins and soldering the remainder two holes to the left as the EPROM socket
Finally adding the 4 wire links.
Here we have a Commodore 64 which is working except for the PLA. It has been tested with a working PLA, and all is well, so time to try out the replacement PLA.
I used a one time programmable version EPROM (an Atmel AT27C512CR-45PU), as these seemed to offer appropriate timing of 45mS, and others had reported success with these.
First off, it looked promising, the system ran for several hours. However, I noticed the SID had been getting rather hot. I went back to a working PLA and ran it for a further couple of hours and the SID ran as normal (which is still hot, but not as hot - must get an IR thermometer). I think this is related to the timing issues. It is possible that certain combinations of outputs may be enabled at the same time during the short time the EPROM is in its intermediate state before the data lines settle down. There is no timing element or enable mechanism to stop this happening.
So, it looks like this isn't a viable long term solution. I think I'm going to try building a replacement with a couple of 20V8 GALs next.

UPDATE:
I've has good results with EPROMs and a capacitor to alter the timing slightly, also a nicer PCB