Simple batch file game loader for use with RetroArch

Thought I’d share this with you, it really helped me out a lot so maybe it helps someone else here.

Open Notepad and copy this:

@echo off 
title RetroArch 1.3.6 - Nestopia v1.48-WIP
color 07
echo.
echo -------
echo Famicom
echo -------
echo.
echo Choose the game you want to play by typing the corresponding number below (1-5) then press Enter to load the game
echo.
echo 1. Game 1
echo 2. Game 2
echo 3. Game 3
echo 4. Game 4
echo 5. Game 5
echo.

set /p a=
IF %a%==1 ("path to RetroArch.exe" --Libretro "path to Libretro core" "path to game/rom/.cue/m3u etc.")
IF %a%==2 ("path to RetroArch.exe" --Libretro "path to Libretro core" "path to game/rom/.cue/m3u etc.")
IF %a%==3 ("path to RetroArch.exe" --Libretro "path to Libretro core" "path to game/rom/.cue/m3u etc.")
IF %a%==4 ("path to RetroArch.exe" --Libretro "path to Libretro core" "path to game/rom/.cue/m3u etc.")
IF %a%==5 ("path to RetroArch.exe" --Libretro "path to Libretro core" "path to game/rom/.cue/m3u etc.")

Paste it to Notepad, make changes that fits you and the system you want to play and then save it as retroarch.bat or something.

Although hard coded, the end result might look something like this:

And voilá

Good luck!

EDIT:

If a game contains “&” in the title and for it to show up correctly in the list you have to specify it like this (bold part):

echo 1. Mario ^& Luigi - Superstar Saga

otherwise it will complain.

You don’t have to correct the titles with “&” in these strings: IF %a%==1 (“path to RetroArch.exe” --Libretro “path to Libretro core” “path to game/rom/.cue/m3u etc.”)

hey, nice script! Thanks for sharing :smiley:

You are most welcome!

I do realize that hard coding batch files to load games might seem stupid and can be quite tedious if you have hundreds of them but for me once I was done I was a happy camper. Usually when I have configured an emulator I rarely make changes to it afterwards so I want the simplest way to start and play my games, so just plugin the controller, start the batch file, type the number, hit Enter and start playing.

Anyway when it comes to RetroArch at least, I find this the easiest and simplest way to load games quick without headaches.

Most people only play a handful of games, anyway, despite having a 10k+ pokeROM collection :stuck_out_tongue:

Thanks for sharing! Though if you’re going through the trouble of writing individual CLI lines for each game, remember you can always create custom shortcuts to RetroArch to launch each game using those same lines. Then you can add custom icons too. The same goes if you use Steam as a game hub and like to use custom shortcuts. The more options, the better. So thanks for sharing!

[QUOTE=spinningacorn;48268]Thanks for sharing! Though if you’re going through the trouble of writing individual CLI lines for each game, remember you can always create custom shortcuts to RetroArch to launch each game using those same lines. Then you can add custom icons too. The same goes if you use Steam as a game hub and like to use custom shortcuts. The more options, the better. So thanks for sharing![/QUOTE]

Lutris (on Linux) has recently (in this week) added retroarch to their “runners” catagory (currently on github), works great (still trying to get strider to add more cores to it :smiley:

Thanks for the feedback!

The idea to this came when I had to upgrade RetroArch from 1.3.0 to 1.3.6 enable to use GLupeN64 properly and since my favorite RetroArch front-end RAEM didn’t work well at all with 1.3.6 I begun to investigate my options since I wanted my experience to be as simple as possible. I refined my batch files gradually and finally I got the result I was happy with as you can see above and now these are the only thing I need for the systems I have in RetroArch.

I even have customized icons that looks like the console I emulate, I simply love it!

Hi SigmaVirus,

First, let me thank you for simplifying running emulated games in this way, I am a big fan of batch/shell scripts to make things simpler (retroarch is a bit complicated for me). But your batch file code above didn’t work for me, can you confirm it works or post a fix? Also, I don’t know if your familiar with shell scripting, but it would be great if you could make that also work as a shell script. I was trying to build my own menu, I will send to you to have a look, but what I want to do is to have a file window open to select the rom to play. I wanted to have a top 25 list of games, and manually hand coding each game one by one would be a lot of extra work. Here is my shell script I have been working with.

If you look closely at my shell script, I use the ls (dir for linux) and redirect to a file called output_file.txt which was my latest attempt to copy the rom filenames that way, and then try to run them by opening the filenames that way. I know I probably need to have the actual path also included with the name. If you can help me accomplish that, I would greatly appreciate it.

Regards, Brian