C64 Emulator For The Arduino Due

c64

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.

Comments

  1. Jacek says:

    10 PRINT “A$S”
    20 GOTO 10
    RUN

    Who did NOT do it in the past?

  2. Yarr says:

    Not a “Commodore 64 emulator”.

    • Frank W says:

      I think “simulator” is the proper term here.

      • cr0sh says:

        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).

        • doge says:

          I doubt anything else is emulated than the CPU and the ROM basic. Hardly a “C64″, but still neat.

        • janostman says:

          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.

          • cr0sh says:

            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.

  3. Galane says:

    How can you emulate a computer with 64K of memory (note that the 64K does not have 64K of usable RAM!) on an Arduino that has only 2K of RAM?

  4. Show it playing a round of Lazy Jones and I’ll have my next project.

  5. Anders Fogh (Walt/Bonzai) says:

    Why do the use the charecter ROM from a VIC20 in this project ?!?

    • janostman says:

      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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 94,503 other followers