[SOLVED]USB Joystick not working on PiMame but working on AdvMame emulator (Mayflash joystick)
  • Hi all,

    Thanks for the real good PiPlay distribution.

    I'm not able to use my joystick on the PiPlay menu. It is detected properly by the OS, and it is working flawlessly on the AdvMame emulator. But no luck on the PiPlay menu.

    I'm running the latest PiPlay release: PiPlay 0.8.0 Beta 9. This is my joystick:

    Mayflash USB Universal Arcade Fighting Stick (http://www.amazon.com/Mayflash-Universal-Arcade-Fighting-Playstation-3/dp/B0015PHMFU)

    This is the output of the jstest at rest:

    jstest /dev/input/js0

    Joystick (MY-POWER CO.,LTD. Mayflash Arcade Stick) has 4 axes (X, Y, Hat0X, Hat0Y)
    and 12 buttons (Trigger, ThumbBtn, ThumbBtn2, TopBtn, TopBtn2, PinkieBtn, BaseBtn, BaseBtn2, BaseBtn3, BaseBtn4, BaseBtn5, BaseBtn6).
    Testing ... (interrupt to exit)
    Axes: 0:-32767 1:-32767 2: 0 3: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off

    If I move the stick I see activity in at Axes 2 & 3 (from -32767 to 32767)

    I have modified /home/pi/pimame/pimame-menu/controller.yaml file to use axis 2 & 3 as follows:

    JOYSTICK:
    HORIZONTAL_AXIS: 2
    VERTICAL_AXIS: 3

    DIRECTIONAL:
    LEFT: -1
    RIGHT: 1
    UP: -1
    DOWN: 1

    BUTTONS:
    SELECT: 0
    BACK: 1
    MENU: 2
    Quit: [1,2]

    But no luck. I can't use it in the PiPlay UI.

    I will really appreciate any tip.

    Thanks and regards.
  • Hi,

    I have found 'jscal' that allows to remap axes and buttons.

    This is the output:

    jscal /dev/input/js0 -q
    jscal -u 4,0,1,16,17,12,288,289,290,291,292,293,294,295,296,297,298,299 /dev/input/js0

    I moved axis 16 and 17 to 0 and 1:

    jscal -u 4,16,17,0,1,12,288,289,290,291,292,293,294,295,296,297,298,299 /dev/input/js0

    Now jstest reports axes 0 & 1 for horizontal and vertical movements.

    But still can not move through the PiPlay user interface.

    Thanks and regards.
  • Hi,

    Well it seems that Mayflash Universal Arcade Stick has two modes: POV (default one, not working mode for PiPlay UI) and Analog Axis mode (which is working fine)

    Manufacturer web page: http://www.mayflash.com/Products/UNIVERSAL/PC042.html

    Extract: How to switch between modes:

    ● POV is the default mode of the D-Pad. Press and hold the AUTO and CLEAR button, the D-Pad can be switched to X/Y Analog Axis mode. Press and hold the AUTO and CLEAR button again, the D-Pad will be switched back to POV mode.

    For now seems to be working fine in Analog Axis mode. Tomorrow will do more testing and report back.

    Thanks.
  • Thanks for the update Calde!

Howdy, Stranger!

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