In this article we will look at how you can build a Raspberry Pi Commodore 64, using an actual original Commodore 64 keyboard. Under the hood is the fantastic “Bare Metal” BMC64 Pi software. No expensive keyboard adapters required!
Retro fans will obviously answer “because I want to, because I can”, but in my case there is a little more to the story.
Back in the early 80s, I started out with a Vic 20 and progressed to a Sinclair Spectrum, but always wanted a Commodore 64.
I started getting back into retro computing via, like many people, emulation. Retropie, Vice64, WinUAE, and eventually MiSTeR FPGA. As a programmer and hardware hacker, I eventually found original hardware on Fleabay and Facebook private sales.
In order to get a great-looking AND functional C64 without paying the super high Canada prices, I bought a working machine that looked like poop and a broken machine that looked beautiful.
Weird thing is, the “bad” case wasn’t bad at all after a bunch of cleaning. The obvious step was to put a Raspberry Pi in there.
What about the TheC64 Maxi? I actually did buy one, it is sat at my brother’s house waiting for him to be able to visit due to the pandemic. It’s definitely a more convenient package, especially as it includes everything you need to get up and running in seconds.
The main difference is the Maxi is also emulating a Commodore 64, the combination of actual C64 keyboard and a Pi could often work out cheaper, especially as the Maxi was not available yet in North America, and a Pi allows you to run other software by simply swapping the SD card.
If you are using an actual Commodore 64 keyboard then first follow the wiring instructions on the repository. Otherwise you can pretty much skip this section.
If you don’t want to use a USB joystick/joypad, you can use an actual Commodore/Atari joystick, by wiring up the GPIO along with the keyboard. I preferred USB but it is an option, including there being PCB schematics if you are really into that.
As mentioned in the video, I used an optional GPIO breakout to see more easily which wire needs to go where, and they can be found cheaply on ebay or bought direct from Adafruit.
For power, I like these 3amp bricks with power switch.
My power LED on the case is wired up to 5v and ground via a 330 ohm resistor.
To keep my machine cool, I added a fan. Simply wire up the power to 5v and ground to ground on the Pi. I can’t find my precise fan online but it is a Noctua 5v DC fan and it is super quiet.
Get BMC64 from the website or from the Github repository.
BMC64 is a bare metal C64 emulator for the Raspberry Pi with true 50hz/60hz smooth scrolling and low latency between input & video/audio. Four other Commodore machines are available as well; C128, Vic20, Plus/4 and PET.
BMC64 is a “bare metal” fork of the fantastic Vice emulator. This means it launches directly into the C64 environment rather than running on top of an operating system. This gives remarkable speed, accuracy, compatibility, and performance, and means you don’t need to worry about powering off corrupting your SD card.
There are two options, format an SD card and drop the files onto there, or use a disk image as if you were burning Raspbian etc. Raspberry Pi now have an official disk imager, or you could use Etcher.
Either way you will need to find C64 ROM binaries, drop the files onto the card into the C64 folder, and rename them.
After boot using USB keyboard, or by first editing the SD card configuration files, you will need to specify that you are using the original keyboard by setting the GPIO Configuration.
Games can be found online in various places, including Archive.org and can be loaded off your SD card or a removable USB memory stick.
There are three main types of C64 files:
- Cartridge .crt – These are dumps of cartridges, and therefore launch immediately with no loading time or disk swapping. As well as games, there are also utility cartridges such as Action Replay etc. These go on your SD card in the Carts folder.
- Disk .D64 – Floppy disk images are the next fastest loading, and as they replicate an actual floppy, are limited in capacity. This means some games might span multiple disks.
- Tape .Tap – Tapes are the slowest to load, and are usually best avoided, but some games will only be available this way.
Once booted, use F12 to bring up the menu (or Commodore Key+F7 if on an actual C64 keyboard), and then you can launch/attach your cartridge or disks etc.
If loading from BASIC, use:
- load “$”,8 to see what is on a disk
- load “*”,8,1 to load the first program on a disk
- load “filename”,8,1 to load the named file
- load “” to load the first program on tape
BMC64 allows a very authentic experience of Commodore 64 computing, without the issues of original motherboard rot, dying floppy disks, and collecting increasingly expensive hardware.
Of course it is not 100% authentic, but if you happen to come by an original C64 keyboard, or want the option to switch the SD card and play a SNES game too, then this is well worth considering!
As mentioned in the video, I ended up replacing the Raspberry Pi with my Ultimate 64 board. While that has the advantage of being able to use original Commodore 64 peripherals, it is an expensive option so it is very much not for everybody.