You can play retrogrames on Haiku via the RetroArch application.
But once you start to have several games installed, how to facilitate the launch of a specific game you like ?
All you need to know will be in this article :)
If you remember about the "Play Super Bomberman" article, we were using Emulation Station to launch the game in RetroArch.
However, when you need to run the game directly, there's a better way to do.
The RetroArch application can be called via the command line.
It you type the below line in a Terminal, you will have a lot of details about the possible options :
retroarch --help
The aim is to launch a specific ROM - Super Bomberman. For that we need to indicate :
In a Terminal type :
retroarch -L /boot/system/add-ons/libretro/snes9x_libretro.so /boot/home/ROMs/snes/Super\ Bomberman\ \(USA\).sfc
It will launch directly the game !
Are you happy ?
k, but we can do better than that.
When you need to automate some tasks, the best way is to create bash script.
For that, open Pe editor and paste the below text :
#!/bin/bash
retroarch -L /boot/system/add-ons/libretro/snes9x_libretro.so /boot/home/ROMs/snes/Super\ Bomberman\ (USA).sfc
For the next step, we suppose you have saved the script under the filename "/boot/home/Apps/bomberman.sh" :
Now in the Terminal go into the "/boot/home/Apps" folder and type:
chmod +x ./bomberman.sh
It will indicate the file is now executable.
Open the folder in the Tracker :
If you double click on the script, it will launch the Super Bomberman game :)
Now let's suppose you would like to have the script recognized in the Terminal, whatever the folder you are currently in.
For that, we just need to create a symbolic link into the "/system/non-packaged/bin" folder.
Execute the below command :
ln -s /boot/home/Apps/bomberman.sh /system/non-packaged/bin/bomberman
Great !
Now in any Terminal, if you type the command "bomberman", it will redirect to the "bomberman.sh" script :)
Let's improve things a little bit.
What about a nice icon for this game ?
If you have already read the "Attach icon to app" article, you should know how to convert SVG image into a nice HVIF icon : in our case we should have the icon "applications-games.hvif" available on the Desktop.
Launch the below command to attach the icon to the bomberman.sh script :
addattr -f /boot/home/Desktop/applications-games.hvif -t icon BEOS:ICON /boot/home/Apps/bomberman.sh
If you look now into the Tracker :
Great : a nice icon is now linked to our script !
To finalize the access, just create an entry into LaunchBox :
In case you don't know, read the article "Use LaunchBox" which provide useful information on this application.
To conclude, let's add some attributes for QuickLaunch :
addattr BEOS:TYPE application/x-vnd.Be-elfexecutable /boot/home/Apps/bomberman.sh
addattr BEOS:APP_SIG application/x-vnd.bomberman /boot/home/Apps/bomberman.sh
In QuickLaunch if you type "bomb" :
Great !
The bomberman script is now recognized :)
And of course if you click on it, the Super Bomberman game will start :
I hope you're now more confortable to make quick access to your favorite retrogames under Haiku.