Console- and 8-bit home computer gaming on your 80s arcade cabinet

Steffo
8 min readDec 20, 2018

--

So you want to do some emulation on your old arcade cabinet? Wondering what it would be like to play Sega Genesis or Nintendo NES games on it (it’s awesome!)? Or maybe you would like it to play all those classic Commodore 64 titles?

This was exactly what I wanted, my goal was to be able to play a two player game of the classic Commodore 64 game Archon on my arcade cabinet.

In this post I will tell you how I managed to do just that and hopefully inspire some of you to have a go at it. I have spent too many late nights getting this to work and it would be a waste of time me not sharing the knowledge.

This guide does not claim to be complete to the last detail but it should be a good starting point. It will give you the big picture of parts involved and also enough information on how to set up your system for Commodore 64 emulation.

The classic Commodore 64 game Archon, fully working, on my 80s arcade cabinet.

What you need

Hardware

I started out with my old 80s arcade cabinet, a Danish build JK cabinet with all the original hardware. This includes a 20” CRT screen, classic arcade joysticks/buttons and a standard JAMMA interface.

Searching for solutions I stumbled upon a product called the RaspberryJAMMA, this is an adapter that converts a Raspberry Pi into a JAMMA board. What this means is that you can use the cabinets existing JAMMA connection and plug in a Raspberry PI via the RaspberryJAMMA adapter and then run all sorts of fun software on your cabinet.

Software

I also found something called ARpiCADE. ARpiCADE described itself as the OS that powers the RaspberryJAMMA. It’s a nice package of drivers and software that gets the RaspberryJAMMA/Raspberry PI and your arcade cabinet working together. It also includes a large number of emulators of different kinds. Focus is on MAME but there’s also some classic game consoles included from start.

To sum it up, this is what I started out with:

  • An arcade cabinet with a JAMMA connector
  • A RaspberryJAMMA adaptor with an attached Raspberry Pi
  • The ARPiCADE software
  • A USB keyboard
  • Game ROMs

ARpiCADE

