X-Box Controller
  • Perhaps this has been discussed in the past but I can't find any quick answers. I am setting up my old pi for a friend of mine and he wants to use his USB X-Box controller, I have never tried this setup before. I can set up NES using the X and Y buttons as the A button on the controller seems to act as pressing both A&B even after configuring it. After configuring SNES and trying to play a game, it seems the A button on the controller escapes from the game. In both cases the X-box A button seems to be the issue. Has anyone else run into this or have a possible solution? Most games will be pretty unplayable with this problem.
  • you just need to edit /home/pi/pimame/config/xboxdrv_mapping.cfg.

    I set mine up so that if you press left bumper, left trigger, right bumper, right trigger (in that order), it will type 'exit' which is handy if you want to get from the command line back into piplay easily

    This is what mine looks like:
    [xboxdrv]
    silent=true
    deadzone=6000
    dpad-as-button=true
    trigger-as-button=true

    [ui-axismap]
    x2=REL_X:10
    y2=REL_Y:-10
    x1=KEY_A:KEY_D
    y1=KEY_W:KEY_S

    [ui-buttonmap]
    a=KEY_SPACE
    b=KEY_J
    x=KEY_K
    y=KEY_L

    [ui-buttonmap]
    lb=KEY_E
    rb=KEY_I

    [ui-buttonmap]
    lt=KEY_X
    rt=KEY_T

    [ui-buttonmap]
    dl=KEY_LEFT
    dr=KEY_RIGHT
    du=KEY_UP
    dd=KEY_DOWN

    [ui-buttonmap]
    back=KEY_ESC
    start=KEY_ENTER
    guide=KEY_TAB

    # EOF #

  • Thanks @mholgatem however the issue persists. I copied your map exactly but have the same issue. The A button on the xbox controller exits from the SNES emulator whenever it is pressed regardless of what it is assigned to in the controller setup. In the NES emulator it acts as hitting the A+B buttons. I have no Idea what the issue is. I tried a new cordless Logitech pad with the exact same problem. If you have any clue how to fix this that would be of great help.
  • oh, it's my bad. I didn't read it thoroughly enough. Yes, there is a bug in the controller config for snes. It's already fixed, but if you don't want to wait for the next update, you can do this.
    cd /home/pi/pimame/controller-setup/formatters
    wget -O pisnes.py https://raw.githubusercontent.com/mholgatem/controller-setup/6aff75963babe7bc7ef4cc11e61a42d40cffbffd/formatters/pisnes.py


    Then re-run your controller config for the snes
  • Thanks again @mholgatem, I will try that when I get home from work. On a similar subject, is there anything special I need to do to get 2 Xbox controllers working? I'm just hoping for some early advice before I run into possible problems.
  • you just need to run multiple instances of the xboxdrv utility. Check out this post
  • @mholgatem the snes update helped and the Xbox controller is working better. I still can't figure out the A+B Nintendo problem and can't get the two controllers working yet but I think I may have just screwed with too many settings. I'm flashing the SD from my last backup and I'll try again. You mentioned waiting for the next update. Can you give any hint as to when that may be and what we can expect (Atari back, N64, etc)?
  • I actually have no idea when that next update will be out. Development has slowed in the last couple of months as we have been taking on several different projects. But I think that we are about ready to start it chugging along again.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!