C64 Emulator For The Arduino Due


Almost a year ago, [miker00lz] started a thread on the Arduino forums telling everyone about a 6502 emulator and BASIC interpreter he wrote for an Arduino Uno. The chip inside the Uno isn’t a powerhouse by any means, and with only 2KB of RAM it’s far less capable than just about any computer from the 70s. Arduino works on a lot of different chips, though, and after a few months, [Jan] turned an Arduino Due into a Commodore 64 emulator.

[Jan]’s code isn’t limited to the DUE, and can be used with any chip with enough memory. If you’re feeling fancy, you can connect a TFT display for all the vintage goodness of PETSCII graphics, all while running a faster BASIC than the very stripped down EHBASIC.

Because the emulator is using software to talk to the outside world, it should be possible to use this project to interface with the cooler chips found in Commodore machines – SIDs for one, but also the cartridge port for some vintage Ethernet goodness. It’s not even limited to Commodore machines, either: the POKEY chips found in Atari 8-bit micros are seriously underutilized in the chiptune and demoscene, and having modern hardware to play with these chips couldn’t hurt in the slightest.

17 thoughts on “C64 Emulator For The Arduino Due

      1. I’m not sure where the issue lies – but the last dump of cpu.c in the Arduino forum thread – the code appears to be an implementation of a 6502 running C=64 BASIC. That said, that’s all it is – no other support is apparent for emulation of SID (sound) or anything else, really. So it might be better to call it a 6502 emulator running the C=64 BASIC roms (or something – there’s a large array of hex values in there – and looking at the rest of the code, it appears it might be a ROM dump, not sure).

        1. You can just add in the SID library and decode the register in the read/write6502 function and it has a SID implementation.

          At the moment it just emulates the color textmode because I didn’t get further until it got featured on HaD.

          1. Oh, I know it could be implemented and how it could be – I was just merely commenting on the current state of things, in relation to the comment on the title.

            For some people, they won’t consider it a full “C=64 emulator” until every last peripheral interface is included. In a way that is justified (especially as it was an “all-in-one” machine – for the most part), but strictly speaking isn’t really necessary, as “graphics” and “sound” are really peripheral functions on any computer system.

            This system can – at a certain level – be called a proper emulator because it incorporates the base details needed: the CPU, RAM, and ROM. I guess you could say I see both sides of the argument.

    1. Because it’s the same as in the C64.
      Actually the same as in all of the CBM PETSCII machines.

      And yes it’s an emulator.
      But only the textmode is currently implemented.

      1. Actually the character ROM on the C64 is different as single pixels are hard to read on an C=64 connected to an ordinary TV. Most letters have to pixels next to each other to solve this ;)

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.