Log In  


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!



Yes, I have the same problem, and it only seems to appear on Windows7 for me. What OS are you using?


I only tried on Windows 10.

When you say you have the same problem, are you referring to the "Unmapped Joystick" trace?

Are you trying to configure a nesmini controller as well? Did you find more success on other OS like Linux for OSX?


Just tried on OSX 10.14 and i have the same problem, "Unmapped Joystick".


Well, I have seen that same thing in the log even if I have a mapping. It doesn't work on Windows 7. But for some reason the automatic mapping works perfectly fine on the Pi version, which is odd as nothing else does on that version. Also I am just using some generic USB SNES style controllers.


Do you mean you did not even have to put a mapping in the sdl_controllers file on your raspberry? You just plugged the controller and it worked?

I have access to a raspberry as well, i will do some tests. Do you know by any chance how can i generate a sdl mapping on raspberry? The SDL gamepad tool executable does not seem to work.

Also, are you using retropie, raspbian or something else?

Thanks!


Both Retropie and Raspbian worked without a sdl mapping, and I couldn't get the gamepad tool to work on the Pi either.
No configuration was even necessary. I don't understand why it works on some OSes and not others. Might not be Pico-8 in that case.


I got i to work on raspberry using this custom mapping:

03000000791d00000103000010010000,SZMy-power LTD CO. Dual Box WII,a:b1,b:b2,back:b8,start:b9,-leftx:b15,-lefty:b12,+leftx:b13,+lefty:b14,platform:Linux

I used sdl2 jstest script to get the controller gid and name and to get button ids in order to create the mapping.



[Please log in to post a comment]