Git Product home page Git Product logo

arduino-c64-emulator's Introduction

The Arduino C64 Emulator

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:

Memory Mapping Between C64 and Arduino


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.

Schematic Composite signal


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: Click here




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.

High resolution image of a lion

More

Install and Run the emulator
Create Hires header files \

Video on Youtube

Watch video for more details
Youtube thumbnail

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.