RetroPie 3 on my bartop arcade

I’ve finally got the time to finish the software of my second arcade build, so I guess it was time to make a post about it and cover some of the challenges I’ve faced.

retropieWhile I’m currently developing my own front-end for Windows-based arcade machines, I didn’t want to do the same for this arcade since will be running on a Raspberry Pi 2 and there already exists optimized distributions for this purpose. RetroPie is one of these distributions and works pretty much out of the box, but I wanted to make a few small changes.

Before I started on the project I had the following objectives:

  • Minimal changes. I don’t want to make it difficult to upgrade to a newer version of RetroPie
  • Only list games that actually work in terms of compatibility and features (number of buttons required). This was especially with regard to MAME
  • Pre-scrape all game information and images and make small “packages” for each compatible system. I’ve heard the scraper in EmulationStation isn’t great while my own is getting quite good.
  • Configure all the buttons so they match the original controller in terms of placement relative to each other
  • Custom theme that matches my RetroBox brand


Initial setup

raspi-configFirst of all download Win32 Disk Imager in order to write the RetroPie disk image to the micro SD card. It’s really simple and once done it can be safely removed and inserted into your Raspberry Pi 2. The next steps are similar to the original Raspberry Pi image. You’ll have to extend the partition to use all of the available disk space. In order to do so just boot the system, navigate to RetroPie and then select “Raspberry Pi Configuration Tool Raspi-config”. From here you should run “Expand Filesystem” and “Advanced Options->Enable SSH”. SSH will be used to configure RetroPie later on.


Adding games

When it comes to games you can run EmulationStation in two modes. You can tell EmulationStation to display all games in your /home/pi/RetroPie/roms/  directory (default) or tell it to only show games that exists in the gamelist.xml  files located in /home/pi/.emulationstation/gamelists/ . While this might not matter much when it comes to most systems such as Super Nintendo, Nintendo or Master System, using gamelists is way easier then keeping your roms folder clean when it comes to MAME. The issue with MAME is that some roms depend on each other (parent/child and clones/samples), so I though it was easier to make a script generating the xml instead of trying to figure out the relationship between the different roms.

In order to be able to generate all the xml files I used one of my previous projects. Using this I managed to get almost all information and images used by EmulationStation. I also had to write some few snippets in order to mass move, match and convert files. The only system I had some real struggle with was of cause MAME. After finding a suitable romset for advmame 1.2 I used the awesome project ROMlister in order to scan my romset and make an xml file with all the games that would work on my arcade. While the official romset consists of over 6.000 roms “only” about 4000 work on an arcade with only 6 buttons. This way I know that at least most roms work without issues.

Anyway, in order to force EmulationStation to only list games that are defined in the gamelist.xml  file you simply have to add --gamelist-only at the end of the line in /etc/profile.d/


Updating the controls

retropie-snesWhile RetroPie does a good job on automatically mapping the keys, I didn’t agree on the default button configuration. Fortunately it’s very easy to override the default button configuration on a per system basis. The configuration files are stored in /opt/retropie/configs  and you override a given system simply by editing retroarch.cfg.

Here’s an example on how to override the button configuration for Super Nintendo (snes):



RetroBox wallpaper

While the default theme simple  isn’t bad, I wanted to make a few changes. Since the arcade is mostly black and my logo is white on a black background, I also wanted the theme to match those colors instead of the default “50 shades of grey” look. I compared the simple theme with es-theme-carbon and combined them into a suitable theme. It wasn’t difficult at all since all system-specific xml files are equal while only the artwork differs.

I also changed the splashscreen to match the RetroBox logo. Just remember to change the path to the image:


Known bugs

XinMoI brought my arcade controls from Ultracabs mainly because I like the controller board (at least on windows). On Linux however, it’s detected as a single joystick instead of two individual. Because of this you won’t be able to map all buttons in MAME and maybe other systems as well. Fortunately the solution is simple, though it is far from self-explanatory:

Remember that you always can test your joystick by running the following command from the terminal:

Another bug I noticed is that the default Super Nintendo emulator crashes (segfaults) on a lot of games. This issue is related to a bug in the lr-snes9x-next emulator and should be fixed in the next version of RetroPie. Meanwhile it’s easy to upgrade the emulator just by navigating to RetroPi and then launching the RetroPie-Setup. From here select Install individual emulators from binary or source, choose lr-snes9x-next  and select From binary. Give it a few seconds to update and the issue should be resolved.

