Hi, I have just done a very successful project with an ATmega32u4 Pro Micro where I transfer data from a PC to a Commodore 64 through its UserPort at a great speed. For quick transfer and testing of code on a real machine its a fantastic little and cheap way to achieve this. I was actually quite surprised how easy it was - and it was my first project with Arduino.
Now, I have another idea for integration that is quite a bit more complex and that is to use the Arduino to write to some sort of RAM that is also accessed as a ROM would normally through the cartridge port of the C64. The standard ROM used for most C64 cartridges is normal 8KB 2764 EEPROMS. Although the address bus can access a full 64KB, the C64 only sees 8KB at a time so more advanced and bigger cartridges did simple bank switching logic to reach all 64KB (and indeed bigger ones).
Well I know its rather easy to add RAM to an Arduino, although its both rather slow to write and read, normally through SPI type of communication. Write speed does not bother me as its very little data we are talking about here - but I need the circuit to also be able to address the RAM from the C64 at the same time! Yes so instead of being a plain ROM it works like a piece of 8KB memory that is dynamically altered by Arduino. Imagine the possibilities.
My question is rather simple, how hard would it be to do this? The C64 is a rather old device running at 1Mhz so I can't imagine timing for adressing the RAM would be a big problem - although I have no idea how one would achieve this and how to make the Arduino writing to RAM and the C64 reading it not tripping over each other. From what I have seen from another project where the Arduino was used to dump the contents of a C64 cartridge the only thing he did to read it was set the address bus pins and read the data pins after. I somehow doubt the Arduino have high enough speed to emulate that, and besides it has too little memory as well.
Here is some info about the C64 Expansion Port: