Hardware for MAME on Linux (Fedora 23)

With the world of free and open source software ever in need of trailblazers, I thought I might write up a description of my rig as a proof of concept for anyone else seeking to run MAME on GNU/Linux (Fedora 23, in my case).


  1. Computer and Graphics Card
    1. Informational Note:  I have seen reports of choppiness in MAME, and I have personally experienced it when attempting to run the software on an Intel Compute Stick (it’s only got Intel HD graphics and a tiny little 1.8 GHz Atom processor), but I can say that my setup as described below produces absolutely zero choppiness, so it is attainable with adequate hardware and software, with the below setup being something of a proof of concept template.
    2. Hardware:
      1. I am using an Intel Core i5-3470 along with an Nvidia GeForce GTX 960 configured with PCI passthrough in a Fedora 22-supported guest domain.
      2. I am also using a Rosewill USB Hub for the mouse, keyboard, gamepads, and light guns (all connected to a USB hub on the motherboard which is passed through to the guest domain using PCI passthrough).
  2. Gamepads:
    1. Hardware:  I can tell you that the Logitech F310 Gamepad works flawlessly with Fedora 23 and MAME.  It’s cheap ($20) and reliable (I’ve had one that has worked for me for over 5 years and still plays like the day I bought it).  It has a hat toggle for the directional pad, and that can be a little annoying to some people, but I got over it.
    2. Prerequisite Software:  Gamepads are recognized as joysticks by the Linux kernel, and in Fedora, that means you need to install the joystick-support package before your controller will work appropriately with MAME.
      sudo dnf install kernel-modules-extra joystick-support
    3. MAME Configuration:  Once the prerequisite software is installed, it’s basically plug and play.  Fire up MAME, head into the device configuration section, and you should be able to simply select controls to be configured and press the appropriate button on your gamepad and observe that it registers correctly.  It’s mega simple (as long as you have that prerequisite software installed).
  3. Light Guns:
    1. Informational Note:  Oh man, do I ever love light guns.  The disappearance of light guns from modern consoles has been so disappointing to me.  Lots of people will tell you “it just can’t be done” given the fact that light guns of yore relied on CRT monitors and their redraws to function, but fortunately, that’s just some weird myopia from people who apparently think technology can’t produce light guns without that exact method.
    2. Hardware:  The main player nowadays in light gun technology is Ultimarc’s Aimtrak product line.  They use an IR emitter / receiver combination to create a reliable light gun which functions much like the Wiimote for the Nintendo Wii.  After observing their product (obviously modeled after the Namco Guncon) and its $95 price (that’s the one downside to modern light guns; expense) + what seems to be International shipping and handling (though I didn’t check specifically what the price there would be), I decided to go with www.arcadeguns.com.   They have basically cast their own gun case and sourced components from Ultimarc and Cherry to create a very nice three-button light gun.  I’ve had it for a few weeks now and I am extremely impressed with the response, accuracy, and feel.
    3. Prerequisite Software:  As with Gamepads, Ultimarc light guns are recognized as joysticks by the Linux kernel.  The same software requirements as above (kernel-modules-extra and joystick-support) are required for their use.
      1. So far, I have not gotten this thing entirely working yet; while Fedora detects the gun as a mouse perfectly, MAME fails to recognize the device.  According to a forum post I found on the Interwebs, ill need to make use of a Windows system to use the Ultimarc configuration utility to change the gun over from mouse mode into joystick mode, and then I will need to configure my X server to recognize the joystick as an input device using the joystick driver.

That’s all for now – I basically just wanted to let everyone know that yes, MAME works wonderfully on Fedora 23   The only current limitation I am running into is the light gun support (which I am feverishly working on).  But for the most part, you, too, can have your own Free and Open Source Software Multiple Arcade Machine Emulator, right in the comfort of your own home.

And another childhood dream comes true (well, almost – once I get that blasted light gun working!).

This entry was posted in Gaming, Information Technology and tagged , , . Bookmark the permalink.

