Cannot reliably define joystick buttons
Posted: Sun Oct 03, 2021 4:46 pm
I have a gutted Mayflash F101 as P1 and an Arduino/Daemonbite as P2 in my arcade cabinet.
The whole thing is powered by a MeanWell 5V 10A supply, so I don't expect there to be any power issues. I have also measured 5V in-circuit (MiSTer on) to >= 5.0 volts.
For the life of me, I cannot get MiSTer to reliably apply my button definitions.
For P1, I can define the joystick buttons and it'll work fine - until I power cycle the MiSTer. At power-up, more often than not, I find that P1 is using some strange "defaults" that I never defined. The directional joystick will work, but the A and B buttons are swapped - and my MENU definition (Start + Left) will not work. If I unplug and plug in the USB, I can usually get it to use my button definitions again.
For P2, I can define the joystick buttons, but no matter what I define for "MENU OK" and "MENU Back", it will not perform these actions. Again, for P2, the directional joystick works.
lsusb output:
dmesg output:
Edit: Tried running the F101 board in Switch mode. Got through the MiSTer joystick definition UI just fine. After finishing the definitions, the inputs are jumbled beyond recognition. Pressing Select will move down in the menus, no other direction can be found. Pressing Y will act like pressing A. It's a mess. Only XInput and DInput modes seem to work (but with the problems described in the rest of this post).
The whole thing is powered by a MeanWell 5V 10A supply, so I don't expect there to be any power issues. I have also measured 5V in-circuit (MiSTer on) to >= 5.0 volts.
For the life of me, I cannot get MiSTer to reliably apply my button definitions.
For P1, I can define the joystick buttons and it'll work fine - until I power cycle the MiSTer. At power-up, more often than not, I find that P1 is using some strange "defaults" that I never defined. The directional joystick will work, but the A and B buttons are swapped - and my MENU definition (Start + Left) will not work. If I unplug and plug in the USB, I can usually get it to use my button definitions again.
For P2, I can define the joystick buttons, but no matter what I define for "MENU OK" and "MENU Back", it will not perform these actions. Again, for P2, the directional joystick works.
lsusb output:
Code: Select all
Bus 001 Device 004: ID 2f24:0038 . MAYFLASH Arcade Fightstick F101
Bus 001 Device 003: ID 2341:8037 Arduino SA Arduino Micro
Code: Select all
[ 0.773052] usb 1-1: new high-speed USB device number 2 using dwc2
[ 0.951395] usb 1-1: New USB device found, idVendor=1a40, idProduct=0101, bcdDevice= 1.00
[ 0.951419] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 0.951432] usb 1-1: Product: USB2.0 HUB
[ 0.952049] hub 1-1:1.0: USB hub found
[ 0.952154] hub 1-1:1.0: 4 ports detected
[ 1.090430] process '/MiSTer' started with executable stack
[ 1.327056] usb 1-1.1: new full-speed USB device number 3 using dwc2
[ 1.526070] usb 1-1.1: New USB device found, idVendor=2341, idProduct=8037, bcdDevice= 1.00
[ 1.526093] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1.526106] usb 1-1.1: Product: Arduino Micro
[ 1.526116] usb 1-1.1: Manufacturer: Arduino LLC
[ 1.526132] usb 1-1.1: SerialNumber: Daemonbite Arcade
[ 1.527793] cdc_acm 1-1.1:1.0: ttyACM0: USB ACM device
[ 1.535100] HID usage: 0x00010004, original interval: 1
[ 1.535125] JS: endpoint->bInterval=1, interval=1
[ 1.535133] HID usage: 0x00010004, applied interval: 1
[ 1.535333] input: Arduino LLC Arduino Micro as /devices/platform/soc/ffb40000.usb/usb1/1-1/1-1.1/1-1.1:1.2/0003:2341:8037.0001/input/input0
[ 1.535782] hid-generic 0003:2341:8037.0001: input,hidraw0: USB HID v1.01 Joystick [Arduino LLC Arduino Micro] on usb-ffb40000.usb-1.1/input2
[ 1.703035] usb 1-1.3: new full-speed USB device number 4 using dwc2
[ 1.711848] udevd[961]: starting version 3.2.9
[ 1.756602] random: udevd: uninitialized urandom read (16 bytes read)
[ 1.758067] random: udevd: uninitialized urandom read (16 bytes read)
[ 1.758180] random: udevd: uninitialized urandom read (16 bytes read)
[ 1.797744] udevd[962]: starting eudev-3.2.9
[ 1.887667] usb 1-1.3: New USB device found, idVendor=2f24, idProduct=0038, bcdDevice= 1.01
[ 1.887697] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1.887709] usb 1-1.3: Product: MAYFLASH Arcade Fightstick F101
[ 1.887718] usb 1-1.3: Manufacturer: .
[ 1.887727] usb 1-1.3: SerialNumber: 5332571020303235
[ 1.888690] XPAD: original out.bInterval=8 -> new interval=8
[ 1.888703] XPAD: original in.bInterval=1 -> new interval=1
[ 1.889111] input: Generic X-Box pad as /devices/platform/soc/ffb40000.usb/usb1/1-1/1-1.3/1-1.3:1.0/input/input1
[ 2.063088] usb 1-1.4: new high-speed USB device number 5 using dwc2
[ 2.079611] MiSTer_fb 22000000.MiSTer_fb: width = 640, height = 240, format=8888
[ 2.244208] usb 1-1.4: New USB device found, idVendor=0846, idProduct=9052, bcdDevice= 2.00
[ 2.244235] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2.244303] usb 1-1.4: Product: 802.11ac WLAN Adapter
[ 2.244317] usb 1-1.4: Manufacturer: Realtek
[ 2.244327] usb 1-1.4: SerialNumber: 00e04c000001