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

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

    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
    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
    Guest

    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
    Guest

    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
    Guest

    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
    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
    Guest

    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
    dudleydes
    Participant

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

    #15301
    Haris
    Guest

    Can i just copy the cpp file to my directory?

    #15317
    Haris
    Guest

    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
    Guest

    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
    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
    Guest

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

    #15548
    Anonymous
    Inactive

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

    #15551
    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
    Anonymous
    Inactive

    thanks for answer quickly :)

    and after recompile my controller work ?

    #15556
    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
    Anonymous
    Inactive

    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
    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
    Anonymous
    Inactive

    thx !!! :D
    i did not know this command ! :D

    #15566
    Haris
    Guest

    Thanks my friend. I will try it:)

    #15569
    Haris
    Guest

    While recompiling i get some warnings, is that right?

    #15591
    Haris
    Guest

    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
    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
    Guest

    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
    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
    jmaxime89
    Participant

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

    #15677
    Haris
    Guest

    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)
  • The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.