Hello,
i have a nes mini controller that i'd like to use with pico8.
I bought a mayflash "wii classic controller adapter" to plug the controller in usb.
The buttons are not correctly mapped by PICO8.
DPAD UP is mapped on pico8 button 3
DPAD DOWN is mapped on pico8 button 1
DPAD RIGHT is mapped on 0
DPAD LEFT is NOT mapped
BUTTON A and B are both mapped to button 5
I use the code over there to test the controller mapping: http://pico-8.wikia.com/wiki/Controllers
I decided to create my own controller mapping string using SDL2 gamepad tool. I read somewhere that i had to configure the left joystick to get it to work in pico8 but i wasn't successul. Putting this mapping in the sdl_controllers.txt file
03000000791d00000103000000000000,Dual Box WII,platform:Windows,x:b1,y:b2,-leftx:b15,+leftx:b13,-lefty:b12,+lefty:b14,
gave me the same result as before.
One thing i find odd is that in the log file i can read:
Reading controller mappings: C:/Users/USER/AppData/Roaming/pico-8/sdl_controllers.txt
added controller mapping: 03000000791d00000103000000000000,Dual Box WII,platform:Windows,x:b1,y:b2,-leftx:b15,+leftx:b13,-lefty:b12,+lefty:b14,
searching for joysticks
found 2 joysticks
Unmapped Joystick 0: Dual Box WII
Number of Axes: 4
Number of Buttons: 16
Number of Balls: 0
Unmapped Joystick 1: Dual Box WII
Number of Axes: 4
Number of Buttons: 16
Number of Balls: 0
ok
which make it seems like pico8 is not taking the mapping into account, "Unmapped Joystick".
Thanks for your help!