MAME CONTROLS (PS3 WIRELESS GAMEPAD)

Welcome Page Forums RetroPie Project Everything else related to the RetroPie Project MAME CONTROLS (PS3 WIRELESS GAMEPAD)

This topic contains 28 replies, has 3 voices, and was last updated by  Haris 2 years, 11 months ago.

Viewing 29 posts - 1 through 29 (of 29 total)
  • Author
    Posts
  • #15209

    Haris1977

    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 :

    Mame4all-pi with PS3 Controller

    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

    #15241
    Profile photo of dudleydes
    dudleydes
    Participant

    The 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

    #15253

    Haris

    Thanks 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?

    #15260

    Haris

    Recompile 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?

    #15268

    Haris1977

    Updated. 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?

    #15276
    Profile photo of dudleydes
    dudleydes
    Participant

    You 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.

    #15281

    Haris

    So..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?

    #15285
    Profile photo of dudleydes
    dudleydes
    Participant

    You would need to change the minimal.cpp file and recompile but at least the file will be there.

    #15301

    Haris

    Can i just copy the cpp file to my directory?

    #15317

    Haris

    Ok 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?

    #15489

    Haris

    Dudleydes..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:)

    #15530
    Profile photo of dudleydes
    dudleydes
    Participant

    In 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
    #15540

    Haris

    My 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?

    #15543
    Profile photo of dudleydes
    dudleydes
    Participant

    You 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.

    Attachments:
    1. minimal.txt
    #15548
    Profile photo of aornn
    aornn
    Participant

    i have the same probleme i must edit minimal.cpp fot play with my ps3 ?

    #15551
    Profile photo of dudleydes
    dudleydes
    Participant

    aornn, 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.

    #15552
    Profile photo of aornn
    aornn
    Participant

    thanks for answer quickly ๐Ÿ™‚

    and after recompile my controller work ?

    #15556
    Profile photo of dudleydes
    dudleydes
    Participant

    Yes, 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.

    #15558
    Profile photo of aornn
    aornn
    Participant

    so 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 ?

    #15560
    Profile photo of dudleydes
    dudleydes
    Participant

    Here 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.

    #15561
    Profile photo of aornn
    aornn
    Participant

    thx !!! ๐Ÿ˜€
    i did not know this command ! ๐Ÿ˜€

    #15566

    Haris

    Thanks my friend. I will try it:)

    #15569

    Haris

    While recompiling i get some warnings, is that right?

    #15591

    Haris

    Ohhh..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??

    #15592
    Profile photo of dudleydes
    dudleydes
    Participant

    Pleased 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).

    #15594

    Haris

    I 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?

    #15629
    Profile photo of dudleydes
    dudleydes
    Participant

    Here 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 is

    drwxr-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)

    #15632
    Profile photo of jmaxime89
    jmaxime89
    Participant

    You Sir, are a genius. I couldn’t thank you enough

    #15677

    Haris

    Dudleydes 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 ๐Ÿ™‚

Viewing 29 posts - 1 through 29 (of 29 total)

Forums are currently read only - please visit the new RetroPie forums at https://retropie.org.uk/forums/

Skip to toolbar