Another thing worth mentioning is that EmulationStation is slow. My arcade consists of around 7.000 games and the system boots up in almost exactly one minute. Adding more games significantly increases boot time. Hopefully EmulationStation will one day utilize a SQLite database or similar to improve the speed. As a comparison, my front-end boots up in under just a few seconds with over 22.000 games.


Share this:

13 comments, add yours.


i am impressed with your work. I am having hard time to make my own retropie machine, and i have basicly same components as you are mentioning. xin-mo controller, raspberry pi, but i have hard time co figure out controlls on almost all games.. I tried to set xin-mo for two players, and i don’t know what am i doing wrong. Please let me know if there is any way that you help me with making my dream retro machine, and how much would that cost me…
Thank you very much, Jure

Benjamin Krause

Benjamin Krause


Thank you for your feedback.
What in particular are you struggling with? I’ll gladly help you out with any issues except where to get the roms (games). 🙂


i build arcade with raspberry pi 2, and installed retropie 3. Because not all games are working i tried to make it as a gamelist as you mentioned. But i can’t figure it out, what do i have to write in gamelist file, that game will be visable.
Next, i wan’t to make gamescrapper so it will show info abut games, and third, i only can play mame games.. controls i can’t figure it out how to set controlls in snes or sega…
Thank you, Jure

Benjamin Krause

Benjamin Krause


Hi Jure and thanks for your comment.
The gamelist should be structured like this: Place the gamelist.xml into home/pi/.emulationstation/gamelists/mame-advmame/ and then add –gamelist-only to in order to tell RetroPie to only list games found in the gamelist. Note that it will only list the games found in the xml AND on disk so make sure the paths are correct.

I’ll release my scraper which will be able to create these gamelist.xml files for a couple of different front-ends such as RetroPie and HyperSpin. I’ll also make a new post on how to do this in detail, but it might not be ready until after christmas.


ok, i think this will help me.. but i think i will wait for your scraper for creating gamelist, because i don’t have knowledge how to automate this …
Great, please let me know, when i can get it…
It would be nice to get the list of working games for my system to 🙂
Thank you, Jure


That little line (usbhid.quirks=0x16c0:0x05e1:0x040) helped me a bunch… Thanks alot! Had my project on hold till I got the time to sort out my Xin-Mo problems. I the meantime a new Retropie was released and the autofire on axis was solved in the kerner. That little piece of text you supplied was to top it off. =)



Awesome work! And thanks a lot for the help on how to split up the controls! I’m happy that you created this post, as me, and it seems other people, wouldn’t have been able to make the Xin Mo work probably, otherwise.

Although, I have one problem that I’m hoping you can help me with. The controls works fine in all the emulators, also the start+select thing. But in mame, I cant exit using start+select. Can you help me`?

Benjamin Krause

Benjamin Krause


I’m glad I could help! 🙂

Benjamin Krause

Benjamin Krause


You can fix that issue in one of two ways:
1) Launch a MAME game and open the button configuration menu. From here find “ui_cancel” and map it first to your start button and then to your select button. If you make a mistake just keep on adding keys to the list until MAME removes all mappings.

2) Login to your Raspberry Pi using SSH. Navigate to \opt\retropie\configs\mame-advmame and open your advmame-1.2.rc using nano or vi. From here you can set “ui_cancel” to this (or similar depending on your wiring). My start button is wired to pin 6 and my select button is wired to button 7:

input_map[ui_cancel] keyboard[0,enter] keyboard[0,space] or joystick_button[0,7] joystick_button[0,6] or joystick_button[1,7] joystick_button[1,6]

Note: Tested on advmame 1.2/1.4.


Thanks you very much! Will try it out, when I get to my machine again



Having trouble splitting the joystick into 2. When I try to add that one line of code I get permission denied. I can’t figure out how to change the permissions on this file. Do you know how to fix this?


Benjamin Krause

Benjamin Krause


Add sudo before the nano command (sudo nano cmdline.txt). I’ll update the post to reflect this. 🙂


I’m having the problem of recognizing the 2 inputs with the iPAC, and I think your solution would fix it, but I am not sure where to drop that command code – where are you adding that nano command?

Many thanks!

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.