Raspberry Pi MAME Arcade with XBox Controller

We’ve been working on setting up a Raspberry Pi MAME Arcade and our favorite ROMs with an XBox Controller and a Chatpad.  It’s going to be an awesome console for our 65″ flat panel home theater setup.  And once we get that running, we’re going to make a handheld unit out of it.  But first, we have to debug the entire mishmash of a system we’ve got.

Here’s some pictures of what we’ve got running so far – the almighty Bubble Bobble – running here in the home office / music studio on a 45″ flat panel.  Pretty sweet!

Our full instructions and tutorial for setting this up are not completed yet.  It’s TOO BUGGY!

You might not want or need the XBox controller with a Chatpad.  If so, then just install PiMAME and your ROMS.   However, that’s not good enough for us.  The menuing setup requires too much intervention.   I want the little sucker to run like a kiosk or a true console would – right off the controller.   Hence, the Chatpad.

Now, if you just can’t wait and want to build your own – go snag PiMAME, configure AdvanceMAME on it, then install the xboxdrv library, and after that you can spend the usual nights & weekends time to figure out all the keymappings for your controllers.   And if you are like us you are going to wind up overclocking the hardware, or at least trying to (we haven’t been convinced the technique works well).

You must run a 2 Amp USB power source because the XBox controller sucks up a ton of current.  At the very least, that’s what we found out because we also wanted to run a WiFi connection on the device and the WiFi radio sucks up current too.   The Raspberry Pi isn’t a magical power-provider so you need to be mindful of these things.   But, the Raspberry Pi has HDMI output and looks awesome on our 65″ flat panel… so… we fully intend to push this platform to its absolute limits (keeping in mind that the ARM processor on this puppy is only about as powerful as Grammy’s Pentium II).

What’s taking so incredibly long with this project is:

1) figuring out all the keymappings so we can completely kill the requirement for a full size keyboard, as we only want to use the Chatpad

and

2) getting & testing the very latest ROMs for the games we like.   We have 4,000 old ROM files, but they are just far too old… we had used them for a full-size cabinet and SlikStik Classic setup in the basement that we built ages ago.   We never kept the ROMs current because once we got the old arcade running, we just started using it (it is still running).

More to come – just need more time to get this project to a polished state.   Thanks for your patience and check back soon.

UPDATE: Although I still haven’t had time to document each and every step of the configuration, we *have* posted a full IMG file of our current working version. You can download it here. A word of warning: it is already “expanded” — you will need a 16GB SD Card. And of course, you will have to supply your own ROMS. I’m sorry I couldn’t shrink it like the original PiMame distribution but please understand I’m slammed for time between business trips and app deliverables. This was the fastest way for me to get you guys something to play with, so I just dd’d an IMG and then gzipped it for all y’all. 16GB SD cards are dead cheap – I got mine at Walgreens in a 2-for-1 special – I’m sure you can find a steal of a deal somewhere. Enjoy.

 

Posted in Projects
16 comments on “Raspberry Pi MAME Arcade with XBox Controller
  1. Xander says:

    Very nice project, just looking in to this! Im going to try and install PiMame on my Pi. But I extually have no idea how to install xboxdrv (i have just just my Pi for xbmc untill now)…I really hope you guys can put up a step by step guide for noobs like me! That would be awsome!

    • mtedesco says:

      I hope to do so in a few weekends. Just been too busy making Apps for clients. Can’t wait to get back to this project.

      For now, try this:
      sudo apt-get install xboxdrv

      and flip through the docs at:
      http://pingus.seul.org/~grumbel/xboxdrv/xboxdrv.html

      I was able to run it before the AdvanceMame menu script using the –chatpad option.

      However, that’s the easy part. The painful part is remapping everything in AdvMAME and AdvMENU – its a slow going process.

  2. xander says:

    I spent a good afternoon fiddling around with Pi MAME now. I installed xboxdrv, but when I try to configure I get this error

    Controller: Microsoft Xbox 360 Controller
    Vendor/Product: 045e:028e
    USB Path: 001:004
    Controller Type: Xbox360

    – [ ERROR ] ——————————————————
    USBController::USBController(): libusb_open() failed: LIBUSB_ERROR_ACCESS

    I have no idea what is wrong?

    • mtedesco says:

      I’m not sure. Are you certain that all devices are being powered? On my setup, that was tricky: with a **2 AMP** power supply, it still had powering the Raspberry Pi, a WiFi network, a USB Keyboard, and any devices attached to the USB Keyboard (e.g. the XBox Controller). It would fail again and again – the USB port would “disconnect” the device due to “low current”. Could that be your problem too?

  3. Xander says:

    I hooked up a powered USB hub, just to be sure its not a power issue. But still no luck.

    I think my problem is that I don’t now how to ‘activate’ the driver after reboot.

    So I have to edit something in the config file of pimame to tell it to use xboxdrv, right? Thing is I have no idea how en where to edit this….

    If you could point me in the right direction, that would be great!

  4. Xander says:

    Just some extra info. When I give the command sudo xboxdrv, I can see that my controller is recognized. When I push buttons I see code appear, so that means the driver should work.

    When I press ctrl-c I exit back to the command line and 1 light on the controller is on. But when I start advanced menu and start a game, the controller does not work and I cant map any buttons.

    I did edit advmenu.rc and set device_joystick to auto.

  5. Xander says:

    Okay Im getting somewhere. I now login to the raspberry pi through ssh. When i give the command sudo xboxdrv in terminal on my mac and I don’t press crtl-c to exit, my controller works when I go back to the screen directly connected to my raspberry and start advancedmame with the keyboard directly connected to my raspberry.

    But this is not a convenient option because after every reboot I need to start xboxdrv through ssh on my mac….Guess there is a beter way.

    Different bump I discovered. After remapping the buttons in advancedmame, all configured buttons work correct execpt the d-pad. In the test game it keeps on using the analoge stick (wich works really bad) and not the d-pad. In the menu of advancedmame the d-pad does work.

    Sorry to clutter up your comments by the way. If you don’t think this discussion is suited here, feel free to delete my comments ;)

  6. anon says:

    @xander

    sudo xboxdrv

  7. mtedesco says:

    Hey guys, super sorry I was out of pocket there for a while. Between work and travel, I was unavailable. I can’t wait to get back to this project and I hope to post some updates in the next week or two.

  8. Pchan says:

    Is there a way that you can copy your SD image, remove the ROMS for legal reasons, zip it up and post it on MEGA for the rest of us? Since you obviously have the configuration working properly, and we all have identical RPi hardware and Xbox controllers, the same SD image should work the same for everyone, right?

    I’d be glad to stand on your shoulders for this project and I’m sure everyone would be appreciative. :)

    • mtedesco says:

      That’s a great idea as long as you don’t mind that it is “prerelease” and won’t contain comments on how to set up things. I will work on doing that tomorrow and try to get it posted before my next business trip.

      To everyone – keep the comments coming. We’ve been able to test this out with a few kids and they are helping to debug/improve the controller mapping and such. Your comments keep us motivated to keep working on this.

  9. mtedesco says:

    Pchan: I have posted the file here on my server for now (read the section at the bottom of the blog titled UPDATE). Let me know how it works out.

  10. Daniel says:

    Seem the file to download in Update section is faulty. I can’t decompress gzip under Ubuntu…

    • mtedesco says:

      Glad you posted. It was actually the filename suffix. It should decompress under ubuntu fine now (I tested on 13.04, which I like BTW).

  11. Benj says:

    Great article! Any updates on how things are going with this so far? Do you know which build of pimame the download at the bottom of the article is for?

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">