Homepage › Forums › RetroPie Project › Everything else related to the RetroPie Project › MAME CONTROLS (PS3 WIRELESS GAMEPAD)
- This topic has 28 replies, 3 voices, and was last updated 10 years, 4 months ago by Haris.
-
AuthorPosts
-
07/13/2014 at 12:48 #15209Haris1977Guest
I (finally) managed to play some mame roms (the problem was the wrong mame.cgf path..). But i came accross an other problem. I cannot use my ps3 wireless joystick. I hit TAB on my keyboard, the config screen appears (input controls) but whatever button i press in my joystick doesn’t work. It seems that the joystick input configuration doesnt work. Only keyboard does. I know it is smth stupid but what do i have to change?
This is my mame.cfg file
http://www.2shared.com/file/G1HPe5sq/mame.html
PS. I found this post :
But when i enter minimal.cpp i cant see lines and i cannot Comment out lines 168 to 174!! Maybe someone who has changed minimal.cpp to eork with controllers can help?
Thanks
07/13/2014 at 14:47 #15241dudleydesParticipantThe file structure of Retropie 2.2 has changed so the command you need to use to access the minimal.ccp file is now
sudo nano /opt/RetroPie/emulators/mame4all-pi/src/rpi/minimal.cpp
07/13/2014 at 15:21 #15253HarisGuestThanks man. I know that this was the path (i assumed it). I opened minimal.ccp with note++ (windows) and changed 168-174 lines (i only had some characters like this==> [ ]). All other strings were ok. I then tranfered it back to were it was (fillezila).
I am now recompile it (takes time). Is that the right procedure?
07/13/2014 at 15:45 #15260HarisGuestRecompile takes ages !!!!!!!!!!!!!
One thing i forgot to mention though: i want to exit mame by pressing start+select at the same time (like in other emus). Is that possible?how do i do it?
07/13/2014 at 16:38 #15268Haris1977GuestUpdated. Doesnt work:(
I dont if this because i opened minimal.ccp with note++ (windows). I recompiled but when i ssh with
sudo nano /opt/RetroPie/emulators/mame4all-pi/src/rpi/minimal.cpp
there are no lines in the file!! So smth must have been wrong. Can you upload the minimal.cpp file?
07/13/2014 at 17:01 #15276dudleydesParticipantYou can get a copy of the minimal.cpp file from source.
http://code.google.com/p/mame4all-pi/source/browse/src/rpi/minimal.cpp
I would check that you have the /src/rpi folder on your Pi first. If not, you may have to install mame4all from source using the Retropie setup script which can take 16 to 22 hours.
In reply to your earlier post, you can assign a key to exit mame by using TAB. In the Input:General menu, there should be an option to configure how to exit UI.
07/13/2014 at 17:20 #15281HarisGuestSo..if i install mame4all from source using the Retropie setup script, would my controller work out of the box? Or should i change the minimal.cpp again?
07/13/2014 at 17:29 #15285dudleydesParticipantYou would need to change the minimal.cpp file and recompile but at least the file will be there.
07/13/2014 at 18:37 #15301HarisGuestCan i just copy the cpp file to my directory?
07/13/2014 at 19:25 #15317HarisGuestOk here is a strange think. When i use ssh and this command:
sudo nano /opt/RetroPie/emulators/mame4all-pi/src/rpi/minimal.cpp
i can see no lines in the cpp. But when i use filezila to transfer it to my desktop, i open it with notepad++ and i can see lines !! What is going on here?
07/14/2014 at 07:20 #15489HarisGuestDudleydes..from your sayings you recompiled the whole mame4all-pi folder. So -as you are my last resort- would you be kind to upload the whole folder in order to tranfer it through fillizila to my pi??
Please:)
07/14/2014 at 11:47 #15530dudleydesParticipantIn my previous post, the path to the minimal.cpp file is incorrect so that may explain why you couldn’t see any code when using ssh.
As file names and directories are case sensitive in Linux, the command should be
sudo nano /opt/retropie/emulators/mame4all-pi/src/rpi/minimal.cpp
What I did was write the Retropie 2.2 image to SD card, comment out the lines in the minimal.cpp file and then recompile using the following commands.
cd /opt/retropie/emulators/mame4all-pi/ make
07/14/2014 at 12:20 #15540HarisGuestMy 168-174 lines are exactly as you described but still no luck. I am uploading the ssh image (captured on my pc)
http://www.2shared.com/photo/hLpJkpXX/Untitled11.html
what am i doing wrong?
07/14/2014 at 12:33 #15543dudleydesParticipantYou need to comment out lines 168-174. I did this by adding double forward slashes (//) at the beginning of each line of code which should turn blue as you edit. My code looks as below
// if (SDL_JoystickNumAxes(myjoy) > 6) // { // SDL_JoystickClose(myjoy); // myjoy=0; // logerror("Error detected invalid joystick/keyboard\n"); // break; // }
I have attached my copy of minimal.cpp which you can use to overwrite your copy once you have changed the extension from .txt to .cpp (I couldn’t upload the cpp file).
Either way, you will need to recompile which took 3 hours for me.
07/14/2014 at 12:55 #15548AnonymousInactivei have the same probleme i must edit minimal.cpp fot play with my ps3 ?
07/14/2014 at 13:03 #15551dudleydesParticipantaornn, yes, you need to edit the minimal.cpp file. At the moment, the mame4all-pi code rejects any controller with more than 6 axes such as the PS3 controller.
If it’s easier, you can download my copy attached in my previous post, change the file extension from .txt to .cpp, overwrite the copy on your Pi and then recompile.
07/14/2014 at 13:06 #15552AnonymousInactivethanks for answer quickly :)
and after recompile my controller work ?
07/14/2014 at 13:15 #15556dudleydesParticipantYes, your PS3 controller will now work. You may need to configure certain actions for your controller, such as exiting Mame. You can do this by pressing TAB on a keyboard to bring up the Mame menu.
07/14/2014 at 13:18 #15558AnonymousInactiveso if i have understand clearly i must do :
1- replace my .CPP by your
2- cd RetroPie-Setup after sudo ./retropie_setup.sh
3- option 1
4- wait…
5- my controller work !!that’s right ?
07/14/2014 at 13:26 #15560dudleydesParticipantHere are the steps to get your PS3 controller working with mame4all.
1. Replace your copy of minimal.cpp with my copy.
2. Recompile by running the commands below from the terminal on the Pi or via ssh on a desktop.cd /opt/retropie/emulators/mame4all-pi/ make
This step took me about 3 hours.
3. Your PS3 controller will work but you may need to configure certain actions by using TAB.
4. Enjoy.
07/14/2014 at 13:28 #15561AnonymousInactivethx !!! :D
i did not know this command ! :D07/14/2014 at 13:47 #15566HarisGuestThanks my friend. I will try it:)
07/14/2014 at 13:54 #15569HarisGuestWhile recompiling i get some warnings, is that right?
07/14/2014 at 15:42 #15591HarisGuestOhhh..it works !!!
But every time i start a new game i have to map my controls again!!
Can i save these settings somehow in order not to remap all the time??
07/14/2014 at 15:52 #15592dudleydesParticipantPleased to hear it worked.
You can use the TAB key to bring up the MAME menu. You can then map your controller for all games (Input:General) or for specific games (Input:This Game).
07/14/2014 at 16:01 #15594HarisGuestI have already done it. But when i exit the game and restart it (through emulation station menu) i must redo the same procedure:( (i guess controls have not benn saved) .What can i do?
07/14/2014 at 18:23 #15629dudleydesParticipantHere are some things you can try.
1. Check that you have a folder cfg in the mame4all-pi directory. If not, then you will need to create one.
2. Check who owns the cfg folder, if it exists, by running the command
ls -ld /opt/retropie/emulators/mame4all-pi/cfg
For changes to be saved, the user should be pi, not root. The output when I run this command isdrwxr-xr-x 2 pi pi 4096 Jul 8 14:21 /opt/retropie/emulators/mame4all-pi/cfg
If you get root as the owner, then you can change the user to pi with the following command.sudo chown -R pi:pi /opt/retropie/emulators/mame4all-pi/cfg
(I gave pi permission to /opt/retropie to avoid any future problems)07/14/2014 at 19:00 #15632jmaxime89ParticipantYou Sir, are a genius. I couldn’t thank you enough
07/14/2014 at 22:46 #15677HarisGuestDudleydes i dont have words to thank you..You are God:) Thanks
I will try to upload a txt file with RetroPie hints and tips in order to sum up many questions and answers about set up
Thnks again :)
-
AuthorPosts
- The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.