Skip to content
All prices in US$ - All orders receive free delivery, worldwide - Click here to learn more
All prices in US$ - All orders receive free delivery, worldwide - Click here to learn more
Arduino emulation of a Commodore C64

Arduino emulation of a Commodore C64


An Arduino is actually powerful enough to emulate a C64. With only a few external components it outputs PAL or NTSC video and can be connected to any TV or composite input of an analog monitor.

This is a further development of the Nano VIC-20 project by Jan Ostmann. The core is an emulator function for the MOS 6502/6510 CPU. This executes the 16 kilobytes of kernal and basic ROM code permanently stored in the Arduino's flash memory. The emulator maps the C64 memory areas to the Arduino memory as shown here:

Since the Uno/Nano has only 2k RAM, which is almost used up by the video RAM and the system itself, the 1k EEPROM there is also used as RAM. PAL or NTSC composite video is generated by a timer interrupt routine which is called every 64ms (PAL) or every 63.5ms (NTSC).

This outputs the sync pulses, the front and rear porch and clocks out the visible pixels using the shift register used for serial communication protocols such as UART, SPI, I2C. These three signals are then mixed together by a few external components.

A PS/2 or PS/2 compatible USB keyboard can be used to enter simple BASIC programs. I used the method described in another project to process the keyboard inputs on the Arduino.

This is of course just an educational fun project. With only a little more than 1k RAM, no color, no graphics and sound capabilities, it is not possible to play any of the typical C64 games on it.

However, when running on an Arduino Mega, we get 6000 bytes of BASIC RAM and a 320x200 pixel bitmap mode. The bitmaps can only be stored in flash memory, so BASIC programs can't change them. Note that there are still no colors, but only black and white.

You can see the emulation in action through the following video:

 For all the code and more, visit the github page

Finally - to keep up to date with interesting news, offers and new products - interact with us on facebookinstagram, and twitter.

Previous article Reset your Canon printer’s maintenance cartridge with this hack

Leave a comment

Comments must be approved before appearing

* Required fields