lr-gambatte port 1 binds and switch to second controller
-
Hello,
I'm using Retropie 4.7.1
I have built a dual joystick/buttons controller based on an Xarcade tank stick.
For those who don't know, this is basically using a keyboard encoder similar to an iPac.A driver package enables both sides of the controller to function as two separate controllers (all through a single USB plug into the Pi).
The left joystick is 8 way. The right joystick has a 4 way restrictor on it and is better for 4 way platforms such as Gameboy.
So for this reason I am wanting to configure Gameboy (lr-gambatte) to use the righthand side controller.After a clean burn of my Retropie image and installing the controller driver, I start ES Configure Controller and select mappings for left side.
I then start ES Configure Controller again and select mappings for right side.Here are my mappings...
\retropie\configs\all\retroarch-joypads\Xarcade-to-Gamepad Device 1.cfg
input_device = "Xarcade-to-Gamepad Device 1"
input_driver = "udev"
input_enable_hotkey_btn = "8"
input_l_btn = "2"
input_load_state_btn = "2"
input_up_axis = "-1"
input_left_axis = "-0"
input_state_slot_decrease_axis = "-0"
input_select_btn = "8"
input_r2_btn = "7"
input_right_axis = "+0"
input_state_slot_increase_axis = "+0"
input_l2_btn = "6"
input_r_btn = "5"
input_save_state_btn = "5"
input_y_btn = "0"
input_x_btn = "1"
input_menu_toggle_btn = "1"
input_down_axis = "+1"
input_start_btn = "9"
input_exit_emulator_btn = "9"
input_b_btn = "3"
input_reset_btn = "3"
input_a_btn = "4"\retropie\configs\all\retroarch-joypads\Xarcade-to-Gamepad Device 2.cfg
input_device = "Xarcade-to-Gamepad Device 2"
input_driver = "udev"
input_enable_hotkey_btn = "8"
input_l_btn = "2"
input_load_state_btn = "2"
input_up_axis = "-1"
input_left_axis = "-0"
input_state_slot_decrease_axis = "-0"
input_select_btn = "8"
input_r2_btn = "7"
input_right_axis = "+0"
input_state_slot_increase_axis = "+0"
input_l2_btn = "6"
input_r_btn = "5"
input_save_state_btn = "5"
input_y_btn = "0"
input_x_btn = "1"
input_menu_toggle_btn = "1"
input_down_axis = "+1"
input_start_btn = "9"
input_exit_emulator_btn = "9"
input_b_btn = "3"
input_reset_btn = "3"
input_a_btn = "4"Now, all functions of lr-gambatte work great on the lefthand side controller - including hotkey.
I now wish to swap control over to the right side for lr-gambatte.
To achieve this, I open Retroarch from within lr-gambatte and navigate to Settings > Input > Port 1 binds which I guessed was the config used for player one...
Device Type: Retropad
Analogue to Digital type: Left analogue
Device Index: Xarcade-to-Gamepad Device 1
.......I then changed the Device Index in Port 1 binds to Xarcade-to-Gamepad Device 2 and returned to the game.
I then found that I could control everything from the righthand side apart from my HOTKEY button was not working. This meant that I was unable to exit game (Hotkey+Start).
Please could I ask help from somebody who knows how to do this properly?
Should it work the way I did it?
Why does hotkey not work?Very many thanks for any help.
-
The steps are correct, maybe RetroArch needs to start with 2nd controller for the hotkey to work ? You can use the RetroPie's
configuration editor and re-order the players for thegb
system, see if the P2's controls work this way. -
@mitu Thank you so much for your time on this. I would be so grateful if you could try to help me resolve the issue. Having followed many of your messages on this forum I am aware that you really know what you are talking about.
As suggested I went to Retropie Setup > Configuration / Tools > configedit > Configure basic libretro emulator options
I then selected "configure additional options for gb" and then "Choose joypad order".This menu showed 4 player entries and all 4 were UNSET.
I selected 1 and changed it to "Xarcade-to-Gamepad Device 2".
It then displayed the 4 player entries with "1 (Xarcade-to-Gamepad Device 2)" displayed for player 1.When I went into a Gameboy game it was still using left side controller.
The only thing which seems to force it to use the right side controller is when I enter Retroarch from within game and change Port 1 binds to index "Xarcade-to-Gamepad Device 2". But even then I still have no EXIT GAME option.
I modified various other options in the Retropie configuration editor which looked related but to no avail.
Important
I have discovered that my Hotkey button IS WORKING on the righthand side.
I can Reset game (Hotkey + B) and I can Save state (Hotkey + Right Shoulder) etc.
But still the combination of Hotkey + START does not exit game.I have also installed and run meleu's script from the below link and chosen to use Xarcade-to-Gamepad Device 2 (right side) for Player 1 in Gameboy.
This moves control to the right side but once again I am unable to exit games using Hotkey + Start.
https://retropie.org.uk/forum/topic/1167/here-is-a-way-to-select-joystick-for-players-1-4-global-or-emu-specific -
All methods of switching the controller order are doing the same thing in the end - configure the
input_player1_joypad_index
accordingly.Are you sure the left (p2) has the configuration file you posted earlier ? I see that it has the Hotkey set (same as 'Select') and that Start is also configured for exiting the emulator. Unless you have an input override present somewhere, the configuration you've made should work for exiting the emulator.
-
@mitu Hi mitu and thanks again!
I can confirm that P2 has the config file I posted earlier and also that I have no input overrides present.
I've exhausted all ideas and things to try from my end.
In the end I simply added the following line to my opt\retropie\configs\gb\retroarch.cfg file...
input_enable_hotkey_btn = "6"
This changes the hotkey from Select to another button on the righthand controller (lucky I have a spare).
This works. I can hit the new button (now hotkey) and Start and it will exit game back to ES.But I'd still prefer to exit by pressing Select and Start!
What does this tell us?
Are we any closer to knowing what's happening here?From my previous post... when the hotkey is the Select button, I can Reset game (Select + B) and I can Save state (Select + Right Shoulder) so Select does work as a hotkey.
It just doesn't work in combination with Start to enable me to exit game.Thank you for any continued support.
-
@vwgolfman said in lr-gambatte port 1 binds and switch to second controller:
Are we any closer to knowing what's happening here?
Not really. If
Select
already works as a hotkey and considering the configuration you posted, I don't see why other hotkey combos work, but the exit one doesn't.Try getting a verbose log and post it on pastebin.com, maybe there's an indication there for the behavior you're experiencing.
-
Hi @mitu ,
I'm returning to advise you of my good fortune and to help any others who may have been in the same situation as me.
I had been using my Xarcade tank stick controller in "Mode 1" with the Xarcade2Jstick driver which meant that Retropie was recognising it as a keyboard (iPac-type encoder).
I have now switched the controller to "Mode 4" and omitted the driver which means that Retropie recognises the controller as two separate XBox 360 controllers.
I can now configure each side of the controller with identical mappings and any game/platform I wish to use the right side instead of the left side of the controller, I simply change the Port 1 binds for in Retroarch.
When I do this, Hotkey+Start (even on the righthand side) performs correctly and exits the game.
Thank you once again for your help mitu.
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.