Using xboxdrv for 4-way restrictor on complete rertropie setup already using dragonrise usb controller setup?
-
I am hoping someone might have experience with this question and can make some suggestions.
I have been following and participating the in the following thread regarding using 4-way and 8-way restrictor plates in arcade games link to thread
Currently i have 2 arcade cabinet builds, both are using dragonrise usb for my joysticks/buttons. Both cabinets use the same image of retropie that I have built starting 6 months ago and continually updating with the latest and greatest updates of both retropie and ES. I run my roms from a USB stick and use 5v 2.5a power supply.
I already have my 4 player arcade set up with the dragonrise usb and it works great, i have N64 and dreamcast all running perfectly as well as all the standard retroarch setups and I am using @meleu joystick selector tool, again working perfectly. I also have game specific control overrides through retroarch saved to game cores for several games.
I currently have 8 way restrictor plates on my joysticks as I play tons of different types of games and systems. I didn't really notice any issues until i started reading the post linked above and went into donkey kong and tried to set some high scores. I did notice several play-ability issues due to dead presses when my joystick would hit a diagonal when trying to move quickly.
I found the following info on how to set up the xboxdrv and the 4 way restrictor, however i don't want to go through are redo all my settings if I can avoid it. github wiki link Can I set up the xboxdrv to run only on the arcade 4 way joystick games and continue to use my dragonrise joystick config, or do i need to redo all 4 joysticks for all my emulators and games using the xboxdrv? What I would like to do is only set up the xboxdrv to work on player 1 joystick on the select games within the arcade folder, have player 1 use the dragonrise usb controller settings in the ES menues and selections screes as well as have all 4 players use the dragonrise settings for all emulators and games, except the 4-way restricted arcade games.
Any suggestions, help, or tips on how i might set this up in the game specific runcommands would be great!
-
@tmntturtlguy
@mediamogul is the best person for providing assistance, but I should be able to point you in the right direction.Xboxdrv is not user friendly, but it is extraordinarily adaptable. I looked into it at first because I wanted to be able to exit all cores and all emulators in the same way - Select+Start - but I then started considering other purposes such as joystick restriction. The joystick restriction works perfectly for 4-way games like Donkey Kong and PacMan. I have absolutely no issues with diagonals. The difference is pretty remarkable.
- I have a sit down arcade table - both cocktail and side by side. My 4 controllers all use Dragonrise USB drivers like your's. From my understanding, xboxdrv does not work with keyboard encoders like IPAC2.
- I use @meleu's joystick selector tool as well without any problem.
- Yes, you can use xboxdrv on a per-emulator (or a per-system basis) and per-joystick basis, so that it does not interfere with other settings. In my case, though, I've set it up so that xboxdrv applies to all 4 joysticks and I have it running on all emulators and cores (effectively replacing Retroarch libretro controls).
- To achieve the 4-way/8-way split, it took me (with mediamogul's help) about 5 weeks to get it working properly. It is not easy (or at least I did not find it easy).
- I use runcommand-onstart.sh and runcommand-onend.sh rather than any other method like rc.local .
I'm using lr-mame2003 as the core/emulator. An extract of my code for 4-way/8-way in runcommand-onstart.sh is as follows. You will not be able to just replicate the code, but it will give you some idea. You will still need to go through mediamogul's guide.
#!/bin/sh ### Uncomment one or all of the following if you need to find some information about the emulator or roms ### Name of the emulator #echo $1 >> /dev/shm/runcommand.log ### Name of the software used for running the emulation #echo $2 >> /dev/shm/runcommand.log ### Name of the rom #echo $3 >> /dev/shm/runcommand.log ### Executed command line #echo $4 >> /dev/shm/runcommand.log ### Code begins ### Game/ROM full path rom="${3##*/}" ### ARCADE - LR-MAME2003 - THIS CORE HAS ITS OWN KEYS SET UP VIA THE TAB MENU - The mappings below enable the joysticks to operate in 4-Way or 8-Way mode depending on the game. This is a libretro core. ### First: Using the TAB menu in lr-mame2003, either make note of the default keyboard controls and map the code below accordingly or in TAB map Player 1's and Player 2's controls to the keyboard controls you want and then map the code below. ### Player1_4Way_Mame2003 and Player2_4Way_Mame2003 map Joysticks 1 and 2 with four way restriction for use with lr-mame2003. 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" Player2_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 lb=void,rb=void,tl=void,tr=void,guide=void,lt=void,rt=void \ --evdev /dev/input/by-path/platform-3f980000.usb-usb-0:1.3.1:1.0-event-joystick \ --device-name "Player_2" \ --evdev-absmap ABS_X=y1,ABS_Y=x1 \ --four-way-restrictor \ --evdev-keymap BTN_THUMB=a,BTN_TOP=b,BTN_PINKIE=x,BTN_TRIGGER=y,BTN_THUMB2=back,BTN_TOP2=start \ --ui-axismap X1=KEY_D:KEY_G,Y1=KEY_R:KEY_F \ --ui-buttonmap a=KEY_A,b=KEY_S,x=KEY_Q,y=KEY_W,back=KEY_6+KEY_2,start=KEY_UNKNOWN,back+start=KEY_SPACE+KEY_ESC" ### Player3_4Way_Mame2003 and Player4_4Way_Mame2003 map Joysticks 3 and 4 with four way restriction for use with lr-mame2003. Player3_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 lb=void,rb=void,tl=void,tr=void,guide=void,lt=void,rt=void \ --evdev /dev/input/by-path/platform-3f980000.usb-usb-0:1.3.2:1.0-event-joystick \ --device-name "Player_3" \ --evdev-absmap ABS_X=x1,ABS_Y=y1 \ --four-way-restrictor \ --evdev-keymap BTN_THUMB=a,BTN_TOP=b,BTN_PINKIE=x,BTN_TRIGGER=y,BTN_THUMB2=back,BTN_TOP2=start \ --ui-axismap X1=KEY_DOWN:KEY_UP,Y1=KEY_RIGHT:KEY_LEFT \ --ui-buttonmap a=KEY_LEFTCTRL,b=KEY_LEFTALT,x=KEY_SPACE,y=KEY_LEFTSHIFT,back=KEY_5+KEY_1,start=KEY_6+KEY_2,back+start=KEY_SPACE+KEY_ESC" Player4_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 rb=void,tl=void,tr=void,guide=void,lt=void,rt=void \ --evdev /dev/input/by-path/platform-3f980000.usb-usb-0:1.3.4:1.0-event-joystick \ --device-name "Player_4" \ --evdev-absmap ABS_X=x1,ABS_Y=y1 \ --four-way-restrictor \ --evdev-keymap BTN_THUMB=a,BTN_TOP=b,BTN_PINKIE=x,BTN_TRIGGER=y,BTN_BASE=lb,BTN_THUMB2=back,BTN_TOP2=start \ --ui-axismap X1=KEY_F:KEY_R,Y1=KEY_G:KEY_D \ --ui-buttonmap a=KEY_A,b=KEY_S,x=KEY_Q,y=KEY_W,back=KEY_6+KEY_2,lb=KEY_UNKNOWN,start=KEY_UNKNOWN,back+start=KEY_SPACE+KEY_ESC" ### Player1_8Way_Mame2003 and Player2_8Way_Mame2003 map Joysticks 1 and 2 with no restriction for use with lr-mame2003 Player1_8Way_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 \ --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" Player2_8Way_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 lb=void,rb=void,tl=void,tr=void,guide=void,lt=void,rt=void \ --evdev /dev/input/by-path/platform-3f980000.usb-usb-0:1.3.1:1.0-event-joystick \ --device-name "Player_2" \ --evdev-absmap ABS_X=y1,ABS_Y=x1 \ --evdev-keymap BTN_THUMB=a,BTN_TOP=b,BTN_PINKIE=x,BTN_TRIGGER=y,BTN_THUMB2=back,BTN_TOP2=start \ --ui-axismap X1=KEY_D:KEY_G,Y1=KEY_R:KEY_F \ --ui-buttonmap a=KEY_A,b=KEY_S,x=KEY_Q,y=KEY_W,back=KEY_6+KEY_2,start=KEY_UNKNOWN,back+start=KEY_SPACE+KEY_ESC" ### Player3_8Way_Mame2003 and Player4_8Way_Mame2003 map Joysticks 3 and 4 with no restriction for use with lr-mame2003 Player3_8Way_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 lb=void,rb=void,tl=void,tr=void,guide=void,lt=void,rt=void \ --evdev /dev/input/by-path/platform-3f980000.usb-usb-0:1.3.2:1.0-event-joystick \ --device-name "Player_3" \ --evdev-absmap ABS_X=x1,ABS_Y=y1 \ --evdev-keymap BTN_THUMB=a,BTN_TOP=b,BTN_PINKIE=x,BTN_TRIGGER=y,BTN_THUMB2=back,BTN_TOP2=start \ --ui-axismap X1=KEY_DOWN:KEY_UP,Y1=KEY_RIGHT:KEY_LEFT \ --ui-buttonmap a=KEY_LEFTCTRL,b=KEY_LEFTALT,x=KEY_SPACE,y=KEY_LEFTSHIFT,back=KEY_5+KEY_1,start=KEY_6+KEY_2,back+start=KEY_SPACE+KEY_ESC" Player4_8Way_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 rb=void,tl=void,tr=void,guide=void,lt=void,rt=void \ --evdev /dev/input/by-path/platform-3f980000.usb-usb-0:1.3.4:1.0-event-joystick \ --device-name "Player_4" \ --evdev-absmap ABS_X=x1,ABS_Y=y1 \ --evdev-keymap BTN_THUMB=a,BTN_TOP=b,BTN_PINKIE=x,BTN_TRIGGER=y,BTN_BASE=lb,BTN_THUMB2=back,BTN_TOP2=start \ --ui-axismap X1=KEY_F:KEY_R,Y1=KEY_G:KEY_D \ --ui-buttonmap a=KEY_A,b=KEY_S,x=KEY_Q,y=KEY_W,back=KEY_6+KEY_2,lb=KEY_UNKNOWN,start=KEY_UNKNOWN,back+start=KEY_SPACE+KEY_ESC" ### Arcade Games that use 4 way restricted joysticks - 208 of 208 identified games plus Arkanoid and Tempest derivatives RestrictedArcadeGames=""alibaba.zip"|"amidar.zip"|"armwrest.zip"|"astinvad.zip"|"atetris.zip"|"anteater.zip"|"armorcar.zip"|"astrob.zip"|"astrof.zip"|"bagman.zip"|"ballbomb.zip"|"barrier.zip"|"blkhole.zip"|"blasto.zip"|"blockade.zip"|"btime.zip"|"carjmbre.zip"|"carnival.zip"|"cavelon.zip"|"chameleo.zip"|"checkman.zip"|"chinhero.zip"|"circusc.zip"|"ckong.zip"|"commando.zip"|"congo.zip"|"dazzler.zip"|"devilfsh.zip"|"digdug.zip"|"digdug2.zip"|"digger.zip"|"disco.zip"|"dkong.zip"|"dkong3.zip"|"dkongjr.zip"|"docastle.zip"|"dommy.zip"|"dorodon.zip"|"frogger.zip"|"galaga.zip"|"galaxian.zip"|"galxwars.zip"|"guzzler.zip"|"invrvnge.zip"|"invinco.zip"|"jjack.zip"|"joust2.zip"|"jrpacman.zip"|"jumpcoas.zip"|"jungler.zip"|"kchamp.zip"|"kicker.zip"|"kingball.zip"|"ladybug.zip"|"lasso.zip"|"levers.zip"|"lnc.zip"|"locomotn.zip"|"logger.zip"|"lrescue.zip"|"lupin3.zip"|"mappy.zip"|"marvins.zip"|"mikie.zip"|"mmonkey.zip"|"monsterb.zip"|"moonal2.zip"|"moonqsr.zip"|"mrdo.zip"|"mrflea.zip"|"mrjong.zip"|"mrtnt.zip"|"mspacman.zip"|"mystston.zip"|"naughtyb.zip"|"netwars.zip"|"olibochu.zip"|"ozmawars.zip"|"pacnpal.zip"|"pacplus.zip"|"pengo.zip"|"perestro.zip"|"pickin.zip"|"pignewt.zip"|"pisces.zip"|"pleiads.zip"|"pooyan.zip"|"popflame.zip"|"puckman.zip"|"pacman.zip"|"pulsar.zip"|"qbert.zip"|"qbertqub.zip"|"qix.zip"|"radarscp.zip"|"retofinv.zip"|"rocnrope.zip"|"route16.zip"|"samurai.zip"|"tsamurai.zip"|"scregg.zip"|"sindbadm.zip"|"solarfox.zip"|"sonofphx.zip"|"invadpt2.zip"|"panic.zip"|"shollow.zip"|"spclaser.zip"|"sqbert.zip"|"streakng.zip"|"sbagman.zip"|"superpac.zip"|"superqix.zip"|"ssi.zip"|"swat.zip"|"tactcian.zip"|"tankbatt.zip"|"taxidrvr.zip"|"elecyoyo.zip"|"theend.zip"|"timelimt.zip"|"tomahawk.zip"|"todruaga.zip"|"tranqgun.zip"|"triplep.zip"|"tutankhm.zip"|"vanvan.zip"|"volfied.zip"|"vsgongf.zip"|"wiping.zip"|"warpwarp.zip"|"zigzag.zip"|"zzyzzyxx.zip"|"alphaho.zip"|"pacnchmp.zip"|"comotion.zip"|"copsnrob.zip"|"cosmicg.zip"|"cosmos.zip"|"crash.zip"|"crush.zip"|"redufo.zip"|"diamond.zip"|"dorunrun.zip"|"dominos.zip"|"drmicro.zip"|"drgnbstr.zip"|"dremshpr.zip"|"elvactr.zip"|"eyes.zip"|"firetrap.zip"|"40love.zip"|"galpanic.zip"|"gundealr.zip"|"hardhat.zip"|"headon.zip"|"headon2.zip"|"heiankyo.zip"|"hexa.zip"|"hustle.zip"|"intrepid.zip"|"ironhors.zip"|"karianx.zip"|"kungfum.zip"|"lvgirl94.zip"|"logicpro.zip"|"logicpr2.zip"|"msjiken.zip"|"kikcubic.zip"|"mineswpr.zip"|"mtrap.zip"|"dowild.zip"|"mrgoemon.zip"|"natodef.zip"|"rallyx.zip"|"nrallyx.zip"|"pepper2.zip"|"pettanp.zip"|"popeye.zip"|"punchout.zip"|"raiders5.zip"|"rampage.zip"|"reikaids.zip"|"robby.zip"|"rthunder.zip"|"sidetrac.zip"|"schaser.zip"|"spaceinv.zip"|"spacezap.zip"|"spectar.zip"|"springer.zip"|"stratvox.zip"|"sia2650.zip"|"spnchout.zip"|"tapper.zip"|"rbtapper.zip"|"targ.zip"|"telmahjn.zip"|"theglob.zip"|"thief.zip"|"timber.zip"|"toypop.zip"|"wwjgtin.zip"|"wndrmomo.zip"|"yamyam.zip"|"zerozone.zip"|"zookeep.zip"|"pairs.zip"|"higemaru.zip"|"elecyoy2.zip"|"arkangc.zip"|"arkanoid.zip"|"arkatayt.zip"|"arkatour.zip"|"arkbl2.zip"|"arkbl3.zip"|"arkbloc2.zip"|"arkblock.zip"|"arknid2j.zip"|"arknid2u.zip"|"arknoid2.zip"|"arknoidj.zip"|"arknoidu.zip"|"arknoiuo.zip"|"arkretrn.zip"|"tempest.zip"|"tempest1.zip"|"tempest2.zip"|"tempest3.zip"|"temptube.zip"" ### Kill xboxdrv xboxkill="sudo killall xboxdrv" ### Execute the driver with the configuration needed ### $1 is the name of the system emulation (eg mame-libretro), not the name of the emulator (eg not lr-mame2003), nor the name of the folder (eg not "arcade", not "mame-libretro", not "arcade-vertical" ### $1 - The system (eg: atari2600, nes, snes, megadrive, fba, etc). ### $2 - The emulator (eg: lr-stella, lr-fceumm, lr-picodrive, pifba, etc). ### $3 - The full path to the rom file. ### $4 - The full command line used to launch the emulator. ### This information can be obtained from /dev/shm/runcommand.info case $2 in ### Arcade lr-mame2003) case $rom in $RestrictedArcadeGames) # Configuration only for these ROMs. Players 1 and 3 mapped to the same keys; Players 2 and 4 mapped to the same keys; All joysticks work simultaneously in portrait and landscape modes. $xboxkill joycommand="$Player1_4Way_Mame2003 & $Player2_4Way_Mame2003 & $Player3_4Way_Mame2003 & $Player4_4Way_Mame2003 &" eval $joycommand ;; *) # Configuration for every other ROM. Players 1 and 3 mapped to the same keys; Players 2 and 4 mapped to the same keys; All joysticks work simultaneously in portrait and landscape modes. $xboxkill joycommand="$Player1_8Way_Mame2003 & $Player2_8Way_Mame2003 & $Player3_8Way_Mame2003 & $Player4_8Way_Mame2003 &" eval $joycommand ;; esac ;;
There are some things that I do which would be relevant to you.
In any game in Tab menu in lr-mame2003, I map the keys for Players 1 and 2 and also the menu controls and save them. Basically, I use xboxdrv so that my joysticks emulate the keyboard commands I've set up in lr-mame2003's Tab menu.
With the code above, I've got 8 separate xboxdrv configurations - 1 for each of the 4 joysticks in 8-way mode; 1 for each of the 4 joysticks in 4-way mode. The key difference between the 4-way configurations and the 8-way configurations is the
--four-way-restrictor
statement.You will see there is a definition of
RestrictedArcadeGames
. These are the games that use a 4 way joystick instead of 8 way.If you go down to the bottom part of the code, you will see that for
lr-mame2003
, I've set things up so that the 4-way joystick configurations for all 4 joysticks apply to theRestrictedArcadeGames
. For all other games for lr-mame2003, the 8-way joystick configurations apply. -
@spud11 Wow, thanks for all the info! This looks like a ton of work.....I might have my hands full! When i get a chance i might have to ping you and @mediamogul for some help. I have to start digging into this, but my hope is that i can find a way to just place a runcommand into the rom folders for the 4 way games and not deal with touching any other roms or settings. I currently have all my roms set through retroarch and it looks to be heartbreaking to set them all up again with xboxdrv!
Thanks again for the info. Like i said i will probably ask questions and I will post any of my findings to this thread as updates.
-
@tmntturtlguy Just bear in mind the code I'm using is my "end point" for 4 joysticks. If you only want to do 1 joystick, then you would only have 2 configurations - 1 for 4-way and 1 for 8-way. That will be much easier to set up. The most important thing from my code is you've now got a list of the 200 odd games that are 4-way joystick games.
-
When i get a chance i might have to ping you and @mediamogul for some help.
Always glad to help. For better or worse, I wrote the wiki guide you linked to above, but at this point, @spud11, @dudleydes and a few of others know as much about all this as I do. It's definitely not user friendly, but it does allow an almost infinite amount of control over how a game is played and after you make a few maps and then reuse them as starting points for others, it gets to be pretty routine.
-
@mediamogul Thanks, do you forsee any issues trying to leave all my current settings for most of my roms and only using the xboxdrv for select roms within my arcade folder? I am going to get another 16gb SD card and duplicate my build so i can test it on the copy, so i won't do any harm...I just returned from a business trip, so i haven't had time to really dig into this yet. Thanks!
-
only using the xboxdrv for select roms within my arcade folder?
You shouldn't have an issue there. That's how I use it, only in several more situations.
-
@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
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.