Hello,
i got a gamepad from ebay but the two middle buttons (select & start) want work in PICO-8
Somebody have a idea how to get it work?
@springogeek: nope, keyconfig is only for keyboard
@svnt: you'll have to use gamepadtool
"create a new mapping"
for now pico8 only polls the two bottom-right action buttons, the left stick, and the little menu button to the right. assign those, skip the others. then "copy mapping string", open sdl_controllers.txt from your pico8 home dir (on windows it should be C:\Users\<your_user_name>\AppData\Roaming\pico-8 ). paste your string there, save, restart pico8.
I use JoyToKey as a mapper for my NES controller. That way I just map each button to whatever keyboard key I want. Works great and easy to use. I know I could dig into the config but I'd rather have a nice interface that is clear rather than messing around with files in folders...they scare me :)
I keep meaning to write an AHK script to convert analog stick input into 'feathered' keyboard input. Basically use pulse width modulation to simulate analog inputs. It wouldn't work for every game since everyone handles input->motion differently, but it might be a nice start.
(Note this would be for everything I play with digital controls, not just PICO-8 games.)
@ ultrabrite: tried gamepadtool for macOS. Nice Tool but it want recognise my digital pad rigght and down directions.
it think to trash the pad or take it apart and wire it to gpio...
thanks for the tool. i'll try it out with other pads now.
PS: in Pico-8 all digital axis and fire buttons are working. just start/select want do there job... the app recocnises them well... strange
Definitely sounds like the controller configuration is not correct in the SDL txt file
@svnt: it looks like you tried to map your dpad to the dpad in the tool, which won't work. your gamepad's dpad is an analog stick in disguise, you have to map it to the left analog stick in the tool. that will work, since pico8 only reads that stick anyway.
hope that makes some sense ;)
@ultrabrite Thank you! I never understood why my D-Pad wouldn't work.
If you are running Linux, the SDL Gamepad Tool doesn't work. But if you are running Steam, you can enter Big Picture Mode, map your buttons, then copy the SDL_GamepadBind entry in the config/config.vdf file in your Steam installation directory.
Copy that mapping to the sdl_controllers.txt file.
[Please log in to post a comment]