[SOLVED] Atari St/Hatari PS3 controller fire button

Home Forums RetroPie Project Controller Configuration in RetroPie [SOLVED] Atari St/Hatari PS3 controller fire button

RetroPie has a new website and forum. Please visit https://retropie.org.uk/ for the new site. The new forum is located at https://retropie.org.uk/forum/. This forum is left here as a read-only archive.

This topic contains 1 reply, has 1 voice, and was last updated by Profile photo of nestorps nestorps 1 year, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #119065
    Profile photo of nestorps
    nestorps
    Participant

    Hi,

    is there any way to change the fire button in Atari ST (Hatari) emulator? It is mapped to the select button in my ps3 controller (very hard to play..). I’ve tried to edit the configs with F12 but there is no option to map the joystick.

    Any ideas?
    thanks

    • This topic was modified 1 year, 2 months ago by Profile photo of nestorps nestorps.

    #119289
    Profile photo of nestorps
    nestorps
    Participant

    To anyone with this problem I’ve figure out the solution based on this post:

    https://www.reddit.com/r/RetroPie/comments/3fi5mj/ps3_controller_and_scummvm/

    We have to recomplie the emulator.

    Hatari emulator is waiting for a code 0 to fire button. That is the select button in the PS3 controller as retropie configures it. After a long research I’ve finally found where the Hatari hardcodes the fire button event.

    First download source files for hatari:

    cd RetroPie-Setup
    sudo ./retropie_packages.sh hatari sources

    then go to

    sudo nano /home/pi/RetroPie-Setup/tmp/build/hatari/src/joy.c

    All you have to do is edit the lines code where this event take place. Lines 206 and 208

    pJoyReading->Buttons = SDL_JoystickGetButton(sdlJoystick[nSdlJoyID], 0);

    and

    if (SDL_JoystickGetButton(sdlJoystick[nSdlJoyID], 1))

    replace to

    pJoyReading->Buttons = SDL_JoystickGetButton(sdlJoystick[nSdlJoyID], 14);
    if (SDL_JoystickGetButton(sdlJoystick[nSdlJoyID], 13))

    X to fire and O to space fire (some games needs this). The other buttons are []=15 and triangle=12

    You may want to add this line to exit the emulator without the keyboard with the PS3 select button:

    if (SDL_JoystickGetButton(sdlJoystick[nSdlJoyID], 0))
    		Main_RequestQuit(0);

    Then build

    sudo ./retropie_packages.sh hatari build

    and finally

    cd /home/pi/RetroPie-Setup/tmp/build/hatari
    sudo make install

    Enjoy playing Atari ST!!

    • This reply was modified 1 year, 2 months ago by Profile photo of nestorps nestorps.
    • This reply was modified 1 year, 2 months ago by Profile photo of nestorps nestorps.
    • This reply was modified 1 year, 2 months ago by Profile photo of nestorps nestorps.
    • This reply was modified 1 year, 2 months ago by Profile photo of nestorps nestorps.
Viewing 2 posts - 1 through 2 (of 2 total)

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

Skip to toolbar