Thank all of you guys creating such apps that heated up my passion about retro arcade games and bring them to our living room for my and my sons joy!
I’ve built 2 separate joypads years ago, both of them utilize keyboard encoders (an iPac2 and a Chinese one if I remember correctly) and microswitches for joystick and buttons. I would like to harness them for 3-4 player games for mame. Unfortunatelly I was able to set them up for 1-2 player games only.
Configuration: It is a cheap (but nice) palm sized Chinese hardware pre-configured with an out-of-the-box working software stack, a huge selection of emulators and an sd card pre-loaded with roms, came with 2 playstation like wired controllers:
- CPU: Amlogic S905 rev c (4 cores)
- Operating System: EmuELEC (Official - EmuELEC is FREE! NOT FOR SALE!): 3.9; Kernel: Linux 3.14.29
- EmulationStation - v5.27-dev, built Oct 23 2020 - 18:56:34
- RetroArch 1.9.0 (Git ddef65f626)
- my best shot emu: MAME 2010 (0.139)
It has 2 USB interface, plugging both joypads (keyboard encoders) the lsusb command provides this output Bus 001 Device 002: ID d209:0420 Ultimarc [large] Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 002: ID d209:0420 Ultimarc [small] Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Custom settings: To be honest, I don’t really figure it out what each stack component is responsible for exactly. During my discovery (or rather hulking) I might changed something not listed here, but hope not.
The system configured with auto selection of a few arcade emulator (mame2003, mame2010, advancemame, fbneo, …). I’ve separated some roms into a folder and added mame 2010 as a selectable emulator alias in EmulationStation (still maps to the original, supplied emulator), config file: /Configfiles/emulationstation/es_systems.cfg mame2010Arcade MAME 2010 Arcadearcade /storage/roms/mame2010.7z .7Z .zip .ZIP /emuelec/scripts/emuelecRunEmu.sh %ROM% -P%SYSTEM% --core=%CORE% --emulator=%EMULATOR% --controllers="%CONTROLLERSCONFIG%" arcade mame mame2010
Created a few collections for EmulationStation to ease the selection of my favorite games, config files: /Configfiles/emulationstation/collections/custom-.cfg
Using EmulationStation menu I set up the joypad (joy, a/b/x/y, select, start) via: menu / controllers settings / configure a controller : keep pressing a button, then able to configure the ‘keyboard’. The menu also has an option to configure each player input (menu / controllers settings / input p1), but the available options are: default | #0 usg gamepad (if one controller is plugged in)
I edited the /Configfiles/retroarch/retroarch.cfg to remove all settings conflicting with my keyboard encoder settings or found unnecessary. I’ve also created an override file which contains my settings at /Configfiles/retroarch/config/MAME 2010/MAME 2010.cfg EmulationStation has an ‘Open RetroArch’ option, after loading up the app, the input sections shows the same configuration I’ve made manually, athough under ‘Port X Controls’ instead of ‘Player X Controls’.
So far I am able to control the GUI (of both EmulationStation and RetroArch) with the supplied controllers and the joypad I’ve made. 2 player games works perfectly as well. However, if I start a 4 player game the P1 and P2 player joypads still working, but the 3 player start button starts both P1 and P3 game and controls both of their movements parallel, ‘hit’ and ‘jump’ buttons are not not conflicting, and P1 joypad controls P1 character only. Pressing P1.b (configured as keystroke: “b”) also yields P3.down
I have a previous setup with a PC running Mala frontend with Mame, it worked well in 4 player mode. I fetched its ‘default.cfg’ and may uploaded to this device, but the /ROMS/mame2010/mame2010/cfg/default.cfg now contains a dry, almost empty generated data.
The /Joypads folder is full of .cfg files, none of them contains ‘0420’ nor ‘1056’ (which is a dec represantation of hex 0420) as input_vendor_id or input_device_id. I found /Joypads/udev/Ultimarc_J-PAC.cfg with input_vendor_id=53769 which is hex:d209, deleting this file has no effect to the controls.
I found countles number of ‘remapping’ configuration files and empty folders, and a few launch/config scripts which also had input mapping rutines. As mentioned in another somewhat similar topic here, I also tried: input_autodetect_enable = “false”. Actually tried true/false in all possible combination in settings: input_autodetect_enable, auto_overrides_enable, auto_remaps_enable.
Here is the log of 4 player “Bucky O’Hare (ver UA)” (buckyua) game along with retroarch.cfg + MAME 2010.cfg
I’m really pointless which configuration files and scripts had effect to sum up the mame input configuration. Please advise. A second tought might be to circumvenient the emuelecRunEmu.sh (see the config above) to start retroarch or mame directly.