lr-fuse mapping joystick to keys, not working.
-
Hi,
I have very similar issues to the one reported here:
https://retropie.org.uk/forum/topic/22135/lr-fuse-issues-mapping-keystrokes-to-gamepadSometimes mapping works, and sometime it doesn't. I've noticed two issues.
Issue 1.
Remapping just doesn't work. In this instance I'm using a single PS3-a-like controller. I have others, but have unplugged them.
As an example, I created a empty file Spectrum48K.z80 and placed it in my ROMs directory.
From emulationstation I opened it with lr-fuse and using hotkeys to access the retroarch menu, I created the following game options file:/opt/retropie/configs/all/retroarch/config/fuse/Spectrum48K.opt
fuse_ay_stereo_separation = "none" fuse_fast_load = "enabled" fuse_hide_border = "enabled" fuse_joypad_a = "m" fuse_joypad_b = "a" fuse_joypad_down = "<none>" fuse_joypad_l = "c" fuse_joypad_l2 = "n" fuse_joypad_l3 = "0" fuse_joypad_left = "<none>" fuse_joypad_r = "w" fuse_joypad_r2 = "s" fuse_joypad_r3 = "p" fuse_joypad_right = "<none>" fuse_joypad_start = "m" fuse_joypad_up = "<none>" fuse_joypad_x = "q" fuse_joypad_y = "Caps" fuse_key_hold_time = "500" fuse_key_ovrlay_transp = "enabled" fuse_load_sound = "enabled" fuse_machine = "Spectrum 48K" fuse_speaker_type = "tv speaker"
I then rebooted to the (C)1982 Sincliar Research Ltd prompt and tested the mappings.
Joypad keys A,B,X,Y L & R are not working, no matter what I map them to. The other joypad keys are working correctly.
Analogue to digital mapping works too, both left and right.Here is the associated remap file:
/opt/retropie/configs.all/retroarch/config/fuse/Spectrum48K.rmpinput_libretro_device_p1 = "257" input_libretro_device_p2 = "0" input_libretro_device_p3 = "0" input_libretro_device_p4 = "0" input_libretro_device_p5 = "0" input_player1_analog_dpad_mode = "1" input_player1_btn_a = "-1" input_player1_btn_b = "-1" input_player1_btn_l = "-1" input_player1_btn_r = "-1" input_player1_btn_x = "-1" input_player2_analog_dpad_mode = "0" input_player3_analog_dpad_mode = "0" input_player4_analog_dpad_mode = "0" input_player5_analog_dpad_mode = "0"
And here is the controller config:
/opt/retropie/configs/all/retroarch/autoconfig/ShanWan Gioteck PS3 2.4G Wireless Controller.cfginput_device = "ShanWan Gioteck PS3 2.4G Wireless Controller" input_driver = "udev" input_enable_hotkey_btn = "8" input_r3_btn = "11" input_r_y_minus_axis = "-3" input_l_btn = "4" input_load_state_btn = "4" input_r_y_plus_axis = "+3" input_up_btn = "h0up" input_left_btn = "h0left" input_state_slot_decrease_btn = "h0left" input_select_btn = "8" input_r2_btn = "7" input_r_x_minus_axis = "-2" input_l_y_plus_axis = "+1" input_l_x_plus_axis = "+0" input_right_btn = "h0right" input_state_slot_increase_btn = "h0right" input_l2_btn = "6" input_l_x_minus_axis = "-0" input_r_x_plus_axis = "+2" input_l3_btn = "10" input_r_btn = "5" input_save_state_btn = "5" input_l_y_minus_axis = "-1" input_y_btn = "3" input_x_btn = "0" input_menu_toggle_btn = "0" input_down_btn = "h0down" input_start_btn = "9" input_exit_emulator_btn = "9" input_b_btn = "2" input_reset_btn = "2" input_a_btn = "1"
I'm running on a Raspberry pi 4B with 2GB Ram & the official PSU.
I have Retropie 4.7.1 (c7080175) running on Raspbian GNU/Linux 10 (buster)
Built From: Pre made SD Image on RetroPie website.
USB Devices connected:
Lexar 128GB USB3.0 Flash, containing ROMs.
Sandstrom SKBWLTP17 Wirelesss USB Keyboard (connected but not configured in remap options for this ROM.)
itworks HB4300W 4 port USB 2.0 Hub with:
One Gioteck VS3 (PS3 wireless controller)
I have 3 other controllers, but have removed them to simplify this config.Issue 2.
Config as issue 1, but with port 3 set to Sinclair keyboard.
If a joystick is used with space, caps or enter mapped to joystick buttons in the retroarch/controls menu (i.e. in the .rmp file) as opposed to in the retroarch/options (the .opt file) then this blocks keys on the keyboard.
For example, mapping "enter" to a joystick button using the .rmp file will stop keys A and Enter working on the keyboard on port 3.Assistance working out what I've done wrong would be greatly appreciated!
-
@vealmike said in lr-fuse mapping joystick to keys, not working.:
Joypad keys A,B,X,Y L & R are not working, no matter what I map them to. The other joypad keys are working correctly.
I think this may be because of the remapping
input_player1_btn_a = "-1"
input_player1_btn_b = "-1"
input_player1_btn_l = "-1"
input_player1_btn_r = "-1"
input_player1_btn_x = "-1"This doesn't look right - the
-<x>
syntax is for axis type inputs, not buttons. I think the buttons that don't work are not correctly mapped in the RetroPad. Can you remove those lines from the remap and try again to see if the buttons work in Fuse ? -
@mitu Good work! Thankyou. That has fixed the first of my two issues.
I've no idea how those settings found their way into my remap files, but deleting them seems to fix things.
I'd send real beer if I could, an imaginary virtual beer hardly cuts the mustard.I still have issue 2, so I guess it is unrelated. Should I open another thread?
-
@vealmike said in lr-fuse mapping joystick to keys, not working.:
I still have issue 2, so I guess it is unrelated. Should I open another thread?
No, it's not needed.
-
For completeness, I've done some more work...
I checked fuse.rmp, it did not have the "-1" settings applied to anything.
Each game remap would have been created from the fuse.rmp (using the retroarch menus.)I then checked all my game remap files. 13 of 28 files had this problem.
Next I tried to recreate using the retroarch controls menu.
Cycling right through the available options that can be mapped to the port 1 controls I have:"---"
Up (1)
Fire (1)
Keyboard Overlay
Up (2)
Down
Left
Right
Fire (2)
Fire (3)
Enter
Space
Then back to "---"The (1) etc are my addition, "Fire" appears 3 times, "up" twice.
I set some buttons to each of these values, wrote a game remap file and checked for "-1". None of these options generated the "-1".Next I cleared the options on buttons A, L, L2, R, R2 & X (all originally set to differently) and bingo, I recreated the problem :
input_libretro_device_p1 = "257" input_libretro_device_p2 = "0" input_libretro_device_p3 = "259" input_libretro_device_p4 = "0" input_libretro_device_p5 = "0" input_player1_analog_dpad_mode = "1" input_player1_btn_a = "-1" input_player1_btn_l = "-1" input_player1_btn_l2 = "-1" input_player1_btn_r = "-1" input_player1_btn_r2 = "-1" input_player1_btn_x = "-1" input_player2_analog_dpad_mode = "0" input_player3_analog_dpad_mode = "0" input_player4_analog_dpad_mode = "0" input_player5_analog_dpad_mode = "0"
There appears to be a bug. When clearing a mapping using the retroarch "Controls/ port X Controls" menu from any value to "---" the resulting remap file contains "-1" for that key and this stops you mapping the button using the Retroarch "Options" menu.
I hope this helps repay the debt a little!
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.