Guide: Advanced Controller Mappings
-
Hey All, Have been following @spud11 adventure and would like to get advice on my runcommand-onstart to get it working with Amiberry. My wireless xpad360 works in game as normal but i cant get any special mapping to work. The file i'm using is below but I'm wondering if you can see any obvious errors please? This thread has already helped me to remove carriage returns from winscp so thumbs up to all.
#!/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 ### The FUN begins #Get ROM name striping full path rom="${3##*/}" ### Set variables for your joypad and emulator ### Basic Configuraions - Standard controller mappings basicPS3="sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv >/dev/null \ --evdev /dev/input/by-id/usb-CMicrosoft_Xbox_360_Wireless_Receiver_for_Windows_E0E3B7A0-event-joystick \ --silent \ --detach-kernel-driver \ --force-feedback \ --deadzone-trigger 15% \ --deadzone 4000 \ --trigger-as-button \ --mimic-xpad-wireless \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --evdev-keymap BTN_SOUTH=a,BTN_EAST=b,BTN_NORTH=x,BTN_WEST=y,BTN_TL=lb,BTN_TR=rb,BTN_TL2=lt,BTN_TR2=rt,BTN_THUMBL=tl,BTN_THUMBR=tr,BTN_SELECT=back,BTN_START=start \ --calibration x1=-32767:0:32767,y1=-32767:0:32767,x2=-32767:0:32767,y2=-32767:0:32767" ### Extended Configurations ### Specific emulator configuration or any other parameters you will need only for some emulators amiga="--axismap -Y1=Y1,-Y2=Y2 \ --buttonmap tl^toggle=tl \ --buttonmap tr^toggle=tr \ --ui-axismap tl+x1=REL_X:10,tl+y1=REL_Y:10 \ --ui-buttonmap tl+a=BTN_LEFT,tl+b=BTN_RIGHT \ --ui-buttonmap rt+a=KEY_ENTER,rt+b=KEY_ESC,rt+x=KEY_SPACE,rt+y=KEY_P,rt+du=KEY_UP,rt+dd=KEY_DOWN,rt+dl=KEY_LEFT,rt+dr=KEY_RIGHT \ --ui-buttonmap back+x=KEY_F12,back+start=KEY_Q \ --ui-buttonmap guide=void \ --ui-axismap x2=void" fourway="--four-way-restrictor" invert="--ui-buttonmap du=KEY_DOWN,dd=KEY_UP" ### Kill Command xboxkill="sudo killall >/dev/null xboxdrv" ### Execute the driver with the configuration you need # $1 is the name of the emulation, not the name of the software used # it is intellivision not jzintv case $1 in amiga) $xboxkill joycommand="$basicPS3 $amiga &" eval $joycommand ;; esac
My last log said:
>/dev/null: No such file or directory Parameters: Executing: /opt/retropie/emulators/amiberry/amiberry.sh auto "/home/pi/RetroPie/roms/amiga/Fantasy World Dizzy.uae" Amiberry v2.1.1, by Dimitris (MiDWaN) Panokostas and Olly Aigner Based on previous work by Chips and TomB (Pandora) Joystick 0 : Xbox 360 Wireless Receiver Buttons: 17 Axis: 4 Hats: 1 starting sound thread.. stopping sound thread.. ~ xboxdrv: no process found
-
Hey All, I have found out that i needed to add a copyright symbol in front of the word microsoft to get it working! Any tips on improvements welcome though.
--evdev /dev/input/by-id/usb-©Microsoft_Xbox_360_Wireless_Receiver_for_Windows_E0E3B7A0-event-joystick \
-
@GreenRebel Hi. I can't say I have any expertise in these things as that is why I spend so much time trying to sort things out with mediamogul!
But I'd suggest removing:
sudo killall >/dev/null xboxdrv
and replace it with:
sudo killall xboxdrv
Do the same for the
basicPS3
code too:basicPS3="sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \
At this stage, while testing, it's best not to suppress messages from xboxdrv. Also, I think when you are ready to put the code back in, it should be as follows:
sudo killall > /dev/null 2>&1 xboxdrv
And:
basicPS3="sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv > /dev/null 2>&1 \
Also, I always give the joystick an easy to identify name eg "Player_1" (I've got 4 controllers):
--device-name "Player_1" \
One of the reasons for doing this is that, if you are configuring your controller so that it mimics a keyboard, then you need the following:
SUBSYSTEM=="input", ATTRS{name}=="Player_1", GROUP="users", MODE="0666", ENV{ID_INPUT_KEYBOARD}="1"
This line goes in a file called
99-xboxdrv
in folder/etc/udev/rules.d/
You will see that the
Player_1
is the same as the name of my controller. -
@mediamogul Hi. Finally, after tinkering for the past 3 days, I've got the code to work. I haven't completely tested it yet, but Mario Bros (a 2 player simultaneous/co-op game) is mapped correctly so that Player 1 and Player 2 are using separate joysticks and Black Tiger (a 2 player alternate game) maps Player 2's joystick to Player 1's keys. No more changing seats!
The extracted code (with the formatting gone a bit awry) is as follows:
#!/bin/sh rom="${3##*/}" Player1_AdvMame_Sim="sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --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.3:1.0-event-joystick \ --device-name "Player_1" \ --evdev-absmap ABS_X=y1,ABS_Y=x1 \ --evdev-keymap BTN_TRIGGER=x,BTN_THUMB=y,BTN_THUMB2=a,BTN_PINKIE=b,BTN_BASE3=back,BTN_BASE6=start \ --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,back=KEY_5+KEY_1,start=KEY_6+KEY_2,back+start=KEY_SPACE+KEY_ESC" Player2_AdvMame_Sim="sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --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_TRIGGER=y,BTN_THUMB=a,BTN_THUMB2=back,BTN_PINKIE=x,BTN_TOP=b,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" Player1_AdvMame_Alt="sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --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.3:1.0-event-joystick \ --device-name "Player_1" \ --evdev-absmap ABS_X=y1,ABS_Y=x1 \ --evdev-keymap BTN_TRIGGER=x,BTN_THUMB=y,BTN_THUMB2=a,BTN_PINKIE=b,BTN_BASE3=back,BTN_BASE6=start \ --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,back=KEY_5+KEY_1,start=KEY_6+KEY_2,back+start=KEY_SPACE+KEY_ESC" Player2_AdvMame_Alt="sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --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_TRIGGER=y,BTN_THUMB=a,BTN_THUMB2=back,BTN_PINKIE=x,BTN_TOP=b,BTN_TOP2=start \ --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,back=KEY_5+KEY_1,start=KEY_6+KEY_2,back+start=KEY_SPACE+KEY_ESC" xboxkill="sudo killall xboxdrv" case $2 in advmame) case $rom in "aerofgt.zip"|"aerofgtb.zip"|"aerofgtc.zip"|"sonicwi2.zip"|"sonicwi3.zip"|"alien3.zip"|"avspu.zip"|"aliens.zip"|"alpham2.zip"|"altbeast.zip"|"altbeas2.zip"|"altbeas4.zip"|"altbeas5.zip"|"altbeaj1.zip"|"altbeaj.zip"|"altbeaj3.zip"|"androdun.zip"|"armwar.zip"|"baddudes.zip"|"batcir.zip"|"btoads.zip"|"bnzabros.zip"|"bublbobl.zip"|"bublbobr.zip"|"bublbob1.zip"|"bublbob2.zip"|"bubblebobbleultra.zip"|"bubblem.zip"|"bubsympe.zip"|"bubsymph.zip"|"bubsympu.zip"|"burnforc.zip"|"burnfrco.zip"|"burningf.zip"|"burningh.zip"|"dino.zip"|"dinoj.zip"|"dinou.zip"|"captaven.zip"|"captavna.zip"|"captavne.zip"|"captavnj.zip"|"captavnu.zip"|"captavuu.zip"|"captcomm.zip"|"captcomu.zip"|"captcomj.zip"|"cawing.zip"|"cawingj.zip"|"cawingr1.zip"|"cawingu.zip"|"edrandy.zip"|"edrandy1.zip"|"edrandyj.zip"|"ctribe.zip"|"ctribeb.zip"|"contra.zip"|"contrab.zip"|"contraj.zip"|"contrajb.zip"|"crimfght.zip"|"crimfgt2.zip"|"crimfgtj.zip"|"crsword.zip"|"darius.zip"|"darius2.zip"|"darius2d.zip"|"dariuse.zip"|"dariusg.zip"|"dariusgj.zip"|"dariusgu.zip"|"dariusgx.zip"|"dariusj.zip"|"dariuso.zip"|"diehard.zip"|"ddrgn2u.zip"|"ddrgnw1.zip"|"ddrago3b.zip"|"ddragon.zip"|"ddragon2.zip"|"ddragon3.zip"|"ddragonb.zip"|"ddragonu.zip"|"ddragonw.zip"|"ddsom.zip"|"ddsoma.zip"|"ddsomj.zip"|"ddsomjr1.zip"|"ddsomr1.zip"|"ddsomr2.zip"|"ddsomu.zip"|"ddsomur1.zip"|"ddtod.zip"|"ddtoda.zip"|"ddtodh.zip"|"ddtodj.zip"|"ddtodjr1.zip"|"ddtodr1.zip"|"ddtodu.zip"|"ddtodur1.zip"|"dynamcop.zip"|"dynwar.zip"|"dynwarj.zip"|"exedexes.zip"|"ffight.zip"|"ffightj.zip"|"ffightj1.zip"|"ffightu.zip"|"ffightua.zip"|"gdarius.zip"|"gdarius2.zip"|"gdariusb.zip"|"gground.zip"|"gaun2pg1.zip"|"gaun2pg2.zip"|"gaun2pr3.zip"|"gaun22p1.zip"|"gaun22pg.zip"|"gaunt2.zip"|"gaunt2g.zip"|"gaunt2p.zip"|"gaunt2pg.zip"|"gaunt2pj.zip"|"gaunt22p.zip"|"gauntdl.zip"|"gauntg.zip"|"gauntgr3.zip"|"gauntgr6.zip"|"gauntgr8.zip"|"gauntj.zip"|"gauntj12.zip"|"gauntr1.zip"|"gauntr2.zip"|"gauntr4.zip"|"gauntr5.zip"|"gauntr7.zip"|"gauntr9.zip"|"gpilots.zip"|"gokuparo.zip"|"goldnax1.zip"|"goldnax2.zip"|"goldnax3.zip"|"goldnaxe.zip"|"goldnaxj.zip"|"goldnaxu.zip"|"ga2.zip"|"ga2j.zip"|"ga2u.zip"|"mt_gaxe.zip"|"mt_gaxe2.zip"|"gwar.zip"|"gwara.zip"|"gwarb.zip"|"gwarj.zip"|"hbarrel.zip"|"hbarrelw.zip"|"iceclimb.zip"|"iceclmbj.zip"|"iceclmrj.zip"|"joust.zip"|"joustr.zip"|"joustwr.zip"|"knights.zip"|"knightsj.zip"|"knightsu.zip"|"lresort.zip"|"lwings.zip"|"lwings2.zip"|"lwingsjp.zip"|"lifefrce.zip"|"lifefrcj.zip"|"mario.zip"|"mariojp.zip"|"mslug.zip"|"mslug2.zip"|"mslug3.zip"|"mslug3b6.zip"|"mslug3n.zip"|"mslug4.zip"|"mslug5.zip"|"mslugx.zip"|"mwalk.zip"|"mwalkbl.zip"|"mwalkj.zip"|"mwalku.zip"|"nbbatman.zip"|"gaiden.zip"|"progear.zip"|"progeara.zip"|"progearj.zip"|"punisher.zip"|"punishrj.zip"|"punishru.zip"|"rampage.zip"|"rampage2.zip"|"rmpgwt.zip"|"rmpgwt11.zip"|"robocop2.zip"|"robocp2j.zip"|"robocp2u.zip"|"rtypeleo.zip"|"rtypelej.zip"|"salamand.zip"|"salamanj.zip"|"salamndr2.zip"|"sengokh.zip"|"sengokmj.zip"|"sengoku.zip"|"sengoku2.zip"|"sengoku3.zip"|"sexyparo.zip"|"shocktro.zip"|"shocktr2.zip"|"sscope2.zip"|"simpsn2p.zip"|"skullfng.zip"|"skykid.zip"|"skykidd.zip"|"skykiddo.zip"|"skykiddx.zip"|"smashtv.zip"|"smashtv4.zip"|"smashtv5.zip"|"smashtv6.zip"|"spclorda.zip"|"spclordb.zip"|"spclordg.zip"|"spclords.zip"|"spidman.zip"|"spidmanu.zip"|"streetsm.zip"|"streets1.zip"|"streetsj.zip"|"streetsw.zip"|"ssriders.zip"|"scobra.zip"|"scobrab.zip"|"scobras.zip"|"scobrase.zip"|"tmnt.zip"|"tmnt2.zip"|"tmnt2a.zip"|"tmnt2pj.zip"|"tmnt2po.zip"|"tmnt22p.zip"|"tmntj.zip"|"tmntu.zip"|"tmntua.zip"|"timecrs2.zip"|"twinbee.zip"|"unsquad.zip"|"vendet2p.zip"|"viostorm.zip"|"viostrma.zip"|"viostrmj.zip"|"viostrmu.zip"|"vcop.zip"|"vcop2.zip"|"wof.zip"|"wofa.zip"|"wofj.zip"|"wofu.zip"|"wow.zip"|"xmen.zip"|"xenophob.zip") # Configuration used only for these 2 Player Co-Operative / Simultaneous ROMs $xboxkill joycommand="$Player1_AdvMame_Sim & $Player2_AdvMame_Sim &" eval $joycommand ;; *) # Configuration for every other ROM in respect of this emulator including 2 Player "hotseating" ROMS $xboxkill joycommand="$Player1_AdvMame_Alt & $Player2_AdvMame_Alt &" eval $joycommand ;; esac ;;
-
Nice! What was the problem?
-
@mediamogul It appears that advmame didn't like me defining the roms eg
$TwoPlayerSim
. It would only work if the roms were actually listed in the code itself as I've now done. The additional"
in conjunction with the|
seemed to mess things up. -
Glad to see you got it working.
I can't say I have any expertise in these things
Sure you can. Your setup is now quite a bit more complex than mine and you're keeping the wheels on the tracks nicely.
-
@mediamogul Thanks!
I've figured something else out. Not sure if anyone is using macros yet with xboxdrv but I've got one to work. I wanted to be able to exit Advance Mame without having to press anything other than back+start. I've now achieved this.
In my
/opt/retropie/configs/all
folder, I've got a file calledadvmame_exit.macro
. I've made that file executable. Its contents are:send KEY_ESC 1 wait 200 send KEY_DOWN 1 wait 200 send KEY_ENTER 1
In
runcommand-onstart.sh
, I've added a line to my joystick code for advmame as follows:--ui-buttonmap back+start=macro:/opt/retropie/configs/all/advmame_exit.macro \
Now if I hold back and press start in Mario Bros for example, it automatically exits the game.
-
Very nice. I've got TexMaster 2009 set to exit this way and I've been meaning to add Advance Mame.
-
@mediamogul Thanks. I hadn't heard of Texmaster 2009 before, but it looks like a variant of Tetris which is interesting. I'll take a look at that myself.
I'm once again messing around with the
runcommand-onstart
, but this time I'm trying to usecase $3 in
orcase $4 in
. I'd like to try to use autofire for Defender and Stargate. Because these 2 games have a lot of buttons, I'm trying to automate the "fire" button.I've looked at the xboxdrv documentation and there are a couple of different references to autofire.
I've first tried getting autofire to work using the commandline. Xboxdrv works, but autofire doesn't. Would you be able to help please? I'm hoping you might have used autofire before in one of your scripts.
I would like the "X" button (which is third button in my set of first rows of 3 buttons) to autofire. It corresponds to my "space" key.
Here is what I've put into commandline:
sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --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_C,rb=KEY_V,back=KEY_5+KEY_1,start=KEY_6+KEY_2,lt=KEY_UNKNOWN,rt=KEY_UNKNOWN \ --autofire X=100 \ --ui-buttonmap back+start=macro:/opt/retropie/configs/all/advmame_exit.macro \ &
I've tried a few variations of that autofire command but no luck. Thanks!
-
I'm hoping you might have used autofire before in one of your scripts.
I have in the past, but I don't currently have anything of my own to reference. I seem to remember it working though. Have you tried a higher number? 100ms might be a bit too fast. If you haven't already, try using 250ms to start, as that is the example given in the man page.
-
@mediamogul Thanks. What I did was try
--autofire X=250 \
. I also removed the keyboard commands from the code leaving just the joystick, just in case there was some incompatibility there. Using TAB in AdvMame, I remapped one of the joystick buttons to "X", but still no autofire. The code from commandline is as follows:sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --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 \ --autofire X=250 \ --ui-buttonmap back+start=macro:/opt/retropie/configs/all/advmame_exit.macro \ &
Xboxdrv definitely works with this code - no errors. Thanks for your help.
-
Glad to see that worked. I might do a little experimentation to see how low the value can be dropped and make a note of it in the guide.
-
@mediamogul Hi mediamogul. Actually, sorry, I didn't explain myself very well. I should have said xboxdrv starts with no errors but the autofire does not work with the code I've supplied.
-
Ah, I see. Well, I'm gonna be gaming a good bit tonight, so I might try to give Stanley a fully automatic upgrade in 'Donkey Kong 3'. I'll let you know how it goes.
-
@mediamogul That would be terrific. Thanks. Hopefully, it's something simple I've missed or misunderstood.
-
OK, I can't speak as to whether or not the method you were using is broken in xboxdrv or not, but I was able to find a better and more flexible way of implementing autofire. Using the 'B' button as an example, the following should work the way you want.
--buttonmap b^autofire:100=b
This method would seem to be better all around, as it even allows you to set one button to act as the autofire equivalent of another. For example:
--buttonmap y^autofire:100=b
would mean that the 'B' button could act normally when pressed, while the 'Y' button would autofire 'B' at 100ms intervals. I haven't used any autofire configs before myself, but I have to admit, this would save a lot of blisters while playing 'Silver Surfer'.
-
@mediamogul said in Guide: Advanced Controller Mappings:
--buttonmap b^autofire:100=b
Thanks so much. That most definitely works. Full code on commandline is:
sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --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_C,rb=KEY_V,back=KEY_5+KEY_1,start=KEY_6+KEY_2,lt=KEY_UNKNOWN,rt=KEY_UNKNOWN \ --buttonmap x^autofire:100=x \ --ui-buttonmap back+start=macro:/opt/retropie/configs/all/advmame_exit.macro \ &
However, it still requires the kids to hold down the fire button permanently in Defender and I think 2 buttons is all they can really manage - thrust and reverse. I was hoping to try to have it so that the fire button autofires permanently without them having to hold down anything.
There is reference in the manual to the
toggle
function but no explanation as to how to use it. Anyway, I suppose that probably wouldn't work as autofire would probably switch it on and off a zillion times. There's nothing I could see in the manual which would suggest that there is a permanent "on" switch for a button. Thanks for your continuing help. -
I'll experiment with adding a toggle into the mix a little later today. It works as a modifier in much the same that the autofire feature does, so I'm not sure if they'll work together or not.
An alternative in 'Defender' might be to map the fire button to both direction buttons. You'd give up a bit of control, but it would pair it down to two buttons.Edit: After considering how 'Defender' is actually played, that wouldn't really work.
-
@mediamogul - how can I debug the driver ? I am trying to make sure that amiberry is launching and using my config. There seem to be some errors .. but the game launches .. the messages fly by too fast.
Thanks
#!/bin/sh source ~/RetroPie/roms/pc/get_stick_id/stick_id.sh echo $MYCTRL >> /dev/shm/stick.log ## 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 ### The FUN begins #Get ROM name striping full path rom="${3##*/}" ### Set variables for your joypad and emulator ### Basic Configuraions - Standard controller mappings basicPS4="/opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --evdev=/dev/input/by-id/$MYCTRL \ --silent \ --detach-kernel-driver \ --force-feedback \ --mimic-xpad \ --dpad-as-button \ --deadzone-trigger 15% \ --deadzone 4000 \ --trigger-as-button \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_Z=x2,ABS_RZ=y2,ABS_RX=lt,ABS_RY=rt,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --evdev-keymap BTN_EAST=a,BTN_C=b,BTN_SOUTH=x,BTN_NORTH=y,BTN_WEST=lb,BTN_Z=rb,BTN_START=tl,BTN_SELECT=tr,BTN_THUMBL=guide,BTN_TL2=back,BTN_TR2=start \ --calibration x1=-32767:0:32767,y1=-32767:0:32767,x2=-32767:0:32767,y2=-32767:0:32767" amiga="--axismap -Y1=Y1,-Y2=Y2 \ --ui-axismap x2=REL_X:1,y2=REL_Y:1 \ --ui-axismap x1=KEY_LEFT:KEY_RIGHT,y1=KEY_DOWN:KEY_UP \ --ui-buttonmap lt=BTN_LEFT,rt=BTN_RIGHT,start=KEY_ESC,back=KEY_LEFTCTRL,y=KEY_SPACE,a=KEY_LEFTCTRL,b=KEY_LEFTALT,x=KEY_LEFTSHIFT \ --ui-buttonmap guide=void,tl=void,lt=void,rt=void,back=void \ --ui-axismap x2=void" fourway="--four-way-restrictor" invert="--ui-buttonmap du=KEY_DOWN,dd=KEY_UP" ### Kill Command xboxkill="sudo killall >/dev/null xboxdrv" ### Execute the driver with the configuration you need # $1 is the name of the emulation, not the name of the software used # it is intellivision not jzintv case $1 in amiga) $xboxkill joycommand="$basicPS4 $amiga &" eval $joycommand ;; esac #--ui-buttonmap du=KEY_UP,dd=KEY_DOWN,dl=KEY_LEFT,dr=KEY_RIGHT \
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.