RetroArch
Оценок: 49
Using RetroArch Steam with your Frontend
От Jackson =D
How to add this Steam version of Retroarch to another Emulator Frontend. Allowing you to use Steam exclusive features like Cloud Saves, whilst still keeping your existing emulation setup and negating the RetroArch UI almost entirely.
3
   
Наградить
В избранное
В избранном
Удалить
Frontend?
Seeing as Retroarch releasing on Steam is sure to bring a large influx of new users to the Emulation scene, I thought I'd give some details on what a Frontend actually is. If you already have your frontend set up, skip to the next section for instructions.

Emulator frontends are programs that act as a library for your Emulated Games, just like Steam does. Whilst more recent Emulators are making efforts to display your games in an more aesthetically pleasing manner, older ones often don't even have a games list!
You provide a Frontend with the location of your games (Roms), An Emulator for each console you wish to use, and it'll handle all the rest. Displaying your games in a satisfying view and launching them properly, without you having to touch the UI at all after the initial setup. Retroarch itself is technically a frontend, though its emulators are built-in, and you can't add more than the ones provided.

By using a Frontend with its own Emulators in addition to Retroarch, you can build yourself an Emulation suite, capable of playing almost any Console you like and all accessible from a single program!

Below is an example of a Frontend, Launchbox with the LBPlex Theme.


There are many Frontends available, including Launchbox[www.launchbox-app.com], Pegasus[pegasus-frontend.org] and Attract Mode[attractmode.org]. Each of them have minor differences in Theme and Functionality, but they'll all display your games just fine. Just pick whichever looks best to you and have a try!

Personally, I use Launchbox on my desktop and Pegasus on my laptop/HTPC. Launchbox provides absolutely unparalelled metadata with their own Games Database, whilst Pegasus provides a better (and free) controller interface in my opinion. Ran together, you can use the Pegasus Export plugin to transfer all that Launchbox metadata over to Pegasus with significantly less effort than downloading and writing it all yourself.
Instructions (Windows)

First you need to copy the path to your main Steam.exe file. On most installations, this'll be at C:\Program Files\Steam, or C:\Program Files (x86)\Steam. Hold shift and right-click Steam.exe, then choose Copy as Path.
Next open Notepad and paste the Steam path you just copied, then add the following text after it:
-applaunch 1118310 %*


For anyone curious, this command tells Steam to launch a game by its ID, provides the ID for Retroarch, and then passes whatever parameters it was given (In this case, it'll be your frontend providing the path to your intended Core and Rom) to Retroarch as it launches.


Choose Save As, set the filetype as "All Files", name the file "Retroarch.bat" and save it somewhere it can easily be accessed.
From there, in your frontend, you can just replace any paths that would lead to Retroarch.exe with one to the Retroarch.bat file instead. You can see an example of the correct settings in Launchbox in the image on the left, and an example in a Pegasus config file below.








Now if you start any game that you have assigned to use Retroarch as its emulator, it should launch through the Steam version. Providing you with hour tracking, and automatic cloud saving for the Cores that support it.
Instructions (Linux/Steam Deck)
The process for Linux is much the same as Windows, except it may be easier to just write the general "steam -applaunch" command directly into your Frontend rather than use a script file. There is also one irritating caveat:
Due to a bug with how Steam's Linux version processes external commands, your rom files cannot have any spaces in them. You'll need to use a program like Bulk Rename Utility (Windows) or KRename (Linux) to replace all the spaces in your rom names with underscores. Just the ones that you'll be running through Retroarch of course.

Комментариев: 23
Jackson =D  [создатель] 10 окт. 2022 г. в 5:34 
I don't use Zipped roms myself, so I'm not entirely sure. The user who proposed that command also used Launchbox instead of EmulationStation, so I guess there's a difference in how they interact with zipped files. ES is starting up after the timeout ends.

If you just use the first, single line command, does that work better?
McNugget Gaming #BuffTheCaber 8 апр. 2022 г. в 12:55 
Additionally, tr should be installed by default on a Steam Deck.
McNugget Gaming #BuffTheCaber 8 апр. 2022 г. в 10:51 
Go ahead and add it, I just pinched the command from this random website [vitux.com] I found through a web search. All I did was make the instructions to open the terminal in the right place and to check if tr was preinstalled in the mentioned distros.
Jackson =D  [создатель] 7 апр. 2022 г. в 23:58 
Cheers for that! I'm still not very deep into Bash at all, but that's a much better option than installing a whole third party program.
Mind if I add it to the guide?
McNugget Gaming #BuffTheCaber 7 апр. 2022 г. в 17:54 
For anyone else that comes across this guide, if you use a Linux distro, you can use the following terminal command for file in *; do mv "$file" `echo $file | tr ' ' '_'` ; done in the folder with the files (or directories) you want changed from using spaces to using underscores.

You can usually open a terminal from the GUI file manager, just right click (or shift + right click, depends on the file manager used) and select "open terminal" or similar. The newly opened terminal will be working in the directory you where you were in the file manager, which is important for this command.

This avoids needing to install, use, then remove KRename, if you just need it just one time. The individual commands used were all preinstalled on the two distros I tested, ZorinOS 15.3 and Manjaro 21.2.5, meaning I didn't need to install anything.
tastyjerk 1 янв. 2022 г. в 9:27 
Thank you so much!! You have been incredibly helpful.
Jackson =D  [создатель] 1 янв. 2022 г. в 2:53 
I'm planning on just using Underscores myself. Haven't got around to it yet because I'm holding out hope they'll fix it, but my Github issue has had zero interaction with it so far :V
Since you're still on Windows right now, I can't recommend Bulk Rename Utility enough: https://www.bulkrenameutility.co.uk/
Extremely useful.

If you need a Linux solution, KRename should work too. https://apps.kde.org/en-gb/krename/
tastyjerk 31 дек. 2021 г. в 13:27 
Oh and also do you have to rename them one by one or do you have some sort of miracle mass-renaming program?
tastyjerk 31 дек. 2021 г. в 13:23 
Man!! I think you just saved me a ton of time haha. Yes I am setting up on my Windows PC for now but I am definitely prepping for my Deck whenever it arrives. How are you formatting your ROMs? Just deleting all spaces or replacing spaces with _?
Jackson =D  [создатель] 31 дек. 2021 г. в 12:48 
No problem! Seeing as you're already rearranging your Roms as well, I'll give a tip:
If you plan on moving to Linux, or are buying a Steam Deck and want to try this on it, you'll need to remove all spaces from your Roms. Steam on Linux doesn't support spaces in file paths used in commands at all, even with quotes or escape characters.

That sure was a fun one to figure out.