Using xboxdrv for 4-way restrictor on complete rertropie setup already using dragonrise usb controller setup?
-
@mediamogul Wow - 28 days later and I am just looking into this. I am hoping you can offer a little explanation for me regarding running the xboxdrv only specific roms. - Basically exactly your post response to me right above.
Here is my use case:
I currently use the arcade folder for most of my arcade games. Within the arcade folder 95% of the games are running on lr-mame2003. I then have a capcom system that is just a renamed/themed fbalpha system, so those all run on lr-fbalpha. Lastly i have a neogeo folder for all the neogeo games. On top of that I have 15 other systems running mostly retroarch emulators. I have 2 arcade machines with joystick setups and all my joysticks are currently configured for all systems and many of them have game cores saved with game specific controllers setup. My question here is directed at the arcade folder only. My mission is to use the xboxdrv for only a handful of roms so I do not need to re-setup all of my controller settings for all my roms.
In my arcade folder I have 97 roms. Of those I estimate only about 12 of them are 4-way restricted games. They are all running lr-mame2003. The remainder of the roms are 8-way games, and most of them also run lr-mame2003, so I cannot simply set up the xboxdrv for just lr-mame2003 without affecting several roms. In your guide and in @spud11 guide above I see how to setup up the xboxdrv for all systems and for specific emulators, but I am not finding any instructions on how to just setup xboxdrv for an individual rom.
I am hoping you have some sort of method to do this based on your post above. My thought process was if there was some way to create either a separate "system" for just my classic arcade roms and move them out of the arcade folder and into a "classic arcade" folder, and then duplicate lr-mame2003 so that any core changes and the runcommand.sh for the classic arcade lr-mame2003 save and launch separately from the standard lr-mame2003 that is referenced in the arcade folder.
I am probably not making much sense anymore. Let me know if you understand what I am asking and if you have any thoughts.
Thanks!
-
@tmntturtlguy I am also quite keen on finding out whether you can use xboxdrv via runcommand-onstart.sh for individual roms. I tried multiple ways some months ago, but just couldn't get it to work. There are no guidelines for
$3
or$4
.However, you probably don't need a configuration that applies to individual roms anyway. With the code I've set out in my earlier post for
lr-mame2003
, you could adapt it:- You would define
$RestrictedArcadeGames
as the 12 roms/games (instead of the 200 roms I've got); - Unlike my 4 joystick setup, your
joycommand
for$RestrictedArcadeGames
would refer to only the 1 joystick that you want to use it for and the 4 way restricted configuration would apply; and - The
*
applies to all other roms not defined as$RestrictedArcadeGames
, and thejoycommand
would again refer to the 1 joystick only but would refer to the unrestricted configuration, instead of the 4 way restricted configuration.
You wouldn't need to worry about which folder the roms appear in. Whenever you activate
lr-mame2003
for a particular rom, the code would kick in - either the rom will trigger the 4 way restricted configuration or it will trigger the unrestricted configuration. - You would define
-
@spud11 Thanks, but wouldn't i then need to configure all the roms that use lr-mame2003 to use the xboxdrv as the controller configuration? I apologize as I am a little confused here. the way i read your instructions is that the restricted games would be 4-way and all others would be 8-way, but they would all still be using xboxdrv as the controller input?
-
@tmntturtlguy That is right. All of the
lr-mame2003
roms would be using xboxdrv. Are you concerned that you might have to set up xboxdrv for every single game individually? If so, don't be. You only need to do to set it up once "in game".What you do is in 1 game only (any game), press TAB, go to input (general) and set up Player 1 to use keys (eg left arrow is left, right arrow is right etc) and do all your buttons.
Then xboxdrv is used to emulate the keys - push left on the joystick = left arrow; press button A on my arcade table = left control (basically "fire" in Mame).
Example of my joystick setup is below. I've previously followed @mediamogul 's guide so I know what each button on my arcade table does.
You can see from the last lines that my arcade buttons (about 12 of them) correspond to various keys . I've set those keys in Mame using TAB, input "general".
Player1_4Way_Mame2003="sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv > /dev/null 2>&1 \ --silent \ --detach-kernel-driver \ --deadzone=4000 \ --deadzone-trigger 15% \ --force-feedback \ --mimic-xpad \ --trigger-as-button \ --ui-buttonmap tl=void,tr=void,guide=void \ --evdev /dev/input/by-path/platform-3f980000.usb-usb-0:1.3.3:1.0-event-joystick \ --device-name "Player_1" \ --evdev-absmap ABS_X=y1,ABS_Y=x1 \ --four-way-restrictor \ --evdev-keymap BTN_THUMB2=a,BTN_PINKIE=b,BTN_TRIGGER=x,BTN_THUMB=y,BTN_TOP2=lb,BTN_TOP=rb,BTN_BASE3=back,BTN_BASE6=start,BTN_BASE2=lt,BTN_BASE5=rt \ --ui-axismap X1=KEY_LEFT:KEY_RIGHT,Y1=KEY_UP:KEY_DOWN \ --ui-buttonmap a=KEY_LEFTCTRL,b=KEY_LEFTALT,x=KEY_SPACE,y=KEY_LEFTSHIFT,lb=KEY_UNKNOWN,rb=KEY_UNKNOWN,back=KEY_UNKNOWN,start=KEY_UNKNOWN,back+lt=KEY_SPACE+KEY_ESC,lt=KEY_5+KEY_1,rt=KEY_6+KEY_2"
-
@spud11 thank you, but this is exactly what I want to avoid. I want to/need to keep my retroarch setup for all of my games, and I do not use the same exact button configuration of all of my games either.
I have 4 joysticks set up for my 4 players. They all have 6 buttons plus start, select, and a coin button. I then have 2 USB ports where I can plug in controllers, I have 2 PS4 controllers and 2 SNES style generic USB controllers. I can plug them in and use those on each game as well instead of the joysticks. This would be very difficult to manage for all the roms, all the controllers and then other systems if I don't use the retroarch controls.
Lastly, I run several different game core options depending on game type. Several games just use a fire button , so those are set to button one, or my 'b' button. Others use 2 buttons for bomb and fire, while others use 2 buttons for "jump" and "attack". When in games that are shooters I want my 1 button or "b" button to be the fire button and my 2 button "a" to be bomb. In the other 2 button games I want my buttons to be opposite to match an nes controller. Therefore the buttons swap. Some games are 3 button games, so I use the bottom 3 buttons which are 1, 2, and 3 or "b" "a" "r". While other games are 4 button in which case I use two setups depending on what the buttons do, either buttons 1,2,3 and 4 which use all 3 bottom rows and 1 top row, or I use two bottom and 2 top buttons, "b" "a" and "y" and "x". Lastly my fighters are 6 game buttons and they are set up so all kick buttons are the bottom 3 buttons and all punch buttons are the top 3 buttons. These are all coordinated with a PS4 or SNES controller so they would also work as expected.
So....it is not just as easy as setting up one game with the tab button at this point.
Thanks
-
@tmntturtlguy Aah. That makes sense. You're using multiple kinds of controllers; I'm not. I've included @MadHorse in here because my recollection is that he set up the original
runcommand-onstart.sh
case statement. Perhaps he might have an idea how to setup individual rom statements using$3
or$4
? -
@spud11 great! Thanks! My other thought was to try to set up a second "copy" of lr-mame2003 and put my 4 way games into a "classic arcade" system and run the duplicated lr-mame2003, but have it use its own runcommand and core so that I could keep my existing name setup and then setup the second version exactly as you have. I started a different thread about trying to run 2 separate installs of the same emlator, but have not had much success on that front either! I have a way to complicated setup, but it sure is cool and works really well.....except those darn 4 way games!
-
@tmntturtlguy You could probably achieve a second setup of
lr-mame2003
using Attract Mode. Not sure whether Emulationstation allows you to do this. -
@tmntturtlguy did you get any further in your investigation of how to enable 4-way restriction rom-specific...
I have the exact same setup like you, with 2 zero delay usb controllers for 2 players
-
@robertvb83 @TMNTturtlguy The best way is to follow the xboxdrv guide at https://github.com/RetroPie/RetroPie-Setup/wiki/Universal-Controller-Calibration-&-Mapping-Using-xboxdrv
I've got 4 dragonrise joysticks working very well with xboxdrv with individualised configurations for 4 way games and the same for 8 way games.
Also @mediamogul recently discovered a way to swap between 4-way and 8-way joystick configurations "on the fly" with xboxdrv.
-
@spud11 OK, for now i don't have time to deal with this crazy complexity of xboxdrv...
In general what does this make differently... i mean in the end it has to guess the direction you intend to use depending on your inputs... This is also done by default in Retropie by means of ignoring the unchanged direction between two movements.
meaning moving from up to up/right ignores up as it has not changed leading to a right control input. Is this generally done differently with xboxdrv?
-
@robertvb83 said in Using xboxdrv for 4-way restrictor on complete rertropie setup already using dragonrise usb controller setup?:
moving from up to up/right ignores up as it has not changed leading to a right control input. Is this generally done differently with xboxdrv?
Using four-way restriction would ignore up/right altogether. A large number of games can't read those inputs, leading to deadly stall-outs in control. It's most easily seen in any of the 'Pac-Man' games. When turning a corner. If the game reads a mixed input, you're Pac-character will just hang there until a decisive up, down, left or right input is read. Another good example is 'Donkey Kong' or 'Burger Time'. Using ladders should be easy, but with mixed inputs, many times you character just stalls-out.
-
@mediamogul as far as i understand from mame changelog (do not find where i read that) basically mame knows if it is a 4-way or 8-way game. so in case of a 4-way game it decides to translate up/right into right in case you switch from up. i am just curios how xboxdrv deals with it, as it has to come up with a prediction method also
-
@robertvb83 said in Using xboxdrv for 4-way restrictor on complete rertropie setup already using dragonrise usb controller setup?:
as far as i understand from mame changelog (do not find where i read that) basically mame knows if it is a 4-way or 8-way game.
Nice! I use AdvanceMame on RetroPie, which makes use of the 0.106 code base and that feature wasn't added by that point. Any idea when it was introduced? As far as xboxdrv goes, I have a list of games that benefit from four-way restriction and I use it to launch the proper map from the runcommand-onstart script. As @spud11 mentioned above, I also found a way to switch between the two as the situation calls for it, but I haven't impleented it in my setup yet.
-
-
Very interesting. I've never run into the feature in practice. It looks as though it's been tweaked and gutted quite a few times. Perhaps the MAME team just decided to leave it out at some point.
-
@mediamogul Holy moly. That is interesting. I'm doubtful the 8 way/4 way MAME dichotomy works in the RetroPie versions of MAME. At least when I've tried playing Ms Pacman with an 8 way non-restricted xboxdrv configuration, Ms Pacman's head basically spins around. When I've used the 4 way restriction, there's no problem. Mind you I'm not using MAME 0.37B as referenced in the thread. Perhaps 4 way games would work properly with MAME 0.37B in Retropie?
-
@spud11 hmm I don't know. I understood that statements like it was implemented around 2002 and kept since for future versions...
here is a nother discussion with part of the code...
http://forum.arcadecontrols.com/index.php/topic,123175.msg1309881.html#msg1309881Its really hard to figure such things out for me, because I do not really know where and what exactly to search. If I only had the time to test all this :-)
-
@robertvb83 You've certainly discovered (rediscovered) something of real interest.
All I know is xboxdrv works very well indeed with 4 way games.
-
@spud11 @mediamogul i created an issue for mame2003-plus https://github.com/libretro/mame2003-plus-libretro/issues/380#issuecomment-425712224
The discussiin is about how the xboxdrv driver internally manages the task of 4way conversion for 8way joystick inputs. Can you help clarifying? E.g. what does the software exactly do with the 4way option flag?
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.