Launch Executables from the port section
-
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
-
How did you set-up each port ?
RetroPie can start a minimal desktop environment if the game/port is anx11
application if you prependXINIT:
to the launch command - but that works for ports that useruncommand
. See for instance the lincity-ng port. -
@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.
-
@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.
-
@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.
-
@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
-
@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
-
Check
/dev/shm/runcommand.log
for any errors, maybe there's a hint for why the game doesn't start.
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.