Homepage › Forums › RetroPie Project › Everything else related to the RetroPie Project › Mame4all-pi with PS3 Controller
- This topic has 29 replies, 8 voices, and was last updated 9 years, 10 months ago by mikedpitt.
-
AuthorPosts
-
05/31/2014 at 20:54 #7122poulsejParticipant
Maybe I missed a post somewhere but has anyone managed to get the PS3 controller working with MAME? I can;t see a way to do it as mame seems to use a different configuration method than all the other emulators.
We could really do with a sticky just for PS3 controller configs. My config works perfectly for Genesis and Atari 2600 but only just tried mame.
06/01/2014 at 11:43 #7163dudleydesParticipantThere was a issue raised at mame4all-pi repository that resolved the problem. Apparently there is code that rejects controllers with more than 6 axes.
Here is what I did. In a terminal, type
sudo nano home/pi/RetroPie/emulators/mame4all-pi/src/rpi/minimal.cpp
Comment out lines 168 to 174 so it appears as below.// if (SDL_JoystickNumAxes(myjoy[i]) > 6) // { // SDL_JoystickClose(myjoy[i]); // myjoy[i]=0; // logerror("Error detected invalid joystick/keyboard\n"); // break; // }
Save and exit.
Next you need to recompile the code so type in the terminal.
cd home/pi/RetroPie/emulators/mame4all-pi/ make
Reboot and your PS3 controller should now work.
06/04/2014 at 09:49 #7241poulsejParticipantdudleydes…… thankyou thankyou thankyou thankyou thankyou thankyou.
I didn’t install from source originally so it was missing the src folder. I downloaded the mame4all-pi source from github and modified minimal.cpp as you showed. Compilation took AGES !!!! Replaced the existing mame4all-pi folder with the new compiled one and modified the mame.cfg file for the roms and samples.BINGO. works perfectly. Thanks again.
06/10/2014 at 18:45 #7437hoddParticipantThank you for this post as well! MAME was giving me major problems. Everything looks good except the joystick mappings are off. Can you guys post your home/pi/RetroPie/emulators/mame4all-pi/mame.cfg specifically the section so I can compare with the default.
[frontend] #Keyboard controls for frontend only # Get codes from /usr/include/SDL/SDL_keysym.h K_START=13 K_SELECT=53 K_LEFT=276 K_RIGHT=275 K_UP=273 K_DOWN=274 K_A=306 #Joystick controls for frontend only J_START=9 J_SELECT=8 J_A=0 AXIS_LR=0 AXIS_UD=1
06/11/2014 at 09:47 #7447dudleydesParticipantHi Hodd
The code you have posted is in my mame.cfg.template file but not the mame.cfg file.
I found configuring the joystick mapping a lot easier by using the MAME UI. If you launch a rom, then press TAB on a keyboard, you will be presented with the MAME UI.
The first option “Input: General” will allow you to map buttons to events such as quit game and pause for every game. To adjust your mappings, select the input you want to configure, press Enter on your keyboard followed by a button on your joystick.
You can use the next option “Input: This Game” to configure mappings for individual games.
06/11/2014 at 15:07 #7459hoddParticipantAh ha! That did it. Using the MAME config by hitting TAB (I totally forgot about that feature!) allowed me to configure everything and I’m in business!
Thanks so much.
06/12/2014 at 23:31 #7476richyman4everParticipant[quote=7163]There was a issue raised at mame4all-pi repository that resolved the problem. Apparently there is code that rejects controllers with more than 6 axes.
Here is what I did. In a terminal, type
sudo nano home/pi/RetroPie/emulators/mame4all-pi/src/rpi/minimal.cpp
Comment out lines 168 to 174 so it appears as below.// if (SDL_JoystickNumAxes(myjoy<em class="d4pbbc-italic">) > 6) // { // SDL_JoystickClose(myjoy<em class="d4pbbc-italic">); // myjoy<em class="d4pbbc-italic">=0; // logerror("Error detected invalid joystick/keyboard\n"); // break; // }
Save and exit.
Next you need to recompile the code so type in the terminal.
cd home/pi/RetroPie/emulators/mame4all-pi/ make
Reboot and your PS3 controller should now work.
[/quote]Hi newby here.. i’ve been trying to sort out my issues by following the prompts by some great people.. but im just at the last hurdle.. i finally got mame to work but the ps3 (wired) is not picking up… I have followed the guide from above but it still dosn’t pick it up.. I know it’s works as i can map the controller with in RetroPie. But when i go to tab and change the buttons it dosn’t pickup..
Can i have some help please..
09/17/2014 at 20:51 #68428Rainer WeinbergerGuestHi guys
sorry but recompile was absolutely impossible for me i tryed more swap i installed all alsa* i thryd gcc4.7 nothing helped always ends after about 1,5h with failure can you put your compiled file anywhere I can download thanks
09/18/2014 at 10:01 #68950Rainer WeinbergerGuestproblem solved it works with a fresh installation of retropi_ver2.2
09/18/2014 at 22:32 #69703keeper505ParticipantHi everybody!
I have the same problem as Rainer, despite of numerous attemptps
i could not recompile mame with the 2.3 sd image – version of Retropie. And i unfortunately cant find a sd image of retropie
ver. 2.2 to download. It would be great to get a link to the 2.2 build (SD Image) or even better the recompiled mame – version.Thank you very much in advance for your efforts!
10/13/2014 at 00:06 #81709tititatooParticipantHi keeper505, just subscribed to answer you !
Because i finally get it compiled and working with sound and PS3 gamepad.
So if you have any compile error, just tell me.
Else, i can also provide a link to my compiled version on my Raspbian Pi B+.Thanx to this forum i could make it work and play with my PS3 pad from the sofa :)
10/14/2014 at 15:26 #81756tititatooParticipantFinally, for those asking me, here is the binary cimpiled version of mame4all-pi-v0.37-BETA-5 with fixed “not working PS3 controller” when built from git.
https://drive.google.com/file/d/0B2TfYq5Awz_jWExLS2RpMHhnalE/view?usp=sharing
Dont forget to use Sixpair / Sixaxis (see readme.txt)
Please leave your comments on the google page.Have fun !
Tititatoo.10/14/2014 at 21:15 #81764keeper505ParticipantHey tititatoo!
Thank you very much for your help! I will give your freshly compiled mame-version a try asap! Great that you upload your compiled version!
keeper505
10/24/2014 at 21:39 #82004mikedpittParticipantDoes anyone know if this will work with the Raspi A 256MB? This is as of now the ONLY thing I don’t have working for my cabinet.
10/29/2014 at 10:58 #82166tititatooParticipantI didn’t see on the MAME site that there is a minimum memory limit to run MAME.
So i guess it would run on your Raspi A Model. Slightly lower but that should run. Give it a try and see.10/29/2014 at 14:44 #82167mikedpittParticipantworks :) Now, if there was only a way to rotate the screen…
12/28/2014 at 07:38 #84082petrockblogKeymasterIf you build mame4all from source with the latest retropie-setup script it should work out of the box now. Thanks for the heads up / patch.
retropie-setup now uses a forked repository here – https://github.com/joolswills/mame4all-pi which contains this fix as well as a couple of others. Didn’t want to have to fork it, but there seems to be radio silence from the previous author.
12/28/2014 at 10:48 #84084mikedpittParticipantDoes this mame4allpi support screen rotation?
12/28/2014 at 11:27 #84085petrockblogKeymastertry the options
ror=no rol=no flipx=no flipy=no
in mame.cfg (/opt/retropie/emulators/mame4all/mame.cfg)
12/28/2014 at 15:56 #84104mikedpittParticipantflipping the x and y axes, isn’t the same as rotating the screen. I am currently using both mame4allpi and advmame, because advmame supports screen flipping via dipswitches in the ROMS themselves and rotation. It would be great to only use one, but the screen rotation is a deal breaker for me as this is an old cocktail cabinet.
12/28/2014 at 17:19 #84139petrockblogKeymasterI thought it would be useful to include all the options. Check the first two config variables I posted – ror and rol. I assume they stand for rotate right and rotate left. no idea if they work, but try them :)
12/28/2014 at 17:21 #84140mikedpittParticipantThey do not. Neither do the in ROM dipswitches for “Cocktail” settings that flips the screen between players either. Although these do work in advmame. I may be doing something incorrectly, but even getting the screen to rotate doesn’t do me any good if the screen doesn’t flip in between players :(
12/28/2014 at 18:40 #84152petrockblogKeymasterit may be a limitation of the dispmanx pi video output driver in mame4all.
12/28/2014 at 19:50 #84160petrockblogKeymasterI don’t know about the cocktail dipswitches, but the ror/rol settings do work – I just set “ror=yes” in mame.cfg and have 1942 running rotated on my monitor.
12/28/2014 at 19:58 #84161petrockblogKeymasterI just tested cocktail mode with 1942 (with ror=yes set in mame.cfg). Started a 2 player game. After player 1 died, the screen flipped correctly for player 2 so it should work for you.
12/28/2014 at 21:00 #84167mikedpittParticipantWhat am I not doing?
12/28/2014 at 21:54 #84174petrockblogKeymasterNot sure – you are editing the correct configuration and mame4all is definitely using it ? – can you check by setting another option like ? I would need more details on file locations / contents etc. Note the path I mentioned is for the very latest retropie-setup script – emulator locations have changed. mame cfg used to be in /opt/retropie/emulators/mame4all-pi
maybe launch mame4all directly from the terminal to debug / test
12/29/2014 at 07:16 #84196mikedpittParticipantIs there an already compiled binary and cfg files to be had anywhere?
12/29/2014 at 07:43 #84197petrockblogKeymasteryou if you installed from source or binary install on retropie you should have a binary with configuration in /opt/retropie/emulators/mame4all or /opt/retropie/emulators/mame4all-pi
12/29/2014 at 07:46 #84198mikedpittParticipantI have an older binary, and I did not compile from source as mine failed every time I tried. I’m working with an image. And I took the binary above in the post (way above) to even get the ps3 controller working. All I think I need is a working compiled binary and config files, and I “should” just be able to replace the binary and cfg files right? And this version of mame4allpi will do 2 ps3 controllers and screen rotation hopefully everything I need :)
-
AuthorPosts
- The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.