Eh, Close Enough

Matt Regan reproduced a Commodore 64's CPU using just logic and memory chips. We're not sure if it plays Doom, but it does play Pac-Man.

Nick Bild
2 months agoRetro Tech
A homebrew 6502 CPU playing Pac-Man (📷: Dr. Matt Regan)

Vintage computing equipment from the early days of the personal computing revolution is aging and often found to be in need of more than a little TLC. As such, retro computing enthusiasts generally have to be pretty good with a soldering iron and multimeter to keep things humming along smoothly. But sometimes the hardware is just too far gone to be repaired. Leaky capacitors and broken traces can be fixed, but a blown chip cannot.

So as these systems get older, many hobbyists are turning their attention more to reproduction than repair. The idea is to perfectly reproduce the function of a classic machine using all, or at least mostly, modern parts. And that is exactly what Dr. Matt Regan recently set out to do with the Commodore 64. As the best-selling single computer model of all time there are still plenty of machines available on the second-hand market, so you could almost certainly get your hands on the real deal for less cash. However, it is not all about the Benjamins for enthusiasts. Efforts like this will help to preserve classic computers for many years to come, and they are excellent learning opportunities as well.

Regan’s plan is to build a Commodore 64 without any of its custom chips, including the CPU, SID, PLA, and VIC-II. If all goes well, they will be replaced with nothing but common logic, SRAM, and EPROM chips that you can still buy brand new today. This is, of course, a very large project, so it was split up into pieces, with the first part being dedicated to reproducing the function of the CPU. The Commodore used a MOS 6510 CPU, but Regan decided to clone the very similar 6502.

Rather than copying the circuit design of the Commodore’s CPU, Regan instead cloned its function. This was achieved by using an amount of memory that would have been considered extravagant back in the day. A pair of EPROM chips storing 2 million 16-bit words each was used to store all possible input/output combinations. They accept a 16-bit wide address and 8 bits of data, and they output the result to a set of four octal flip-flops. 8 bits of that is the normal data output of the CPU, with the remaining 24 bits representing the current state of the CPU and a set of control signals that modify its operation.

The data on the EPROMs cannot be written on the fly, so there is also some SRAM in the mix that serves as a temporary storage area for the processor’s calculations. Once the design was finalized, it was laid out on a custom PCB. To test it, Regan used the board to run Pac-Man for the Apple II (the Apple used essentially the same CPU as the Commodore 64).

Brand new 6502 CPUs can still be purchased for a few bucks, so this part of the build is perhaps not the most important from the standpoint of preservation. But the video goes into great detail about how the reproduction CPU operates, and will give you a lot of insight into exactly how vintage processors worked. So if that sort of thing interests you, then it is a must-watch.

Nick Bild
R&D, creativity, and building the next big thing you never knew you wanted are my specialties.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles