Viewing 30 posts - 1 through 30 (of 30 total)
  • Author
    Posts
  • poulsej
    Participant
    Post count: 3

    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.

    dudleydes
    Participant
    Post count: 139

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

    poulsej
    Participant
    Post count: 3

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

    hodd
    Participant
    Post count: 5

    Thank 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
    
    dudleydes
    Participant
    Post count: 139

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

    hodd
    Participant
    Post count: 5

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

    richyman4ever
    Participant
    Post count: 1

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

    Rainer Weinberger
    Guest
    Post count: 908

    Hi 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

    Rainer Weinberger
    Guest
    Post count: 908

    problem solved it works with a fresh installation of retropi_ver2.2

    keeper505
    Participant
    Post count: 3

    Hi 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!

    tititatoo
    Participant
    Post count: 3

    Hi 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 :)

    tititatoo
    Participant
    Post count: 3

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

    keeper505
    Participant
    Post count: 3

    Hey 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

    mikedpitt
    Participant
    Post count: 21

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

    tititatoo
    Participant
    Post count: 3

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

    mikedpitt
    Participant
    Post count: 21

    works :) Now, if there was only a way to rotate the screen…

    petrockblog
    Keymaster
    Post count: 1827

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

    mikedpitt
    Participant
    Post count: 21

    Does this mame4allpi support screen rotation?

    petrockblog
    Keymaster
    Post count: 1827

    try the options

    
    ror=no
    rol=no
    flipx=no
    flipy=no
    

    in mame.cfg (/opt/retropie/emulators/mame4all/mame.cfg)

    mikedpitt
    Participant
    Post count: 21

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

    petrockblog
    Keymaster
    Post count: 1827

    I 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 :)

    mikedpitt
    Participant
    Post count: 21

    They 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 :(

    petrockblog
    Keymaster
    Post count: 1827

    it may be a limitation of the dispmanx pi video output driver in mame4all.

    petrockblog
    Keymaster
    Post count: 1827

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

    petrockblog
    Keymaster
    Post count: 1827

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

    mikedpitt
    Participant
    Post count: 21

    What am I not doing?

    petrockblog
    Keymaster
    Post count: 1827

    Not 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

    mikedpitt
    Participant
    Post count: 21

    Is there an already compiled binary and cfg files to be had anywhere?

    petrockblog
    Keymaster
    Post count: 1827

    you 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

    mikedpitt
    Participant
    Post count: 21

    I 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 :)

Viewing 30 posts - 1 through 30 (of 30 total)
  • The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.