XBOX Controller - Mame Start?
  • What button on the xbox controller is mapped to start the game in Mame? I tried using the keyboard, but it doesn't respond when the xbox controller is attached.
  • I was having the exact same issue. I can insert a coin with the left trigger, so assumed that the right trigger would be start, but nothing... :(
  • change your xboxdrv_mapping.cfg to:


    [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_LEFT:KEY_RIGHT
    y1=KEY_UP:KEY_DOWN

    [ui-buttonmap]
    tl=KEY_DOT
    tr=KEY_TAB
    guide=KEY_P

    [ui-buttonmap]
    a=KEY_LEFTCTRL
    b=KEY_LEFTALT
    x=KEY_LEFTSHIFT
    y=KEY_SPACE

    [ui-buttonmap]
    lb=KEY_5
    rb=KEY_1

    [ui-buttonmap]
    lt=KEY_LEFT
    rt=KEY_RIGHT

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

    [ui-buttonmap]
    back=KEY_ESC
    start=KEY_ENTER

    # EOF #
  • Where is xboxdrv_mapping.cfg located please?
  • Thanks, I'll give it a try.
  • It is in the directory pimame_files.
  • Thanks again, it works like a charm!
  • OK, mame now seems to work.. Great! however the button mappings for SNES appear to have buttons missing... :S
  • Thx Chrisi and Ducky for the information :)
    I succefully manage to make my controller work with PiFBA! (xmen vs street <3 )
  • I have just modified the file, work fine with mamE4all but now the xbox controller doesn't work with SNES emulatore! What can i do?
  • Yep it could be great maybe a little bit complicated...
    If i'm not wrong all default config for each emulator is keyboard key? It may be easier to uniform these instead?
    For exemple : 4 buttons, 2L, 2R, start, select and dpad (or analog stick) so 10 keyboard key
    If all default config can be accessible (like the one for PiFBA) you can have one xboxdrv.cfg (with your main conf) and change all the default one

    I hope i was clear... Because it was in my head :-D
  • So which command i must do to control snes9x? I have to do this once or ever before play? I have to give it ready for use to my mother and i want to prepara only working mame games and SNES.
    Excuse me for my bad english....
  • I check piFBA and piSNES and they are similar, so you could try to copy the piFBA keyboard mapping (fba2x.cfg) into piSNES (snes9x.cfg) and normally they will use the same key so your config for xboxdrv should work.

    (piFBA :
    [Keyboard]
    # Get codes from /usr/include/SDL/SDL_keysym.h
    A_1=306
    B_1=32
    X_1=308
    Y_1=304
    L_1=122
    R_1=120
    START_1=13
    SELECT_1=9
    LEFT_1=276
    RIGHT_1=275
    UP_1=273
    DOWN_1=274
    QUIT=27

    piSNES :
    [Keyboard]
    # Get codes from /usr/include/SDL/SDL_keysym.h
    A_1=100 =>306
    B_1=99 => 32
    X_1=115 => 308
    Y_1=120 => 304
    L_1=97 => 122
    R_1=102 => 120
    START_1=13 => same
    SELECT_1=9 => same
    LEFT_1=276 => same
    RIGHT_1=275 => same
    UP_1=273 => same
    DOWN_1=274 => same
    QUIT=27 => same
    ACCEL=8 => i don't know :D )

    I didn't try myself already (but i will thursday evening :) )but i was thinking that may be working... I hope

    If you test before me, let me know if it works!
  • Then i must copy "keyboard etc etc" info the file snes9x.cfg, OK after i try. Thx
  • doesn't work, the active button are:
    left + right
    RT & LT that works like left and right.
    all other button doesn't works...
  • Arf I'll try some other things tomorrow, and keep you inform if i found something.
  • Ok... Not perfect but it works for me... here my config

    home/pi/pimame_files/xboxdrv_mapping.cfg :

    [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_LEFT:KEY_RIGHT
    y1=KEY_UP:KEY_DOWN

    [ui-buttonmap]
    tl=KEY_DOT
    tr=KEY_TAB
    guide=KEY_P

    [ui-buttonmap]
    a=KEY_D
    b=KEY_S
    x=KEY_X
    y=KEY_Q

    [ui-buttonmap]
    lb=KEY_C
    rb=KEY_F

    [ui-buttonmap]
    lt=KEY_TAB
    rt=KEY_DOT

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

    [ui-buttonmap]
    back=KEY_ESC
    start=KEY_ENTER

    # EOF #

    home/pi/emulators/fba/fba2x.cfg :

    [Keyboard]
    # Get codes from /usr/include/SDL/SDL_keysym.h
    A_1=100
    B_1=99
    X_1=115
    Y_1=120
    L_1=97
    R_1=102
    START_1=13
    SELECT_1=9
    LEFT_1=276
    RIGHT_1=275
    UP_1=273
    DOWN_1=274
    QUIT=27

    [Joystick]
    # Get codes from "jstest /dev/input/js0"
    # from package "joystick"
    A_1=7
    B_1=6
    X_1=5
    Y_1=4
    L_1=3
    R_1=2
    START_1=1
    SELECT_1=17
    #Joystick axis
    JA_LR=1
    JA_UD=0


    And for Snes home/pi/emulators/pisnes/snes9x.cfg :

    [Keyboard]
    # Get codes from /usr/include/SDL/SDL_keysym.h
    A_1=100
    B_1=99
    X_1=115
    Y_1=120
    L_1=97
    R_1=102
    START_1=13
    SELECT_1=9
    LEFT_1=276
    RIGHT_1=275
    UP_1=273
    DOWN_1=274
    QUIT=27
    ACCEL=8

    [Joystick]
    # Get codes from "jstest /dev/input/js0"
    # from package "joystick"
    A_1=7
    B_1=6
    X_1=5
    Y_1=4
    L_1=3
    R_1=2
    START_1=1
    SELECT_1=17
    #Joystick axis
    JA_LR=1
    JA_UD=0


    But with this kind of config ypu have :
    Light Punch =A // Medium Punch=B // Hard Punch=LB
    Light Kick=X // Medium Kick=Y // Hard Kick=RB
    For PiFBA
    For Snes all buttons work but it's a mess :D (jump=L attack/action=X or A etc...)
    Also (and i don't know why...) only keyboard works in snes menu.

    If someone know how to "increase"... "optimise" (sorry i don't know wich one is better suited for what i mean...) this configuration, i'll take it! But for now, even if in Snes all button are mess up, it works so... that's ok :p
  • none of the above works for me... anyone that has snes buttons (xbox360 wireless) working properly?
  • Hi,
    this works for mame4all, advancemame and snes...
    cant get fba to work...

    Xbodrv:

    [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_LEFT:KEY_RIGHT
    y1=KEY_UP:KEY_DOWN

    [ui-buttonmap]
    #tl=KEY_DOT
    tr=KEY_TAB
    guide=KEY_P

    [ui-buttonmap]
    a=KEY_LEFTCTRL
    b=KEY_LEFTALT
    x=KEY_LEFTSHIFT
    y=KEY_SPACE

    [ui-buttonmap]
    lb=KEY_5
    rb=KEY_1

    [ui-buttonmap]
    lt=KEY_LEFT
    rt=KEY_RIGHT

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

    [ui-buttonmap]
    back=KEY_ESC
    start=KEY_ENTER

    # EOF #

    Mame4all cfg:


    [frontend]
    #Keyboard controls for frontend only
    # Get codes from /usr/include/SDL/SDL_keysym.h
    K_START=13
    K_SELECT=53
    K_LEFT=276
    K_RIGHT=275
    K_UP=273
    K_DOWN=274
    K_A=306
    K_QUIT=27
    #Joystick controls for frontend only
    J_SELECT=8
    J_A=9
    AXIS_LR=0
    AXIS_UD=1

    Snes cfg:

    [Keyboard]
    # Get codes from /usr/include/SDL/SDL_keysym.h
    A_1=308
    B_1=306
    X_1=32
    Y_1=304
    L_1=53
    R_1=49
    START_1=13
    SELECT_1=112
    LEFT_1=276
    RIGHT_1=275
    UP_1=273
    DOWN_1=274
    QUIT=27
    ACCEL=8


Howdy, Stranger!

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