RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Launch Executables from the port section

    Scheduled Pinned Locked Moved Help and Support
    ports sectionexecutable file
    8 Posts 2 Posters 865 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      Torino1564
      last edited by

      Hi everyone, Im doing a University project where Im trying to setup an arcade machine for an event. My team and I were able to setup some console ROMs with no issues, but we are now trying to add some custom games made by the students to the retropie interface without much success. The games are made with the allegro library, which is a basic graphics framework. I read in these forums that you can add executables to the port section of the retropie OS, but that doesnt seem to work for these games or at least I wasnt able to make it work. Right now we are able to boot into the desktop and open the games from there, but it would be really nice to just start them up from the ports category in retropie. Does anyone have any suggestions? Thanks and have a nice day

      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by

        How did you set-up each port ?
        RetroPie can start a minimal desktop environment if the game/port is an x11 application if you prepend XINIT: to the launch command - but that works for ports that use runcommand. See for instance the lincity-ng port.

        T 1 Reply Last reply Reply Quote 0
        • T
          Torino1564 @mitu
          last edited by

          @mitu Thank you for the response.
          So what Ive done so far was the following: First I added to /home/pi/RetroPie/roms/ports a shell script that has the command "/opt/retropie/supplementary/runcommand/runcommand.sh" 0 PORT "spaceinvaders" "". Then I added a new directory /opt/retropie/configs/ports/spaceinvaders and created a file emulators.cfg with a variable spaceinvaders = "/opt/retropie/ports/spaceinvaders/spaceInvadersAllegro" (name of the executable) and default = "spaceinvaders". Lastly I copied the game folder in /opt/retropie/ports/spaceinvaders.

          When I run the shell from the ports menu in Retropie I get the "press any button to configure" splash screen and then it just exits right back to the ports menu. The executable was built in the rpi and I can run it with no issues in the Desktop environment.

          1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator
            last edited by

            @Torino1564 said in Launch Executables from the port section:

            "/opt/retropie/supplementary/runcommand/runcommand.sh" 0 PORT "spaceinvaders" ""

            Change the command to:

            "/opt/retropie/supplementary/runcommand/runcommand.sh" 0 PORT "XINIT:spaceinvaders" ""
            

            and see if that launches the game correctly.

            T 1 Reply Last reply Reply Quote 0
            • T
              Torino1564 @mitu
              last edited by

              @mitu Sorry for the delay, I was off the device for a bit. I tried adding the XINIT to the command, but whenever I now try to run the shell script I get an error saying that there was no configuration found for the system XINIT:spaceinvaders.

              mituM 1 Reply Last reply Reply Quote 0
              • mituM
                mitu Global Moderator @Torino1564
                last edited by

                @Torino1564 Sorry, I think I mis-spoke.
                The file to modify would be /opt/retropie/configs/ports/spaceinvaders/emulators.cfg, where the emulator line should be:

                spaceinvaders="XINIT:/path/to/game"
                default=spaceinvaders
                
                T 1 Reply Last reply Reply Quote 0
                • T
                  Torino1564 @mitu
                  last edited by

                  @mitu Thank you again for your reply. I still get the same effect thought, the screen goes black after the "Launching X..." screen and then goes right back to the ports menu. I will try out a different game, maybe its just an issue with the one that Im currently testing

                  1 Reply Last reply Reply Quote 0
                  • mituM
                    mitu Global Moderator
                    last edited by

                    Check /dev/shm/runcommand.log for any errors, maybe there's a hint for why the game doesn't start.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post

                    Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                    Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.