2 Responses to Hardware for MAME on Linux (Fedora 23)

  1. Stefanos says:

    Hello, I am currently building an arcade cabinet for home (family) entertainment. My set includes, so far, a joystick with 4 buttons, a steering wheel, and a light gun (which I cannot make it work, just like you mentioned).

    The joystick with the buttons works fine. (Homemade)
    The steering wheel is a Microsoft Sidewinder Force Feedback Wheel. Also works fine (but cannot configure it perfectly under MAME)
    The light gun is a Logic 3 Lazer Rifle (it is recognized by the terminal [lsusb], but I cannot configure it under MAME or any other linux/wine program that I know of)

    My ultimate goal is to create a one-of-all arcade/MAME cabinet, in which you can play and enjoy all kinds of games (for 1,2 or more players).

    Note: There are some intresting games like Lucky & Wild, which use both the steering wheel AND the light gun (co-op).

    I would like to know if you managed to find a reliable light gun for linux, or a way to setup one.

    P.S: I can use wichever linux and kernel distribution is preferred.

    Thank you in advance

    • Well, I am using the arcadeguns.com light guns (which are built from Ultimarc Aimtrak components) with Fedora. So far, I haven’t gotten them to work acceptably with MAME on Fedora. There are references online to individuals who have configured systems which use these light guns to their satisfaction, so I have tentatively concluded that it is possible to do this, but as of yet, I am running into difficulties in which the cursor from the weapons appear to lock into horizontal or vertical movements too strongly to allow for immediate accurate response to the aim of the light guns. The light guns appear to work perfectly outside of MAME, with the mouse cursor moving properly with the light gun, but once in MAME, the vertical/horizontal preference exhibited by the input devices has been insurmountable in my experimenting.

      Initially important information for MAME on Linux is that the light guns have to be set to function as joystick devices and not mouse devices. It appears that the Linux kernel treats mouse devices as relative input devices only (so the information from the input device is expected by the kernel to be in terms of displacement from the original position of the aiming reticle or mouse cursor on the screen), and this fails to accommodate the fact that the Aimtrak devices send information in absolute terms (identifying the exact position on the screen where the aiming reticle or mouse cursor is to appear). Microsoft Windows, on the other hand, has some sort of hardware abstraction layer which amalgamates all pointing devices into a single device whose input is accepted in absolute terms or converted from relative to absolute if necessary. I could not identify any simple means by which to translate absolute information to relative information with a driver interface or somesuch solution for the Linux kernel, so the way to overcome this is to put the Aimtrak devices in joystick mode. This way, the Linux kernel recognizes them as joystick devices and understands the absolute position information sent to the system.

      This works very well in GNOME, but it seems MAME is doing some sort of input correction for the joystick device which causes a preference for vertical or horizontal movements (likely to compensate for any errant input obtained by a loose joystick). Indeed, I can find in MAME configuration elements which seem to speak to this exact issue; the -joystick_deadzone option, for example, is described on http://docs.mamedev.org/commandline/commandline-all.html as being a value which establishes how far along an axis one must move a joystick before change is recognized by MAME. The default is 0.3, and this default would, it seems, cause exactly the issue I am experiencing. However, despite my efforts in changing this value while starting MAME, I seem not to experience a resolution to the issue. Another possibly relevant option is -joystick_saturation which treats drift in the ends of a joystick’s range.

      Basically, both of those options, if I am understanding properly, create tolerance in MAME for faulty joystick signals near the center and end of the joystick range. It seems, then, that the ideal configuration for the Aimtrak devices would be to set `-joystick_deadzone 0 -joystick_saturation 1`. I believe I tried this and that it did not resolve my issue. However, in re-reading this documentation to answer your question, I’m not entirely convinced I did this properly, though I recall putting in just about every combination I could think of in attempting to get it to work.

      I know the devices work acceptably in my Windows 10 VM, and without issue, as mouse input devices, so I don’t think the devices are faulty in any way. Also, GNOME works as expected, as I said. I think I must just be missing something in my MAME attempts which I have not yet identified.

      I’m not sure which model your Logic3 device is, but I see online after a quick search that many people are unable to use Logic3 devices with Linux. I see that some of the Logic3 devices are intended for use with the Playstation or Playstation 2 consoles, so I’m not sure how they are recognized by the Linux kernel. You might try issuing some `xinput` commands (e.g. `xinput –list`) to get some more information about how the device is being recognized by the system to get started on troubleshooting MAME’s recognition of the device.

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