snes9x-rpi controls broken? Retroflag Gpi
-
@spud11 Yes it should be seamless, basically, you set the dpad mode once and leave it. Emulationstation will have it's inputs using that mode and so will all the Lr-cores (because they use what emulationstation uses). One thing that is doing my head in, and maybe you can help with, is.. I saw your --ui-axismap X1=KEY_A:KEY_D,Y1=KEY_S:KEY_W \ and that's exactly what I needed to start using the new d-pad mode. It works wonderfully! But now I'm wondering how do this for my more complex uses of the D-pad, like Duke Nukem 3D for example, where before I was able to do a modifier button + dpad to give it an alternate mapping. My old way using the other d-pad mode was to do this (looking at Duke mapping):
#Duke Nukem if [ "$2" = "eduke32" ] then sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --evdev /dev/input/by-id/usb-RetroFlag_GPi_Case_RetroFlag_01-event-joystick \ --detach-kernel-driver \ --silent \ --force-feedback \ --deadzone-trigger 15% \ --deadzone 4000 \ --mimic-xpad \ --dpad-as-button \ --no-extra-events \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2,ABS_Z=lt,ABS_RZ=rt \ --evdev-keymap BTN_SOUTH=a,BTN_EAST=b,BTN_NORTH=x,BTN_WEST=y,BTN_TL=lb,BTN_TR=rb,BTN_THUMBL=tl,BTN_THUMBR=tr,BTN_MODE=guide,BTN_SELECT=back,BTN_START=start,BTN_TRIGGER_HAPPY3=du,BTN_TRIGGER_HAPPY4=dd,BTN_TRIGGER_HAPPY1=dl,BTN_TRIGGER_HAPPY2=dr \ --evdev-absmap ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --ui-buttonmap x=KEY_RIGHTCTRL,a=KEY_E,b=KEY_SPACE,y=KEY_LEFTSHIFT,lb=KEY_A,rb=KEY_D,a+lb=KEY_SEMICOLON,a+rb=KEY_APOSTROPHE,lb+rb=KEY_LEFTCTRL,rb+lb=KEY_LEFTCTRL \ --ui-buttonmap start=KEY_ENTER+KEY_M,back=KEY_ESC,back+start=KEY_F10 \ --ui-buttonmap du=KEY_UP+KEY_W,du+a=rel:REL_Y:-5:5,a+du=rel:REL_Y:-5:5,dd=KEY_DOWN+KEY_S,dd+a=rel:REL_Y:5:5,a+dd=rel:REL_Y:5:5,dl=KEY_LEFT,dr=KEY_RIGHT \ --ui-buttonmap start+y=KEY_J,start+b=KEY_N,start+x=KEY_H,start+a=KEY_TAB \ & fi
Any idea what that might look like with the new d-pad mode?
-
By the way, du+a and a+du looks repetitive, but I actually found it works better, because this way it does not matter if the player pushed A first, or direction up first. Both ways get the "shifted output".
-
Oh, I probably should mention also, regarding your "will it be seamless question", I don't leave xboxdrv running all the time. It's disabled in retropie setup, so it does not start on boot. I start it up during the runcommand-onstart, and I kill it during runcommand-onend. This way it does not conflict with emulation station, or lr-cores. You might have already guessed this, but just in case, I thought I should explain that.
-
@SinisterSpatula said in snes9x-rpi controls broken? Retroflag Gpi:
Oh, I probably should mention also, regarding your "will it be seamless question", I don't leave xboxdrv running all the time. It's disabled in retropie setup, so it does not start on boot. I start it up during the runcommand-onstart, and I kill it during runcommand-onend. This way it does not conflict with emulation station, or lr-cores. You might have already guessed this, but just in case, I thought I should explain that.
Yes, that is how I do things too. Thanks for confirming.
In relation to the modifier+dpad scenario and whether something similar can be done with axis mode, I'll think about that, but I'll need to do that after work, so it might be 6 or 7 hours before I get to it.
-
No worries! :) I'm reading the holy bible of xboxdrv (https://xboxdrv.gitlab.io/xboxdrv.html) and it does look like axismap supports combo keys, so I think I'm in luck. I'll update here once I figure this out. :D
-
@SinisterSpatula That is very good. That's where I was going to head to as well this evening and also to this thread for ideas:
https://retropie.org.uk/forum/topic/2861/guide-advanced-controller-mappings -
@spud11 I got it!!! Yay! :D This works perfectly:
#Duke Nukem if [ "$2" = "eduke32" ] then sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --evdev /dev/input/by-id/usb-RetroFlag_GPi_Case_RetroFlag_01-event-joystick \ --detach-kernel-driver \ --silent \ --force-feedback \ --deadzone-trigger 15% \ --deadzone 4000 \ --mimic-xpad \ --dpad-as-button \ --no-extra-events \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2,ABS_Z=lt,ABS_RZ=rt \ --evdev-keymap BTN_SOUTH=a,BTN_EAST=b,BTN_NORTH=x,BTN_WEST=y,BTN_TL=lb,BTN_TR=rb,BTN_THUMBL=tl,BTN_THUMBR=tr,BTN_MODE=guide,BTN_SELECT=back,BTN_START=start,BTN_TRIGGER_HAPPY3=du,BTN_TRIGGER_HAPPY4=dd,BTN_TRIGGER_HAPPY1=dl,BTN_TRIGGER_HAPPY2=dr \ --evdev-absmap ABS_X=dpad_x,ABS_Y=dpad_y \ --ui-buttonmap x=KEY_RIGHTCTRL,a=KEY_E,b=KEY_SPACE,y=KEY_LEFTSHIFT,lb=KEY_A,rb=KEY_D,a+lb=KEY_SEMICOLON,a+rb=KEY_APOSTROPHE,lb+rb=KEY_LEFTCTRL,rb+lb=KEY_LEFTCTRL \ --ui-buttonmap start=KEY_ENTER+KEY_M,back=KEY_ESC,back+start=KEY_F10 \ --ui-buttonmap start+y=KEY_J,start+b=KEY_N,start+x=KEY_H,start+a=KEY_TAB \ --ui-buttonmap du=KEY_UP+KEY_W,du+a=rel:REL_Y:-5:5,a+du=rel:REL_Y:-5:5,dd=KEY_DOWN+KEY_S,dd+a=rel:REL_Y:5:5,a+dd=rel:REL_Y:5:5,dl=KEY_LEFT,dr=KEY_RIGHT \ & fi
-
Now I'm wondering if it's better to do an axismap or if I should stick with this method (no axismap). I'm leaning toward no axismap because buttonmap seems to be more flexible, or allows more complexity. (or so it seems, I could be wrong)
-
It turns out all I had to change was just one line. All of my mappings just needed this:
--evdev-absmap ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \
Changed to
--evdev-absmap ABS_X=dpad_x,ABS_Y=dpad_y \
Literally the only change needed.
-
@SinisterSpatula Very well done.
Is it possible to combine the two? eg
--dpad-as-button \
and--trigger-as-button \
plus, for example,--ui-axismap X1=KEY_A:KEY_D,Y1=KEY_S:KEY_W \
and--evdev-absmap ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \
etc?If not, my recollection is that mediamogul had figured out a way of having 2 separate configurations which can be switched via button press.
-
@SinisterSpatula Excellent. My last message crossed with your's.
-
Hmmm, yes that is something to experiment with for sure. Like, if we wanted to try and support whatever mode the dpad button happened to be? I'm not too sure about that. I'm thinking while that would be cool, how much use would it really be. We don't want people constantly switching their d-pad mode. They really should "set it and forget it". So all my maps are going to be consistent and based on a certain mode. I guess, if it's just that one line that changes, it could be stored as a variable at the top of the file, and used in place of the line, depending on which mode they want it to be.
-
@SinisterSpatula You've probably tried this already, but could you have both
--evdev-absmap ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \
and--evdev-absmap ABS_X=dpad_x,ABS_Y=dpad_y \
in the one configuration? Does it conflict? -
@spud11 said in snes9x-rpi controls broken? Retroflag Gpi:
--evdev-absmap ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \
OMG! THAT WORKS. I did not try that, I didn't think that would work but it TOTALLY DOES! I can be in game, and switch my D-pad mode and it does not miss a beat. Holy cow. That's lifechanging lol
-
@SinisterSpatula Terrific! Your work here is done!!!
xboxdrv
really is an amazing piece of software. -
Hey @spud11 I got my mappings converted into that advanced fancy style (the one from the advanced xboxdrv controls author). It makes me dizzy to look at it, but it works! :) Thank you so much for your ideas, and input, truly epic advancements today :D I will see about including your vice config and seeing if I can (maybe) improve upon it. I also have openbor on my todo list (there's just a basic mapping to work with the menu's right now for that one).
-
@SinisterSpatula That's great indeed and I'm glad I could help. I can't wait to see the next iteration you produce.
The advanced mapping method with case statement really works well if you have a lot of code. My arcade machine's
runcommand-onstart.sh
has about 4,300 lines of code for 4 arcade joysticks, a PS4 wireless controller and an 8BitDo Zero covering about 60 systems. I also use it for all of the libretro cores too now. It doesn't miss a beat, so I reckon you're going down the right path.Going back to my GPi
vice
code, with a bit more testing I'm finding that it's definitely not working for every game, so I reckon your newly produced code will be more successful than mine in "universalising" the controls for the c64. Please feel free to experiment with my code of course and make any changes you think are best.
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.