Guide to set up your gampad
#1
MODERATOR EDIT: out of date with the new controller window, see How to configure controllers in the RetroPlayer documentation subforum.



This guide will help you to set up your gamepad to use with retroplayer. You will need a gamepad and a PC running the retroplayer branch of xbmc. If you compile from source make sure that gamepad support is enabled.

This manual assumes that you have already tried the plug and play approach with your gamepad and it simply did not work.

Step 1
Enable the debug log output in xbmc. To do this go to
Code:
Settings -> System -> Debugging
in your xbmc installation. For further help look at the wiki and choose according to your skills.

Step 2
Plug the gamepad in and restart xbmc. Take a look at the log file now. You should find something like
Code:
NOTICE: Initialize: Enabled Joystick: "Xbox 360 Wireless Receiver" (Linux Joystick API)
in this file. In this case "Xbox 360 Wireless Receiver" is the name of the gampad we will use later.

Step 3
Find the directory where your keymaps are stored. The keymap wikipage might also help you if you get lost somehow. Now take an already existing keymap to work with. For example take this and put it in your keymap directory. In this case you could name it "joystick.microsoft.xbox.360".

Step 4
Now you have to modify that keymap file. The most important thing is that you have The FullscreenGame section added.
Code:
<FullscreenGame>
    <joystick name="Xbox 360 Wireless Receiver">
      <button id="1">JoypadA</button>
      <button id="2">JoypadB</button>
      <button id="3">JoypadX</button>
      <button id="4">JoypadY</button>
      <button id="5">JoypadL</button>
      <button id="6">JoypadR</button>
      <button id="7">JoypadSelect</button>
      <button id="8">JoypadStart</button>
      <!-- The joypad also requires L2, R2, L3, R3 for PS1 games -->
      <button id="9">Stop</button>  <!-- left stick -->
      <button id="10">FullScreen</button>  <!-- right stick -->
      <button id="11">JoypadUp</button>
      <button id="12">JoypadDown</button>
      <button id="13">JoypadLeft</button>
      <button id="14">JoypadRight</button>
      <button id="15">JoypadSelect</button>  <!-- id="7" on different drivers -->
      <hat id="1" position="up">JoypadUp</hat>
      <hat id="1" position="down">JoypadDown</hat>
      <hat id="1" position="left">JoypadLeft</hat>
      <hat id="1" position="right">JoypadRight</hat>
      <!-- No axis mappings yet -->
    </joystick>
</FullscreenGame>
Yout can put the FullscreenGame section right after the </FullscreenVideo> section or any other already existing section. Make sure that you put the name we found in step 2 in name="..".

Step 4
What have we done so far? We have told xbmc that we have a gamepad that is called "Xbox 360 Wireless Receiver" and that we would like to use that gamepad in a fullscreen game view. Now we have to map the buttons on the gamepad to the emulator core buttons.
Following line of the kemap file represents one button of the gamepad mapped to one button of the emulator.
Code:
<button id="1">JoypadA</button>
It shows us that button number 1 on the gamepad is mapped to JoypadA on the emulator. Retroplayer button names correspond pretty good to snes gamepads.
Restart xbmc and start any game you like. Press the buttons in the same order as they are in the xml file above (e.g for the given keymap press the button you want to use for joypadA, the press the button you want to use for joypad B and so on).
Now take a look at the log file. You will find some lines like these:
Code:
DEBUG: Joystick 1 button 1 pressed
DEBUG: Joystick 1 button 1 unpressed
DEBUG: Joystick 1 button 2 pressed
DEBUG: Joystick 1 button 2 unpressed
...
and so on. This example tells us that joypadA is button 1 on the gamepad and joypadB is button 2 and so on.

Step 5
restart xbmc one more time and hope that it will work :-)


Multiplayer
Multiplayer should work out of the box if all used gamepads work in singleplayer mode. Maybe not all emulator cores support multiplayer.
Reply


Messages In This Thread
Guide to set up your gampad - by Dippo - 2014-01-28, 12:11
RE: Guide to set up your gampad - by garbear - 2014-01-28, 20:34
RE: Guide to set up your gampad - by brucem - 2014-04-09, 07:34
Re: Guide to set up your gampad - by brucem - 2014-04-09, 12:23
RE: Guide to set up your gampad - by brucem - 2014-04-09, 16:47
RE: Guide to set up your gampad - by brucem - 2014-04-11, 11:26
RE: Guide to set up your gampad - by brucem - 2014-04-11, 16:38
RE: Guide to set up your gampad - by Atarian - 2014-05-25, 19:09
RE: Guide to set up your gampad - by Ozzxbmc - 2014-05-28, 16:05
RE: Guide to set up your gampad - by garbear - 2017-03-05, 19:46
RE: Guide to set up your gampad - by garbear - 2017-03-06, 07:41
Logout Mark Read Team Forum Stats Members Help
Guide to set up your gampad0