Homepage › Forums › RetroPie Project › Controller Configuration in RetroPie › Amiga / UAE4ALL2 and Joysticks
- This topic has 12 replies, 2 voices, and was last updated 9 years, 4 months ago by flausch.
-
AuthorPosts
-
05/13/2015 at 08:51 #97387flauschParticipant
I am trying to use UAE4ALL2 with two competition pro joysticks using Db9_gpio_rpi.
This combination works great in other emulators like C64/vice or atari 2600. But UAE seems to be a bit special, being a non retroarch emulator.Can anyone give me a hint?
05/18/2015 at 09:32 #97868rinuschParticipantHi Flausch,
Interesting topic.
I’m trying to achieve exactly the same: a 2 player Amiga/C64 gaming experience on the RPI (using Retropie).I’ve once soldered a small device which accepts two 9-pin Amiga/C64 joysticks and connects to an old game port (25 pins?). Now that this port has become obsolete, I’ve bought a gameport to USB adapter from Ebay which works fine on Windows (WinUAE).
However, I haven’t managed to get it working on Emulationstation. I’m instead using a PS3 controller for that for the time being.
I’ve managed to get Vice working with the C64 jostick (by having it ‘learn’ the controls).
What I read about UAE4ALL2 however is that it has the controls pretty much hard coded, i.e. not configurable through a config file or whatever.
If that’s really the case, I’d need to wait for an improved version of UAE4ALL2 and Retropie of which I don’t know how long it would take.So the solution you are looking into would be a good alternative.
I’ll look into this as well. Can you keep me posted on any findings please? Trying to get this to work asap :)Regards,
Rinusch05/19/2015 at 10:44 #97906flauschParticipantHello Rinusch!
I have made this solution:
The GPIO driver für DB9 had to be installed manually, because the one included in retropie did not work (maybe because of a newer kernel after some updates)
I also made an external usb to two DB9 adapter, bought here (you have to solder it yourself)
http://www.sinchai.de/index.php?main_page=product_info&cPath=1&products_id=137Both solutions work flawless inside Retropie (testet with C64, Atari 2600, Atari ST)… except in UAE4ALL2.
Concerning UAE4ALL2 I made some research, but with no pleasing result:
I installed different forks of UAE4ALL2 but all of them have the same problem… hardcoded inputs.I did a request at one of the most promising forks called UAE4ARM:
https://www.raspberrypi.org/forums/viewtopic.php?f=78&t=110488So it looks like we have to hope and wait.
05/19/2015 at 12:20 #97913rinuschParticipantHi Flausch,
I read the topic you mentioned including your post. Great job.
For me it’s not clear either where to turn to so you’re right to ask where this should be addressed (on which level).
But say that Chips would address this someday soon, how would we need to get it incorporated into RetroPie? Any idea?
I haven’t been able to find a roadmap or release planning for RetroPie, you?In the meanwhile I was fiddling a littlebit with joy2key. Have you ever looked at that?
It translates joystick events to keyboard events. That way, I was hoping I could simulate the right keys that UAE4ALL2 accepts when keyboard is configured as input method (but still…it wouldn’t give us simultaneous 2 players gameplay I’m affraid).Regards,
Rinusch05/19/2015 at 23:19 #97950flauschParticipantHi Rinusch,
It is possible to exchange emulators inside retropie manually. I did this and it works, following this post (and the next one).
But I think you mean to get it offically into retropie? As far as I followed some threads, chips version might become the amiga emulator of choice, when it starts to get major advantages over the currently used version.
Back to joysticks: I hope Chips will fulfill my request someday. But if there is no improvement during the next weeks, I might look at the problem myself, since I am software developer for 20 years. This is not exactly my playground, but I looked at the source code and already located the places that need to be changed: The init_joystick function and some gui code.
This should not be to hard. But for me it takes some more effort and time to setup up a working development environment. I’d prefer if someone does it, who has already experience with raspberry developement.I never looked at joy2key. This might be another workaround with its limitations.
05/20/2015 at 08:55 #97974flauschParticipantI did some further testing yesterday:
I unplugged my wireless keyboard-mouse combination and used s single wired keyboard. I also unplugged my xbox-gamepad and left only two GPIO-Joysticks.
Because it is not possible to use these joysticks inside Retropie (not enough buttons), I quit to shell and started UAE4ALL2 manually.
And guess what? I could start Great Courts II and play a two player game with both joysticks.
This was my expected behaviour after looking at the source code.
No matter what, port 0 is mapped hard to /dev/input/js0 and port 1 is mapped to /dev/input/js1. Before, js0 was my xbox pad and there was some strange behaviour when a mouse was connteced, which got mapped to port 0 too.In this test, GPIO-Joystick1 was js0, GPIO-Joystick2 was js1 and everything worked fine.
My test was done with chips UAE4ALL2 version 5. I had some problems with UAE4ARM (no button click), which needs some further testing.
05/20/2015 at 11:57 #97984rinuschParticipantHi!
Awesome, nice finding! I have a feeling we’re getting there :)
Problem is that my self made adapter gets recongnized as a 6 axis, 8 button adaptor. Both joysticks connect to the same adapter and the adapter maps to js0. Using my device, there is no other option than to be able to manually configure/map controls or to have controls detected (like Vice does).
However..as I have a retro gaming evening planned for tomorrow with an old friend (we do that every now and then :) ), I’m thinking to quickly use your solution and use that for the time being. The main question I have: how did you go about manually installing the DB9 GPIO driver? Could you please guide me somewhat as I’m lacking time?
The other thing I need to find out is how to send audio over HDMI. Saw a thread about it and tried the solution but it didn’t work. Will try some more tonight.
Cheers!
PS: have you seen this one? https://www.petrockblock.com/forums/topic/uae4arm-the-best-amiga-emulation-on-the-rpi/
05/20/2015 at 14:34 #97992flauschParticipantManual installation of db9-gpio-rpi (using current kernel version):
Login in as user pi.
wget http://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/linux-headers-3.18.10-v7%2b_3.18.10-v7%2b-2_armhf.deb wget http://www.niksula.hut.fi/~mhiienka/Rpi/gamecon-gpio-rpi-dkms_1.0_all.deb wget http://www.niksula.hut.fi/~mhiienka/Rpi/db9-gpio-rpi-dkms_1.0_all.deb sudo dpkg -i linux-headers-3.18.10-v7+_3.18.10-v7+-2_armhf.deb sudo dpkg -i gamecon-gpio-rpi-dkms_0.9_all.deb sudo dpkg -i db9-gpio-rpi-dkms_1.0_all.deb
Depending on the kernel you are using, you might have to look for the matching header files on this website: http://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/
You can load the driver then with:
sudo modprobe db9-gpio-rpi map=1,1
on console.If you want to load it every time retropie starts, you must add “db9-gpio-rpi map=1,1” in file /etc/modules
Yes, I have seen this one and already tested UAE4ARM. If you look at its thread in raspberry forums, you will see that I am already active there. Chips responded to my post. So we might get a proper solution someday!
I don’t have any knowledge concerning hdmi audio, because I never came to the point of real playing, because of the joystick issue. I hope someday I can take my pi2 out of my lab and put it in the living room…
05/20/2015 at 17:22 #98018rinuschParticipantThanks for this, great!
I looked at your ‘small project’ thread and noticed the numbering in your table ‘joystick connection matrix’ doesn’t match the numbering here: https://github.com/retropie/RetroPie-Setup/wiki/Db9_gpio_rpi
Is it because I haven’t slept much last night or is this wrong in any of these schemes? :)
Regards,
Rinusch.05/21/2015 at 08:58 #98074flauschParticipantI wondered myself when I looked at the wiki. I think the numbers there are not the physical pins but maybe some virtual ones inside raspbian? If you look at the picture vs. the chart you will see that these don’t match. For example player1 up: chart says pin 4, picture shows pin 7. The picture is correct in terms of how to solder.
My documentation shows the real physical pinout. I soldered two of these and they work perfect.
05/21/2015 at 14:04 #98094rinuschParticipantYou are right. I looked at them again last night and came to the same conclusion: they make no sense.
Instead, I’ve used yours (thanks for sharing this!) and went testing. Unfortunately it had gotten rather late by then and the driver wouldn’t install properly (different kernel version). When I installed the right headers etc, my SD card was full (only 4Gb to experiment with).
To cut a long story short: it will take some more time for me to test the adapter.Should it work, it can be used with many emulators I guess as UAE4ALL2 was the only problematic one so far. Now that you found out it works when it’s started manually, it’s a very good (temporary) workaround.
Hope Mame works with your adapter as well by the way, that is another emulator that I’d be using often. Problem is that ‘our’ joysticks only have one button and Mame games often use more..
I was thinking it would also be nice to be able to ‘break out’ the GPIO pins using the IDE cable ending in a contra IDE adapter and then have multiple adapters like the ones you have soldered for different controller types.Regards,
Rinusch05/21/2015 at 16:00 #98103flauschParticipantThe db9 gpio driver supports up to three buttons, if you look at the pinout in the wiki. You just have to solder them the right way to the db9 connector. I don’t know if there is a standard for db9 with more than one button, since classic computers like C64 and Amiga had only one.
Maybe you have to modify your joystick then and can not use it at real classic computers anymore, because they might cause damages there.I think I read somewhere about other GPIO drivers, which support GPIO with many buttons for mame machines.
05/22/2015 at 08:49 #98146flauschParticipantI had some breakthrough yesterday:
I managed to get both GPIO joysticks to be js0 and js1, while my xbox controller became js2! This was the requirement to use these joysticks with the hardcoded input mapping of UAE4ALL2.
What I did:
1. I installed the xbox-driver as daemon, using step 3 of >this tutorial<2. Then I blacklisted the xpad driver (the default Linux USB driver for X-Box gamepads). Something I read in the manpage of xboxdrv:
Add the line “blacklist xpad” into file /etc/modprobe.d/raspi-blacklist.conf3. After that I only had put the gpio driver on first place in /etc/modules
xboxdrv works much better than the kernel xpad driver, because it has much more options. It has the possibilty to define a deadzone, which made some problems with xpad inside UAE4ALL2, because js0 and mouse are used both simultanously on the first amiga port. Now I can click the right mouse button for some trainer options at gamestart, while I can use the first GPIO joystick inside of the game itself.
I had problems with UAE4ARM, but there was no time to dig deeper into that. There seems to be some additional bugs in the joystick code.
But in UAE4ALL2 (chips version 5) everything worked perfectly. The same in Vice.
There is still one expected sideffect: All retroarch emulators and controls need to be reconfigured. So there is still some work to do.Nevertheless I hope chips will come up with a proper joystick gui and mapping someday. That would make things much easier and beginner friendly.
-
AuthorPosts
- The forum ‘Controller Configuration in RetroPie’ is closed to new topics and replies.