Let’s look at the relevant parts of the ARpiCADE software (https://arpicade.com/):

Attract-Mode (http://attractmode.org/) - Emulator front end that presents all your games in a variety of ways. It simply let’s you select and start your game of choice. There’s tons of different layouts with fancy stuff such as preview videos. To configure a new start screen for a new system (called an emulator in this context), you setup basic stuff about it such as give it a name, point it to an executable, your ROMS location and so on.

Attract-Mode with the ‘Machines’ layout and screenshots added.

The Service Menu — here you can change screen resolution, adjust volume, manage ROMs and configure some other system wide features.

The ARpiCADE Service Menu

RetroArch

Included in ARpiCADE is also the RetroArch software (https://www.retroarch.com/). RetroArch is an open source emulator for retro computers and consoles. RetroArch describes itself as a ’frontend for emulators, game engines and media players’.

Libretro

Libretro (https://www.libretro.com/) is an API that allows for the creation of games and emulators. RetroArch uses Libretro under the hood. Emulators in RetroArch are accessed through something called ‘cores’.

Confused? So was I when I started my journey. Let’s go through this in even greater detail.

How to get emulation working

If you’re happy emulating for example the Sega Genesis then everything is setup and you’re ready to go, just add ROMs. Included in the ARpiCADE setup from start is a selection of emulators including a lot of MAME versions as well as RetroArch (with out of the box support for Genesis/Megadrive, NES, Atari 2600, Atari 7800, Colecovision, Mastersystem, Supernintendo, Trubografx, Vectrex and a couple of other systems).

But how would you go about adding support for another system like the Commodore 64?

Recipe for adding new emulation via RetroArch/Libretro:

  1. Add Libretro core
  2. Add emulator file for Attract-Mode
  3. Add RetroArch launch script
  4. Add RetroArch configuration file
  5. Add game ROMs

Let’s have a closer look at these steps.

1. Add Libretro core

To be able to emulate your system of choice, Libretro will need to have the correct core.

You can download cores from: https://buildbot.libretro.com/nightly/linux/armhf/

The Commodore 64 core is called ‘vice_x64_libretro.so’.

Copy the core file to a new folder in the ‘/home/pi/.config/retroarch/cores’ directory.

2. Add emulator file for Attract-Mode

This is the file that will make your emulator show up in the Attract-Mode menu when you power on your system.

Head over to the ‘/home/pi/.attract/emulators’ folder.

An easy way to get started is to make a copy of an existing attract emulator file and make necessary changes. If you rather prefer, it should also be possible to create it from the Attract-Mode menu on your arcade cabinet.

In my case, the necessary commodore changes looks like this:

...
# Generated by Attract-Mode v2.3.0
#
executable /boot/launchers/commodore64.sh
args "[romfilename]"
rompath /boot/roms/consoles/commodore64
romext .d64;.x64;.t64
...

‘Executable’ is the launch script, the one that kicks off the emulator. ‘Rompath’ is the path to your ROM files and ‘romext’ is the supported emulator formats.

In the next step we will create the above mentioned executable script.

3. Add RetroArch launch script

This script is the one that starts the emulation when you select a game from the Attract-Mode menu.

Make your way to the ‘/boot/launchers’ folder. Once again, make a copy of an existing configuration file and make the necessary changes. In my commodore64.sh file the critical line is the one starting the emulation:

# launch game
/home/pi/.config/retroarch/bin/retroarch -L /home/pi/.config/retroarch/cores/commodore64/vice_x64_libretro.so --config /home/pi/.config/retroarch/commodore64.cfg "$*"

What this line does is start RetroArch, points out the current Libretro core (vice_x64_libretro.so), also points out where the RetroArch configuration file is located and then the path to the selected ROM file.

4. Add RetroArch configuration file

The RetroArch configuration file is massive, almost 3000 lines of configurable parameters! The RetroPie project has some excellent documentation on this: https://github.com/RetroPie/RetroPie-Setup/wiki/RetroArch-Configuration. If you heard of RetroPie you might ask yourself why not use that popular software instead of ARpiCADE? Reason is ARpiCADE is specially made for use with arcade machines (CRT screen resolution, arcade joysticks and so on), RetroPie is not.

To add a RetroArch configuration file you can copy one of the existing configuration files located here: ‘/home/pi/.config/retroarch’.

What you at least need to do is to make the controllers and USB keyboard work. Most of these settings can also be configured from the RetroArch configuration screen if you rather prefer.

How the RetroArch configuration screen looks if ‘rgui’ is set as value for the ‘menu_driver’ parameter.

5. Add games/ROMS

Almost there! Last thing is to add your game ROM files to the correct folder, in my case I called it ‘/boot/roms/consoles/commodore64/’ (this path is also configured in step 2).

Hopefully everything is now setup correctly and you will find your games when you start up your system. If no games shows up, do a ROM rescan from the Attract-Mode menu (‘tab’ key to enter menu).

A couple of tips on the way

  • To make this work, you really need to have some basic computing skills. If not, prepare for some late nights learning and googling (it’s fun though!)!
  • When downloading the ARpiCADE software, have a look inside the forum section of the ARpiCADE web site for the latest build. The web page isn’t updated and the version listed on the web page is old.
  • To exit the Attract-Mode, press the ‘F4’ key (this wasn’t obvious to me when starting out). This takes you into the Service Menu. From here you can reach the command prompt (linux bash prompt) by pressing F4 once again.
  • If the emulator/games for some reason won’t start, go to command prompt and start it manually by entering the same command you added to the RetroArch launch script in step 3 above. If you do this, you will have the chance to see the error message and hopefully figure out what is wrong.
  • In my case I had problems making the USB keyboard work until I found out about the RetroArch input_driver setting and setting it to ‘udev’ (more information here: https://docs.libretro.com/guides/input-joypad-drivers/).
  • Naming of ROM files can be a bit problematic. For example some systems does not allow space in file names.
  • You can control different settings via the USB keyboard when entering a RetroArch game system (pause the game, speed up, enter menus and so on). This is called Hotkeys. In the Commodore 64 case though, you want to use the keyboard as a traditional Commodore keyboard without the Hotkeys. To ignore the hotkeys press ‘Scroll lock’ (or whatever key you have configured in the input_game_focus_toggle setting).
  • To enter the RetroArch configuration interface from a game, hit the ‘F1' key (or whatever you have configured it to).
  • You can easily add support for other systems as well with these instructions. For example I added support for the Sinclair ZX Spectrum in exactly the same way.
The ZX Spectrum game Atic Atac on my arcade cabinet.
  • You can access one partition of the ARpiCADE disk from your mac/windows pc (the ‘/boot/…’ directory tree). To gain access to the other partition, the ‘home/pi/…’ directory, you will need to mount that partition on a Linux system or edit the files directly from your Raspberry Pi (a good advice, if you do that, would be to connect your Pi to a more modern monitor than your old CRT screen). Another convenient way of editing your files is to enable WiFi (or use Ethernet) on your Pi and use an FTP client like FileZilla or similar to access the partitions.

Final words

The gaming emulation rabbit hole is deep. It will take some time to configure your system the way you want it and you will probably get frustrated on your way there but don’t give up! When you reach the pot of gold at the end of the rainbow it’s totally worth it!

Happy gaming :)

--

--

Steffo

Guitar player, retro gamer, speed cuber, software developer and parent.