Retropie see's my 2 joysticks as 1 keyboard!?
-
I was about to tag @rbaker and then he came! :D
-
Thanks for that.
The strange thing is one of my cards see's the ipac2 as 2 controllers and it works flawlessly but when I swap that sd card for the one with retropie it see's it as a keyboard.
If I swap back again it works fine again so it has to be something within retropie right?
-
@Dta316 I believe that it is a retropie thing that sees the ipac2 as only one joypad during the auto configure sequence. It will auto configure nicely. You will then edit the retroarch.cfg to add a second player but it will not work. In the email I got form Andy at Ultimarc, he said that there is a bug in retropie that causes this behaviour. It seems that the recalbox does see the new Ipac2 as two joypads which is why it works great for you. Maybe @meleu can dig deep into the idea that there is a bug that needs swatting based on his track record of fixes! :) Meanwhile, the workaround above solves the problem if you configure a keyboard and ignore auto configure. I'm still using it today with no issues.
-
@Dta316 Just reading the title of your post again - Are you sure that retropie see's your two joysticks as 1 keyboard? Don't you mean 1 Joypad? If it see's your Ipac2 as a keyboard then great, that is the behaviour Ipac2 users crave - you have the old type so just go ahead and edit the retroarch.cfg to match the keys you want. If indeed you do actually mean 1 Joypad then use the workaround.
-
@rbaker It definately see's it as one keyboard. Not one joypad but the issues I seem to have are:
The configs I can find online cause some buttons not to function or they are duplicated
The config will work on say mame but then you load super nintendo or something and player 2 no longer works.The issue here is in mame games like street fighter or any other fighting based game has different layouts for play 1 and 2 making it hard to learn moves or play and some buttons have no function at all.
With console games like mario or sonic player 2 just does not work making them impossible to play.
I really like retro pie and it plays games at much better frame rates than my recalbox card but without working joysticks and buttons an arcade machine is pointless :(
-
@Dta316 ok, yes, when you use auto configure, it says one keyboard detected and it allows you to select keys for one player only. This is the issue I am talking about - Ultimarc have verified that it is appearing as one keyboard but in actual fact, retropie sees it as a joypad. Therefore, modification of the firmware is required. However, I use the Ipac2 without modified firmware using the workaround that I described above. You cannot use online configs, you have to write your own but it is simple. First, escape out of Emulationstation to the command line and start to move your controls taking note of the keyboard strokes that the Ipac2 is presenting to the Pi. Do this for each Player and every button. Once done, you simply edit the retroarch config file to match the keys that are being generated by your setup. Here is my config:
input_player1_a = "alt" input_player1_b = "ctrl" input_player1_y = "space" input_player1_x = "x" input_player1_start = "num1" input_player1_select = "num5" input_player1_l = null input_player1_r = null input_player1_left = "left" input_player1_right = "right" input_player1_up = "up" input_player1_down = "down" input_player2_a = "s" input_player2_b = "a" input_player2_y = "q" input_player2_x = "k" input_player2_start = "num2" input_player2_select = "num6" input_player2_l = null input_player2_r = null input_player2_left = "d" input_player2_right = "g" input_player2_up = "r" input_player2_down = "f"
If you look at player 2, these keys are presented when I press my buttons and move the joystick. I read them from the command line. What is important to know is that if you follow autoconfigure and setup player one then do this for player 2, player 2 will still not work. The only way to get it working is with the strict order I presented above, i.e you must make note of how all your joysticks are mapped to keys and configure the keyboard. You must then shut it down and remove the keyboard before rebooting and then modifying the config file. If the keyboard remains in place, it will not work.
Now you mention MAME and the version matters. MAME4ALL and ADVMAME are not based on retroarch so modifying the config files will do nothing. For these, just TAB into the menu and press Enter to select a key to modify and move you joystick or press a button. You can get two player up and running in minutes and the Ipac2 default setup is for MAME anyway unless your custom builder modified it. For lr-mame2003 which is my preferred emulator, modifying the retroarch correctly will allow you to use that config for all emulators. Remember that you can force each emulator to have it's own config e.g. NeoGeo by reading the wiki instructions.
Just looking at your pictures, have you built the electronics or is that part of the custom build? If you have built it, the Ipac2 will be default to MAME (unless you have it connected to your pc) and therefore you will know the buttons already if you have designed it?
-
@Dta316
I don't own an I-PAC 2, but a fast googling gave me some interesting infos:-
This issue at reddit seems to be like yours, and have promising answers.
-
The official site has a table with the functions and their respective key: https://www.ultimarc.com/ipac2.html
-
The official site provides a software (unfortunately it's Windows-only) that seems to let you make the I-PAC 2 act like a gamepad (and not like a keyboard): https://www.ultimarc.com/download.html
-
-
This is all really helpful thanks a lot.
I did find the reddit post before but that table of controls was what I was missing.
I'll play with this and let you know how I get on.
Thanks so much :)
-
@rbaker i believe this issue is in the linux kernel. Raphael from raphnet-tech.com had to make a fix to the kernel for his 4nes4snes adapter to be seen as 4 controllers and avoid having to add a qwirk in your boot.cfg. It is in the kernel now, but i dont think retropie is using a new enough kernel. Im not sure if he submitted this but he made a linux patch that fixes an issue that linux has never fixed. If you dont touch any buttons at all on your controller and run a jstest on most controllers it will show you pressing up and left. (I repeat, you cannot touch the controller at all to see this) the problem with this is if you have a board with more than 1 player on it (like raphs 4nes4snes board) you can have it just start scrolling through the es gamelist when you exit a game. Or in game, for example if you choose 1942 on the nes if you dont touch player 2's buttons and play a 2 player game,when you get to the second players turn he automatically flies to the top left corner. If you play the first super mario bros you cant start a game at all until you press a button on the second player controller. Not all multi controller boards are plagued with this but i tested several and found quite a few that this effects. But as i said a jstest in linux will show this on probably 90% of the controllers out there if you dont touch any of the controllers buttons. I test this on about 25 controllers and only 2 didnt have this issue. But raphs linux kernel patch he made for me and my buddy fixes it.
-
I do find that when I exit a game it automatically scrolls through the list of games.
-
@Dta316 here is a link to the patches and how to apply them to the linux kernel.
-
@Dta316 I have not come across that issue with the Ipac2.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.