Guide: Advanced Controller Mappings
-
i did think of that, so all my testing is one at a time with only that device plugged in.
-
The only thing left I can think of is that the software may not be seeing the virtual mouse as being a real mouse in a similar way that RetroArch won't see the virtual keyboard without a udev rule. I would try searching for a similar rule that can be applied to the virtual mouse and see if that might make a difference.
-
ok i'll poke around and see if i can find anything.
EDIT
found this, just will need more time to get a handle on it, way above my pay gradehttp://www.embeddedlinux.org.cn/EssentialLinuxDeviceDrivers/final/ch07lev1sec1.html
http://stackoverflow.com/questions/16482260/using-linux-virtual-mouse-driver
-
@mediamogul Hi mediamogul
I'm just in the process of changing my Amiga setup, so that xboxdrv mimics the default keys for UAE4ARM and amiberry (rather than it mimic the DragonRise joysticks).
My current setup works perfectly, but the reason I'm doing this is so that I can get to the menu and exit without using the keyboard at all.
However, I can't seem to get any keys to work in game with UAE4ARM. I've tested UAE4ARM with and without xboxdrv operating and pressing every key on the keyboard does nothing (except F12 which definitely works).
I know you've got your Logitech F710 mimicking the keys. Could I please ask whether you did anything special to get the keys to work in game? I've got individual .uae files for each game. Is there anything in the .uae file that I should have or change? An example .uae appears below:
config_description=Alien Breed Special Edition '92 config_hardware=true config_host=true config_version=2.8.1 ; original paths pandora.rom_path=/opt/retropie/emulators/uae4arm/kickstarts/ pandora.floppy_path=/opt/retropie/emulators/uae4arm/disks/ pandora.hardfile_path=/opt/retropie/emulators/uae4arm/ pandora.cd_path=/opt/retropie/emulators/uae4arm/cd32/ ; Controller Config joyport0=joy1 joyport0autofire=none joyport0mode=djoy joyportname0=JOY1 joyport1=joy3 joyport1autofire=none joyport1mode=djoy joyportname1=JOY3 joyportfriendlyname0=Player_2 joyportfriendlyname1=Player_1 input.config=0 input.joymouse_speed_analog=2 input.joymouse_speed_digital=10 input.joymouse_deadzone=33 input.joystick_deadzone=33 input.analog_joystick_multiplier=15 input.analog_joystick_offset=-1 input.mouse_speed=100 input.autofire_speed=2496 input.autofire=8 key_for_menu=293 key_for_quit=27 button_for_menu=-1 button_for_quit=8 ; host-specific pandora.cpu_speed=600 pandora.joy_conf=0 pandora.joy_port=0 pandora.stylus_offset=0 pandora.tap_delay=10 pandora.custom_controls=0 pandora.custom_dpad=0 pandora.custom_up=-5 pandora.custom_down=-6 pandora.custom_left=-7 pandora.custom_right=-8 pandora.custom_a=-3 pandora.custom_b=-4 pandora.custom_x=0 pandora.custom_y=0 pandora.custom_l=0 pandora.custom_r=0 pandora.move_x=0 pandora.move_y=0 pandora.button1=2 pandora.button2=1 pandora.autofire_button=3 pandora.jump=-1 ; Common use_gui=no kickstart_rom_file=$(FILE_PATH)/kick205.rom kickstart_ext_rom_file=$(FILE_PATH)/ ; Floppy Drives ;floppy0=/home/pi/RetroPie/roms/amiga/Games_WHDLoad/ ;floppy0type=0 ;floppy1=/home/pi/RetroPie/roms/amiga/Games_WHDLoad/ ;floppy1type=0 ;floppy2=/home/pi/RetroPie/roms/amiga/Games_WHDLoad/ ;floppy2type=0 ;floppy3=/home/pi/RetroPie/roms/amiga/Games_WHDLoad/ ;floppy3type=0 nr_floppies=0 floppy_speed=800 ; Hard Drives filesystem2=rw,DH0:DH0:/home/pi/RetroPie/roms/amiga/_BootWHD/,10 uaehf1=dir,rw,DH0:DH0:/home/pi/RetroPie/roms/amiga/_BootWHD/,10 filesystem2=rw,DH1:games:/home/pi/RetroPie/roms/amiga/Games_WHDLoad/AlienBreedSpecialEdition/,0 uaehf0=dir,rw,DH1:games:/home/pi/RetroPie/roms/amiga/Games_WHDLoad/AlienBreedSpecialEdition/,0 ;filesystem2=rw,DH2:HDFGame:/home/pi/RetroPie/roms/amiga/Games_WHDLoad/AlienBreedSpecialEdition,32,1,2,512,50,,uae ;hardfile2=dir,rw,DH2:HDFGame:/home/pi/RetroPie/roms/amiga/Games_WHDLoad/AlienBreedSpecialEdition,32,1,2,512,50,,uae ; Display / Screen Setup gfx_framerate=0 gfx_width=640 gfx_height=262 gfx_width_windowed=320 gfx_height_windowed=240 gfx_width_fullscreen=640 gfx_height_fullscreen=480 gfx_lores=false gfx_resolution=hires gfx_correct_aspect=False ntsc=False ; CPU options cpu_type=68020 cpu_speed=real finegrain_cpu_speed=1024 ;cpu_model=<<cpumodel>> cpu_compatible=False cpu_24bit_addressing=True cachesize=8192 ; Memory a1000ram=false chipmem_size=4 bogomem_size=0 fastmem_size=8 z3mem_size=0 z3mem_start=0x1000000 ; Chipset chipset=ECS_Agnus chipset_refreshrate=0.000000 collision_level=playfields fast_copper=True immediate_blits=False rtg_nocustom=true rtg_modes=0x502 gfxcard_size=0 gfxcard_type=ZorroIII ; Misc bsdsocket_emu=False show_leds=false kbd_led_num=-1 kbd_led_scr=-1 kbd_led_cap=-1 ; Sound sound_output=exact sound_channels=stereo sound_stereo_separation=7 sound_stereo_mixing_delay=0 sound_frequency=44100 sound_interpol=none sound_filter=off sound_filter_type=standard sound_volume_cd=20 sound_auto=yes synchronize_clock=yes
In terms of my runcommand-onstart, the relevant setup is Player1_Amiga below. I've commented out the keys.
#!/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##*/}" ### Set variables for joysticks and emulators ### Basic Configurations - Standard controller mappings for the 4 Arcade (DragonRise) joysticks - map Arcade joysticks to XBox 360 Controller and then map to keyboard. ### Remove " > /dev/null 2>&1 " from first line to see information when xboxdrv starts ### Second: Remember to change the 99-xboxdrv file in /etc/udev/rules.d/ to the following: ### SUBSYSTEM=="input", ATTRS{name}=="Player_1", GROUP="users", MODE="0666", ENV{ID_INPUT_KEYBOARD}="1" ### SUBSYSTEM=="input", ATTRS{name}=="Player_2", GROUP="users", MODE="0666", ENV{ID_INPUT_KEYBOARD}="1" ### SUBSYSTEM=="input", ATTRS{name}=="Player_3", GROUP="users", MODE="0666", ENV{ID_INPUT_KEYBOARD}="1" ### SUBSYSTEM=="input", ATTRS{name}=="Player_4", GROUP="users", MODE="0666", ENV{ID_INPUT_KEYBOARD}="1" ### 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. ### First: Using the TAB menu in lr-mame2003 and other emulators, 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_Mame and Player2_4Way_Mame map Joysticks 1 and 2 with four way restriction for use with lr-mame2003. Player1_4Way_Mame="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 \ --four-way-restrictor \ --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_4Way_Mame="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 \ --four-way-restrictor \ --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" ### Player3_4Way_Mame and Player4_4Way_Mame map Joysticks 3 and 4 with four way restriction for use with lr-mame2003. Player3_4Way_Mame="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.2:1.0-event-joystick \ --device-name "Player_3" \ --evdev-absmap ABS_X=x1,ABS_Y=y1 \ --four-way-restrictor \ --evdev-keymap BTN_TRIGGER=y,BTN_THUMB=a,BTN_THUMB2=back,BTN_PINKIE=x,BTN_TOP=b,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_Mame="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 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_TRIGGER=y,BTN_THUMB=a,BTN_THUMB2=back,BTN_PINKIE=x,BTN_TOP=b,BTN_BASE=lb,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_Mame and Player2_8Way_Mame map Joysticks 1 and 2 with no restriction for use with lr-mame2003 Player1_8Way_Mame="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_8Way_Mame="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" ### Player3_8Way_Mame and Player4_8Way_Mame map Joysticks 3 and 4 with no restriction for use with lr-mame2003 Player3_8Way_Mame="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.2:1.0-event-joystick \ --device-name "Player_3" \ --evdev-absmap ABS_X=x1,ABS_Y=y1 \ --evdev-keymap BTN_TRIGGER=y,BTN_THUMB=a,BTN_THUMB2=back,BTN_PINKIE=x,BTN_TOP=b,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_Mame="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 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_TRIGGER=y,BTN_THUMB=a,BTN_THUMB2=back,BTN_PINKIE=x,BTN_BASE=lb,BTN_TOP=b,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_Amiga and Player2_Amiga are for the UAE4ARM emulator and fixes the axes for Players 1 and 2. Not mapped to the keyboard. Player1_Amiga="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_LEFTSHIFT,y=KEY_UNKNOWN,back=KEY_UNKNOWN,start=KEY_UNKNOWN,back+start=KEY_F12" Player2_Amiga="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" ### ARCADE - LR-FBALPHA - USES RETROARCH KEYS - The mappings below enable the joysticks to operate either in 4-Way or in 8-Way mode depending on the game. ### CORE INPUT REMAPPING - in a game (eg Bubble Bobble), hold "space" and press "F1" to enter lr-fbalpha's Retroarch menu. Note: I've set up my Player 1 joystick in Retroarch's general menu so that the button formation is A, B, X and Y (most like the XBox 360 Controller formation). However, Retroarch and lr-fbalpha mimic the SNES Controller. With the SNES Controller, Button Y is the fire button and Button B is the jump button. So that the first button (Button A) on my DragonRise controller is the "fire" button, enter core input remapping, quick menu, controls and change the "fire" button from Y to A for both Players 1 and 2. Remember to "Save Core Remap". This will mean that the "fire" button (A) and the "jump" button (B) are now next to each other - no stretching of fingers required. (Also, now there is no need for a separate rom config file in roms folder). ### Player1_4Way_FBA and Player2_4Way_FBA map Joysticks 1 and 2 with four way restriction for use with libretro emulators other than lr-mame2003. The keyboard mappings below are the same keys that are mapped for Users 1 and 2 in Retroarch. ### For Player 1, the Select (back) button will now start Player 1 and the Start key will now start Player 2; holding down the Select button and pressing the Start button will exit the emulator. For Player 2, Select and Start do nothing. For Player 3, Select is Coin 1 and Start will start Player 3. Hold down Select and press Start will exit. For Player 4, Select is Coin 2 and Start will start Player 4 and Player 3. Holding down both will exit the emulator. Player1_4Way_FBA="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,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 \ --four-way-restrictor \ --evdev-keymap BTN_TRIGGER=x,BTN_THUMB=y,BTN_THUMB2=a,BTN_PINKIE=b,BTN_TOP2=lb,BTN_TOP=rb,BTN_BASE3=back,BTN_BASE6=start \ --ui-axismap X1=KEY_LEFT:KEY_RIGHT,Y1=KEY_UP:KEY_DOWN \ --ui-buttonmap a=KEY_X,b=KEY_Z,x=KEY_S,y=KEY_A,lb=KEY_Q,rb=KEY_W,back=KEY_RIGHTSHIFT+KEY_ENTER,start=KEY_6+KEY_2,back+start=KEY_SPACE+KEY_ESC" Player2_4Way_FBA="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 back=void,start=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_TRIGGER=y,BTN_THUMB=a,BTN_THUMB2=lb,BTN_PINKIE=x,BTN_TOP=b,BTN_TOP2=rb \ --ui-axismap X1=KEY_D:KEY_G,Y1=KEY_R:KEY_F \ --ui-buttonmap a=KEY_LEFTCTRL,b=KEY_LEFTALT,x=KEY_SPACE,y=KEY_LEFTSHIFT,lb=KEY_V,rb=KEY_B" ### Player3_4Way_FBA and Player4_4Way_FBA map Joysticks 3 and 4 with four way restriction for use with libretro emulators other than lr-mame2003. The keyboard mappings below are the same keys that are mapped for Users 1 and 2 in Retroarch (with axes appropriately altered). Player3_4Way_FBA="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.2:1.0-event-joystick \ --device-name "Player_3" \ --evdev-absmap ABS_X=x1,ABS_Y=y1 \ --four-way-restrictor \ --evdev-keymap BTN_TRIGGER=y,BTN_THUMB=a,BTN_THUMB2=back,BTN_PINKIE=x,BTN_TOP=b,BTN_TOP2=start \ --ui-axismap X1=KEY_DOWN:KEY_UP,Y1=KEY_RIGHT:KEY_LEFT \ --ui-buttonmap a=KEY_X,b=KEY_Z,x=KEY_S,y=KEY_A,back=KEY_RIGHTSHIFT,start=KEY_ENTER,back+start=KEY_SPACE+KEY_ESC" Player4_4Way_FBA="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 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_TRIGGER=y,BTN_THUMB=a,BTN_THUMB2=back,BTN_PINKIE=x,BTN_BASE=lb,BTN_TOP=b,BTN_TOP2=start \ --ui-axismap X1=KEY_F:KEY_R,Y1=KEY_G:KEY_D \ --ui-buttonmap a=KEY_LEFTCTRL,b=KEY_LEFTALT,x=KEY_SPACE,y=KEY_LEFTSHIFT,back=KEY_6,lb=KEY_UNKNOWN,start=KEY_2,back+start=KEY_SPACE+KEY_ESC" ### Player1_8Way_FBA and Player2_8Way_FBA map Joysticks 1 and 2 with no restriction for use with libretro emulators other than lr-mame2003. The keyboard mappings below are the same keys that are mapped for Users 1 and 2 in Retroarch. Player1_8Way_FBA="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,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_X,b=KEY_Z,x=KEY_S,y=KEY_A,lb=KEY_Q,rb=KEY_W,back=KEY_RIGHTSHIFT+KEY_ENTER,start=KEY_6+KEY_2,back+start=KEY_SPACE+KEY_ESC" Player2_8Way_FBA="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 back=void,start=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_LEFTCTRL,b=KEY_LEFTALT,x=KEY_SPACE,y=KEY_LEFTSHIFT,lb=KEY_V,rb=KEY_B" ### Player3_8Way_FBA and Player4_8Way_FBA map Joysticks 3 and 4 with no restriction for use with libretro emulators other than lr-mame2003. The keyboard mappings below are the same keys that are mapped for Users 1 and 2 in Retroarch (with axes appropriately altered). Player3_8Way_FBA="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.2:1.0-event-joystick \ --device-name "Player_3" \ --evdev-absmap ABS_X=x1,ABS_Y=y1 \ --evdev-keymap BTN_TRIGGER=y,BTN_THUMB=a,BTN_THUMB2=back,BTN_PINKIE=x,BTN_TOP=b,BTN_TOP2=start \ --ui-axismap X1=KEY_DOWN:KEY_UP,Y1=KEY_RIGHT:KEY_LEFT \ --ui-buttonmap a=KEY_X,b=KEY_Z,x=KEY_S,y=KEY_A,back=KEY_RIGHTSHIFT,start=KEY_ENTER,back+start=KEY_SPACE+KEY_ESC" Player4_8Way_FBA="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 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_TRIGGER=y,BTN_THUMB=a,BTN_THUMB2=back,BTN_PINKIE=x,BTN_BASE=lb,BTN_TOP=b,BTN_TOP2=start \ --ui-axismap X1=KEY_F:KEY_R,Y1=KEY_G:KEY_D \ --ui-buttonmap a=KEY_LEFTCTRL,b=KEY_LEFTALT,x=KEY_SPACE,y=KEY_LEFTSHIFT,back=KEY_6,lb=KEY_UNKNOWN,start=KEY_2,back+start=KEY_SPACE+KEY_ESC" ### Gameboy Advance Emulator GPSP defaults to Player 2's joystick. Player1_gpsp enables Player 1's joystick to operate simultaneously with Player 2's joystick, as Player 1's joystick is mapped to the default keys. The default keys are D-Pad = up/down/left/right; A Button = z; B Button = x; left trigger = a; right trigger = s; start = enter; select = backspace. Player1_gpsp="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_Z,b=KEY_X,x=KEY_A,y=KEY_S,back=KEY_BACKSPACE,start=KEY_ENTER,back+start=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 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_Mame & $Player2_4Way_Mame & $Player3_4Way_Mame & $Player4_4Way_Mame &" 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_Mame & $Player2_8Way_Mame & $Player3_8Way_Mame & $Player4_8Way_Mame &" eval $joycommand ;; esac ;; uae4arm) $xboxkill joycommand="$Player1_Amiga & $Player2_Amiga &" eval $joycommand ;; gpsp) $xboxkill joycommand="$Player1_gpsp &" eval $joycommand ;; lr-fbalpha) 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_FBA & $Player2_4Way_FBA & $Player3_4Way_FBA & $Player4_4Way_FBA &" 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_FBA & $Player2_8Way_FBA & $Player3_8Way_FBA & $Player4_8Way_FBA &" eval $joycommand ;; esac ;; esac ### advmame-1.4) ### case $rom in ### $RestrictedArcadeGames) # Configuration used only for these ROMs ### $xboxkill ### joycommand="$Player1_4Way & $Player2_4Way & $Player3_4Way & $Player4_4Way &" ### eval $joycommand ### ;; ### *) # Configuration for every other ROM in respect of this emulator ### $xboxkill ### joycommand="$Player1_8Way & $Player2_8Way & $Player3_8Way & $Player4_8Way &" ### eval $joycommand ### ;; ### esac ### ;;
Thanks so much.
-
@spud11
I think it'skey_for_menu=293 key_for_quit=27
But what i did was to map F12 (default open GUI key) to my Guide Button on my F710 and Guide+X is Q (default Quit when the GUI is open). So when i press Guide i get the GUI, when i hold Guide and press X, the Menu Pops up for a second and then quits Amiberry.
-
-
@mediamogul and @EctoOne Thanks to both of you.
But with xboxdrv am I just able to map one key alone eg the escape key?
At the moment, I'm finding none of the keys work with UAE4ARM/xboxdrv (eg up/down/left/right won't work with or without xboxdrv). So can I just map
--ui-buttonmap back+start=KEY_ESC
and not worry about mapping any of the other keys? Or do I have to map everything in which case I seem to be having a problem with UAE4ARM? With all my other keyboard mappings eg for lr-mame2003, I've mapped every key I need and thought that's what had to be done in every case.Thanks.
-
So can I just map
--ui-buttonmap back+start=KEY_ESC
and not worry about mapping any of the other keys?If the goal is to have 'select+start' quit immediately, then you'll need set
key_for_quit=27
in whatever.uae
file you're using for Amiberry (UAE4ARM doesn't have this ability) and then use xboxdrv to make the 'select+start' combination with--ui-buttonmap back+start=KEY_ESC
. -
@mediamogul Thanks.
So I've switched to amiberry, inserted
key_for_quit=27
in the relevant .uae and added--ui-buttonmap back+start=KEY_ESC
to the command as so: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-buttonmap back+start=KEY_ESC
You will see that I haven't mapped any other keys at this stage. However, both pressing the escape on the keyboard or pressing both buttons back and start will exit the game completely. So that now definitely works. Thanks.
However, nothing else works. I have tried without loading xboxdrv ie just trying to use the keyboard "in game" but again it's as though amiberry isn't recognising any keys, other than the escape. I understand the default keys for amiberry are the same as for UAE4ARM and are hardcoded as follows:
lctrl - joy 1/mouse 1 (button X in gui)
lalt - joy 2/mouse 2 (button Y in gui)
lshift - joy 1 autofire (button A in gui)
z - mouse 1 (button B in gui)
5 - switch input between mouse/joystick
arrow keys - up / down / left / rightThese keys should just work in game if xboxdrv isn't loaded, shouldn't they? I just can't seem to get any of them to work with or without loading xboxdrv. Could it be that the ports being mapped to my DragonRise joysticks are a problem? Or do I need to map all other keys in the .uae?
-
I've never had any luck key-mapping joystick controls to any of the variants of UAE4ALL. As I understand it, the Amiberry developer is looking into the issue, but I'm not sure about the extent of the problem. Instead, I lean into the skid on this one and just map my controller to be seen as a standard XBox 360 controller that can then be selected from the pull-down menu in the 'Input' settings of the software. The only changes I make are to map a toggle that allows me to switch the left joystick and A/B buttons to mouse control, a combination to open the menu, and a combination for the quit function, as you've now done.
-
@mediamogul Thanks. I won't bother trying to map all keys as that clearly isn't working.
I've now tested the code a bit more. If I have the following extracts in runcommand-onstart, xboxdrv won't start:
Player1_Amiga="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-buttonmap back+start=KEY_ESC" Player2_Amiga="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" ;; uae4arm) $xboxkill joycommand="$Player1_Amiga & $Player2_Amiga &" eval $joycommand ;;
The only difference being the
--ui-buttonmap back+start=KEY_ESC
line. Without it, xboxdrv works as per normal.Output of runcommand.log for the above is:
Parameters: Executing: /opt/retropie/emulators/amiberry/amiberry.sh rp-a1200.uae "/home/pi/RetroPie/roms/amiga/Alien Breed Special Edition '92.uae" Amiberry v2.1.1, by Dimitris (MiDWaN) Panokostas and Olly Aigner Based on previous work by Chips and TomB (Pandora) Joystick 0 : DragonRise Inc. Generic USB Joystick Buttons: 12 Axis: 4 Hats: 1 Joystick 1 : DragonRise Inc. Generic USB Joystick Buttons: 12 Axis: 4 Hats: 1 Joystick 2 : DragonRise Inc. Generic USB Joystick Buttons: 12 Axis: 4 Hats: 1 Joystick 3 : DragonRise Inc. Generic USB Joystick Buttons: 12 Axis: 4 Hats: 1 starting sound thread.. stopping sound thread.. /opt/retropie/supplementary/runcommand
So xboxdrv isn't loading.
But if I run the following code for each joystick separately from the commandline, xboxdrv will work and my "back" button (but not back+start) will exit the game:
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-buttonmap back+start=KEY_ESC \ &
And:
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 \ &
For some reason, on the commandline, the xboxdrv code for each joystick needs to be entered separately too - I can't just have a
&
in between and start them in one block of code. I'm not sure why that is the case but that might be what's causing xboxdrv not to start up when using runcommand-onstart which basically starts both joysticks automatically using the&
in between.The only difference between my "normal" xboxdrv code and this is that one line of code relating to the escape button. Without it, xboxdrv works perfectly from runcommand-onstart.
-
The only difference between my "normal" xboxdrv code and this is that one line of code relating to the escape button. Without it, xboxdrv works perfectly from runcommand-onstart.
It's formatted correctly. the only thing I can guess is that unwanted characters are being introduced from your text editor. What are you using to edit the script?
-
@spud11 you still have uae4arm in your onstart file. If you're using amiberry now you need to replace it with amiberry.
Edit: I just looked at my script and i'm suprised that it worked with uae4arm. In my script it says that you need to call the system not the software.
Thats why i didn't had that problem when i made the official change to amiberry because i had setamiga
instead ofuae4arm
oramiberry
.### 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="$LogiF710 $amiga &" eval $joycommand ;; esac
-
@EctoOne and @mediamogul Oh cripes. That was silly of me. Thank you both. I'm at work at the moment, but once home will replace uae4arm with amiberry in the runcommand-onstart and then see what happens.
Also, I haven't had any problems with the line break issue for some time now, because I've got the editor now set to show 'LF' after each return so I don't think it will be that but will look at it again if the above doesn't work.
-
-
@mediamogul and @EctoOne
Brilliant! All good now. The change from uae4arm to amiberry-a1200 in the runcommand-onstart fixed the problem. Also, I realised I'd already added
button_for_quit=8
in the .uae so pressing my back button automatically led to it exiting. I've replaced that withbutton_for_quit=-1
and I've got thekey_for_quit=27
in there too so all is working as it should with back+start now exiting the game.Thank you!
-
@mediamogul Hi. With 2 player alternate games (ie games where 1 player takes a turn and then the next player takes their turn), Advance Mame (or actually the game itself) defaults to Player 1's joystick. Advance Mame works fine for 2 Player simultaneous games - in that case Player 1's joystick controls Player 1; Player 2's joystick controls Player 2.
But as I have an arcade table with 4 joysticks, I was hoping to use xboxdrv to get Advance Mame to recognise Player 2's joystick for 2 player alternate games by having Player 2's joystick mirror Player 1's keys so that there is no need to change seats each time. I have set up Advance Mame using TAB to give Player 1 and Player 2 different keys.
As I don't want Player 2 to mimic Player 1's keys when I'm playing 2 player simultaneous/co-operative games, I'm trying to "carve out" the 2 Player simultaneous games eg Mario Bros. Then with the
*
class, every other game including 1 player and 2 player alternate games will have Player 2's joystick mapped to Player 1's keys.With Mario Bros, I've tested my code in commandline and it does work 100% (Player 1's joystick is mapped to Player 1's keys and Player 2's joystick is mapped to Player 2's keys), but I can't get it to work properly in runcommand-onstart. What happens is that Mario Bros, instead of being treated as a "carved out" 2 player simultaneous game, it is treated among the
*
class ie like every non-simultaneous game - that is, both Player 1's joystick and Player 2's joystick controls Player 1.An extract of the code from runcommand-onstart is here:
### Code begins ### Game/ROM full path 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" ### 2 Player Co-operative or 2 Player Simultaneous Arcade games - for Advance Mame. These are games where 2 players are playing at the same time with different joysticks. With 2 Player Co-operative games, Player 1 uses Player 1's joystick and Player 2 uses Player 2's joystick. For 2 player alternate games using Advance Mame (ie games where one person takes their turn and then the next player takes their turn), Player 1 and Player 2 use Player 1's joystick. Player 2 can't use a separate joystick. To avoid this "hot seating", these xboxdrv configurations allow 2 Player Co-operative games to continue to use 2 joysticks while for 2 Player alternate games which use hotseating normally, Player 1's and 2's joystick controls now mirror each other by using the same keys, so there is no need for "hotseating". TwoPlayerSim=""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"" case $2 in advmame) case $rom in $TwoPlayerSim) # 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 ;;
I wondered whether it might have something to do with having .zip in the game name, but I have removed that, tested it and there is no change. I've also checked the code by replacing in the
*
class $Player1_AdvMame_Alt and $Player2_AdvMame_Alt with $Player1_AdvMame_Sim and $Player2_AdvMame_Sim and in that case it does work - both players can play simultaneously using separate joysticks mapped to the respective keys. That means that for some reason Mario Bros is defaulting to the*
class no matter what I do.There are no errors in the log either.
Could you please help me? Thank you.
-
@mediamogul Hi.
While testing I have narrowed down the problem to my definition of
TwoPlayerSim
by changing the code to the following:### Mario Bros Mario=""mario.zip"" advmame) case $rom in $Mario) # 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 ;;
The above code definitely works.
I'm just not sure what the problem is with
TwoPlayerSim
. -
I'm afraid I'm not going to be much help tonight. It was one dollar shots night down at the Regal Beagle. Plus, I overheard half of a conversation that makes me think my two roommates might have kidnapped our landlord, so I have to deal with that now. I'll take a closer look at this in the morning, but is 'Mario Bros.' the only game not working here, or are all the
TwoPlayerSim
titles not triggering? -
@mediamogul That's no problem at all - your roommates will probably need some assistance anyway burying your landlord's body. I'll play around with the code a bit later and see what eventuates.
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.