How to switch to 4 Axis Joystick in MAME
-
Hi Guys,
I've already Googled this and searched the forums with no joy. Basically, I was testing out Dig Dug. But my problem with it, is that when I go to turn, the player turns when the diagonal is triggered and I don't want to turn when diagonal is triggered. I want to turn when ONLY Up, Down, Left or Right is triggered.
Is there a way of changing the joystick to 4-axis instead of 8-axis, on a game to game basis? I am using MAME. But also NEO-GEO. We'll stick to MAME for the moment! So that when I, for example, want to turn right, the diagonal is not triggered, and that the game sees the joystick as just 4-axis?
PacMan is another game which I wreckon will need this. I haven't tested it, but I'm sure it will also see the same issue.
Thanks in advance!
My Specs:
Pi Model: Pi 3B
Power Supply used: Official RP3 Charger
RetroPie Version: 4.3
Built From: SD Image on RetroPie website
USB Devices connected: XIN-MO 2 Player Controller
Guide used: None found
Emulator: MAME / NEO-GEO
How to replicate the problem: Start Dig Dig. Observe that player turns when diagonal is pressed.Shay
-
@shay90 xboxdrv has a --four-way-restrictor flag which removes diagonal inputs. More info on setting this up at: https://retropie.org.uk/docs/Universal-Controller-Calibration-&-Mapping-Using-xboxdrv/
Section 2D is the relevant section on restricting directional control to four ways.
-
Great stuff. But I have some concerns..
- How is this done? Are each of those lines a command that I need to run? Or do I have to add them into a file?
- What games actually need 8-axis? I am wondering because if I do this, it will affect all games globally.
My goal is to have only MAME and NEO-GEO games. Such as, Metal Slug, Puzzle Bobble, Bubble Bobble, Fighting Games and older games such as Asteroids.
Thanks!
-
-
You need to read the whole document to find out how to set it up for your controller. I'm afraid there isn't a quick and easy way.
-
You can set up xboxdrv to work with your MAME/NEO GEO emulators only for specific roms. You can find a list of 4-way games here. If you look through the rest of that thread, you should find an example of how to implement xboxdrv for these roms.
I'm sorry I can't be more helpful but xboxdrv isn't straightforward to implement so background reading is essential before you start.
One thing I would recommend is to either start with a fresh image or back up your existing one before you start tinkering with xboxdrv.
-
-
Cool, I will make a backup and then test it out! On your 2nd point, you mean that it can ONLY be configured on specific ROMs? This is exactly what I'd like. Because I believe fighting games use diagonals a lot!
-
I have until Christmas eve to get this done. I never thought that the 8-way joystick would be a problem. I would love to have PacMan and Dig Dug on my CAB, but they are really really horrible to play with the current joysticks.
@dudleydes Do I have to follow every step from top to bottom? I was thinking of buying a third joystick, but then I'll have an issue where it won't be player 1. I want it to be as easy as possible for my sisters / Dad. They won't know how to switch primary joystick in RetroArch.
Also, it will cost me €40 for another joystick with everything included to plug into my RPi. My joysticks I'm sure are inrterchangeable. They have a big green mould underneath, this can probably be moved to switch to 4-way. But then Fighting games will be crap and the likes of metal slug will suffer.
Oh the stress >.<
-
@shay90 Hey, quick note for you to add more detail. There are nine (9) possible MAME emulator versions you could be using in RetroPie. It might make a difference as you troubleshoot which version of MAME you are talking about. Be more specific.
Also, this is no consolation, but the use of 8-way joysticks in a 4-way game has plagued cabinet builders/emulation users for many many years, long before RetroPie. It is not the fault of the emulator. The original games had physical restrictor plates that limited the motion of the joystick actuator so that it could not hit both cardinal directions at the same time. Correct emulation of an original game would simply reproduce the original game as it was, not introduce additional logic to reject diagonal inputs. As much as that might benefit retro gamers like us, it would not be accurate emulation.
That said, the xbox-driver solution is one way to introduce the additional logic necessary to handle 4-way games. From what I have read, it works pretty well if you can get it configured. I have not been able to enjoy it, however, because I use a keyboard encoder/controller (IPAC), and I understand that the xboxdriver is not compatible with keyboard controllers. Not sure what the XIN-MO is.
-
@caver01 I appreciate your input! Mame2003 is what is default with Retropie these days and what I am using and my ROMs seem to like this emulator.
Yeah, I knew I would run into a hurdle during my build, and this is definetly it. I will probably just keep my joysticks on 8-axis setting because this is a surprise for Christmas and I won't have time to put in another joystick that is 4-axis. And the xbox driver solution will require a good bit of research. I'm fine with coding..etc I did it through college but maybe I will figure that out in the new year. The xbox driver seems like the best way because it is on a per-game basis and there would be no hassle switching joysticks, unplugging them..etc just for different games.
XIN-MO is just a controller board which has inputs of arcade joysticks and buttons and has a USB out which goes straight into your RPi3. Really neat piece of kit, and its plug and play.
Thanks all, for your input! I'm going to research the xbox driver and see if I can implement it. If anybody knows of a good guide / video on it I would really appreciate you sharing it with me.
-
@shay90 I think you are taking the right approach. It is fairly simple to get a working configuration, but most of us on the forum continue to tweak our systems over the long haul. Part of the pleasure in this challenge is the continued effort by developers to improve the capabilities of RetroPie, add features, and of course, shared insight by forum members.
Might I suggest another post when you have your project built with a photo or two in the Projects and Themes section? It is fun to see what people are building.
-
@caver01 Of course :) I will definetly post. I took a few photos during the build, and its still not finished yet. Should be done in a week :)
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.