A 100 Mhz 6502 CPU | Blathering

I am not an expert in… well… anything, but I am I am continually impressed by the work done by so many in the world, especially in the “retro tech” world. I read this post by Jürgen Müller on his personal site concerning his project of an FPGA based 100 Mhz 6502 CPU. Just reading the title, my thoughts went in numerous directions about the amazing possibilities

Using FPGA to emulate vintage computer hardware, let alone the 6502 CPU is not new but packaging it on a small board the size of a 40-pin dual inline package hasn’t been done before. The work of Jürgen Müller is an extension on the work of others. This project is packaged on a Spartan-6 FPGA with 64 Kbyte on-chip RAM, mounted on a small circuit board and coined the 65F02. It has the ability to access the external bus on the host system with the correct timing. The FPGA CPU core runs at 100 MHZ where the idea is to make this a “universal” accelerator for 6502 and 65C02 based computers that only requires plugging it into the CPU socket.

This won’t work with all computers based on this architecture and there are some limitations. More complex systems like the Commodore 64 with bank switching also provide some challenges as the extended memory cannot be run at the accelerated rate. The expansion boards and bank switching need to be known and emulated by the 65F02. While it makes an effort to detect and access the time-critical peripheral devices there are likely to be incompatible software and and-on hardware. Also, not all software should be accelerated, like video games as they are tied closely to the original systems timings.

The Apple II and Commodore PET series of computers are currently supported. The Acorn BBC Micro, Atari 400 and possibly the Commodore 64 can possibly be supported but the developer doesn’t have any of those systems. If you would be interested in helping with this project and have the hardware to test it against, contact Jürgen Müller. There are some additional caveats for the PET line that should additionally be noted. In non-accelerated mode, the 65F02 should be fully compatible with any software or add-on hardware, unless either use the undocumented 6502 opcodes.

The 6510 MPU in the Commodore 64, although quite similar to the 6502 has some additional I/O pins to control the computer’s memory map by bank switching. I can’t say for certain, but it seems likely that the 65F02 could be configured as such that it may be possible to have a drop in replacement to a burned out or damaged 6510. I am not so much interested in the acceleration capabilities of the chip but rather as a drop in replacement for the 6510. The C64 MCU is likely to become more rare as time goes on. It would be unfortunate for stock piles of broken vintage computers to needlessly litter the basements of countless vintage tech YouTubers as unfinished projects.

A Few Emails Later

I had some great conversations over email with Jürgen Müller about supporting the Commodore 64 and he expressed the challenges. The different pin-outs of the 6510 CPU in comparison to the 6502 is a major stumbling block. The pin functions on the 65F02’s FPGA can be freely programmed, the PCB also contains level converter ICs as None of the FPGAs available today accept the 5V signal levels used in 1980s computers directly. On the current design those level
converters are hard-wired and define each pin on the DIP-40 socket as either an input or an output — or a bi-directional one in case of the data bus. Since the 6510 and 6502 pinouts differ in the placement of inputs vs. outputs, the 65F02 can’t be used in a C64.

He also explained to me that the 64 kByte on-chip RAM on the FPGA are a bit small for the C64. With more than 64k total RAM+ROM and its flexible memory banking scheme, the C64 could not be fully accelerated by the current 65F02.

He did say that with the recent wave of interest in the 65F02 he as begun to think about a new revision, with more on-board memory and flexible pin drivers but no promises. This begins to look like a major redesign — but it will likely be made into a winter project. If it works out, that should be the right platform to also support the C64.

There is a lot more to this project than I have commented on and I highly recommend reading through it yourself to understand the scope of the project. I find the whole thing quite fascinating. I wish I had the knowledge to help out more with the project, but outside of testing and taking detailed notes, I am not useful to this project at all.

Final Thoughts

It’s always great to see these kind of retro innovations get developed to this day. The unfortunate reality of the retro tech hobby is that eventually, all these machines will just stop working unless there are modern replacements. Currently, for the Commodore 64, there are modern implementations of the SID Chip available, work is being done on an FPGA replacement for the VIC-II chip and the CIA Chips. Now I see that there is work being done on for the 6502 which is closely related to the 6510. Currently, this won’t work but it is exciting to see that it is at least a possibility but the development for such a thing is almost a reality.

It does make me pause and think. When does a thing no longer be that same thing? It makes me thing of the “Ship of Theseus” thought experiment. If we continue to replace everything with new modern components, at what point do we no longer have the fun and charm of that 64 KB, 8-bit machine? What makes a Commodore 64 a Commodore 64? I probably get the most fun out of using the C64 Maxi for my Commodore 8-bit fun but with the USB ports and HDMI out, does that make it not a Commodore 64? I really am fascinated by the Ultimate 64 because it seems to be closer to the original 8-bit fun but I can’t help but ponder on that “Ship of Theseus” when is something no longer that thing.

Regardless of my pondering, keeping retro technology alive is a wonderful thing. I look at it as a preservation of computing history. I also appreciate the art and the problem solving involved in making applications fit in the various limitations established by the antiquated hardware. Game development on the 6502 hardware has seemingly increased in recent times so there is tangible value in the hobby. I can’t help but wonder where this goes from here. I certainly never imagined such unbelievable interest in any of this, but I am thrilled it is there.

References

The 100 Mhz 6502 Project
FPGA based Commodore CIA Chip Replacement
Ultimate 64 | A New Commodore 64 main board
https://en.wikipedia.org/wiki/Ship_of_Theseus
Spartan-6 FPGA

4 thoughts on “A 100 Mhz 6502 CPU | Blathering

Leave a Reply