Using Steam as a front-end for individual games in emulators

This page has now moved to Steam and Emulators and is also accessible via the blog menu.

About these ads

74 thoughts on “Using Steam as a front-end for individual games in emulators

  1. HI thanks for this. It works pretty good. But I wanted to know if this method can be used for DOS emulators like D-Fens Reloaded for each individual game? I trie to set it up but I don’t know what extra parameters I need to put in the bat.

    • It looks like D-Fend Reloaded can create shortcuts for each game. You can edit the batch file to launch the shortcut or look at the shortcut’s properties using Windows Explorer to see what parameters were passed to what.

    • From the ppsspp.org forums:
      PPSSPPWindows.exe "C:\PSP\Games\UCUS98744_LBP.cso"

      Other command-line options available from version 0.7 onwards:
      -l Show log console (Windows only.)
      -s Don't run game on load (Windows only.)
      -d Enable debug logging (non-Windows only, must be compiled in on Android/etc.)
      -g Enable graphics logging.
      -j Use the jit.
      -i Use the interpreter.
      --log=FILE Write log info to FILE.
      --state=FILE Load savestate from FILE at game start.
      FILE Load file immediately (runs based on config / -s.)

  2. I just wanted to post again about my progress with my Steam front end. The core idea pretty much started here. I did more research and toying around as I messed with this script more and found a couple of things.

    For one, you don’t HAVE to convert these .bat files to .exe for Steam. You can trick Steam by pointing it to a dummy .exe file. I just opened a blank notepad document, and saved it as null.exe near where I was saving my batch files. Once you point Steam to it, you just right click the new game in steam and go to it’s properties and repoint it.
    So the tartget would be: “c:\emulation\sfa3.bat”
    And start in: “c:\emulation\”

    I ended up making a bunch of “null” files so I could point steam to several games at once during the “add non steam game” process.

    The second thing I wanted to bring up was difficulties I ran into with Steam as a front end, and this batch file process. I’ll talk about that in a reply.

    • Now, I had a previous comment asking if the OP knew of a way for multiple emulators to accept the same keystroke as a means to exit the program.

      Now, something like mame has the ‘cancel’ command that you can either just use ‘esc’ as, or program a button on your controller to work as ‘esc’. With JoyToKey, this is very straight forward and easy.

      The problem is that not all games use ‘esc’ to quit, and when a keyboard isn’t readily available because you’re doing this in an arcade cabinet and are wanting the keyboard hidden, you don’t want to have to have multiple buttons on your joystick to exit a program. Well, pretty much everything that isn’t mame, or something that can’t easily be reprogrammed to use the ‘esc’ key, accepts alt+f4 as an exit command.

      Okay, so it’s a second command, but with JoyToKey you can still map it to the same button. You don’t want “esc+alt+f4″ you want “esc” or “alt+f4″, so I differentiated the two by using a delayed button press. To do this in JoyToKey, double click the button you’re programming, and in the “keybaord 2″ tab, you’ll have options for multiple inputs. For input one I had “escape” and for input two I have “alt” and “f4″ (second field.) Below this you have switch options, so I used the third option and set it to a 500 milli-second threshold. That way just pressing is “esc” and holding for a half second is “alt+f4″.

      But then I ran into another problem, and I’ll reply again for that.

      • So on my system, Steam Big Picture is up by default, and the user navigates with a joystick. Well, the problem is that Steam Bic Picture is picking up both the joystick as a “controller” and the directional inputs from JoyToKey, so every stick move inputs two move command. So I needed a way to only have JoyToKey on when a game is launched, and the process killed after the game quits. So, in my .bat file I do the following:

        @echo off

        CD “C:\Program Files (x86)\JoyToKey_en”
        start JoyToKey.exe /min

        CD “C:\Emulation\Mame\”
        “C:\Emulation\Mame\mame.exe” sfiii3.zip

        taskkill /f /im JoyToKey.exe

        exit

        Okay, so what this is doing is launching joytokey in a minimized state. In JoyToKey I also have it’s preferences set to “start JoyToKey in a minimized mode”, just to make sure. I used the “start” command for JoyToKey because it has to load, but not halt the batch script. Immediately after JoyToKey launches, the batch script executes the emulator and its rom. Then, after the emulator/rom is exited, the “taskkill” command with it’s /f (force) argument makes sure JoyToKey exits as well.

      • I found this wonderful thread and would like to share my experience. I have started building Steam into my game frontend. I have gotten it to work with Xpadder and up to 4 Xbox360 controllers and wiimotes. I am using Project64, Dolphin, & Higan.

        1.) I used misterslimm’s bat to exe solution for this so that I can add banner images. In adding banner images to the non steam games. I have found that if you put your non steam games into the “common” folder along with PC games. Every time Steam updates, your custom images dissapear.

        To correct this issue. Make a separate folder somewhere else for your emulator .exe’s and once you have set the custom image, don’t move the .exe file or rename it, this also makes you lose your banner art. Many forums and posts talk about this issue. My issue went away when I did this easy step.

        2.) The sample codes provided here, and misterslimms solution are the only reason my setup works! Thank you guys!

        I expanded on what I learned here a little and would like to share. I prefer Xpadder to joytokey. My batch file opens Xpadder first, loads the profiles for the specific emulator, then opens the emulator, loads the game, I have my emulators setup with esc/close commands. I use the “back” and “start” buttons for this on the 360 controller, upon exit, Xpadder loads a standard Steam profile I have setup, this Steam profile has mouse movement set to the right thumbstick and mouse left click set to thumb press. I also have it set so that If I hold down the “back” button while held down the mouse pointer becomes active if I release the back button it goes away. I have it setup this way for 2 reasons, when I load into Uplay games and exit, I get stuck with that Uplay box and have to find my mouse to click to close it. Other reason is
        so Steam doesn’t freak out accepting the inputs from Xpadder and the xbox controller at same time causing a double input of commands during game play and as Randal states.

        I also have in my batch file for Dolphin a command that uses “ReplaceText” for when I want to use an emulated wiimote or a real wiimote. I did not want to have to use the mouse and keyboard to select these. The batch file simply goes in and changes the ini file for Dolphin before Dolphin launches. I put this line in each of my bat files for each wii game based on whether the game plays with sideways wiimote or if it needs the nunchuck.

        I found the easiest way to switch between these was to call a .vbs script called “ReplaceText.vbs” I found the code for the .vbs on howtogeek & sysadmingeek.

        Here is my batch code for Dolphin and switching to a real wiimote:

        REM the next line opens the Xpadder Program and loads the profile
        CD “C:\Steam Frontend\Xpadder”
        Xpadder “C:\Steam Frontend\Keymapper Profiles\Nintendo Wii\Nintendo Wii.xpadderprofile” “C:\Steam Frontend\Keymapper Profiles\Nintendo Wii\Nintendo Wii [p2].xpadderprofile” “C:\Steam Frontend\Keymapper Profiles\Nintendo Wii\Nintendo Wii [p3].xpadderprofile” “C:\Steam Frontend\Keymapper Profiles\Nintendo Wii\Nintendo Wii [p4].xpadderprofile”

        REM The next line changes directories and uses a script called the ReplaceText.vbs script to change the controller from emulated wiimote to real wiimote. The .VBS file must be in the folder with the batch file and the .exe you make from the batch file for this to work.
        CD C:\Steam Frontend\Non Steam Games\Wii
        ReplaceText “C:\Users\Mario\Documents\Dolphin Emulator\Config\WiimoteNew.ini” “Source = 1″ “Source = 2″

        REM The following lines open dolphin and load the game.
        CD C:\Steam Frontend\Emulators\Dolphin
        “C:\Steam Frontend\Emulators\Dolphin\Dolphin.exe” /e “D:\RomFiles\Nintendo Wii\Super Mario Galaxy.wbfs” /b

        REM The next line loads the controller profile that is set up for steam when emulator exits.
        CD “C:\Steam Frontend\Xpadder”
        Xpadder “C:\Steam Frontend\Keymapper Profiles\Steam.xpadderprofile” “C:\Steam Frontend\Keymapper Profiles\Steam [p2].xpadderprofile”

        For games that need a sideways wiimote I use an Xbox360 controller and the code is changed slightly:

        CD C:\Steam Frontend\Non Steam Games\Wii
        ReplaceText “C:\Users\Mario\Documents\Dolphin Emulator\Config\WiimoteNew.ini” “Source = 2″ “Source = 1″

        I have had no issues with this setup so far. When Dolphin runs and game is set up I just grab the wiimote and press the 1+2 buttons till I feel the wiimote vibrate and I am then in business. I have an escape key setup on my xbox360 controller that I use to exit dolphin and pop into the library and steam and navigate once again.

        I hope this helps and adds to the gold mine of a thread this is for anyone trying to use Steam as a frontend! Sorry for the long reply! Have fun gaming everyone!!

  3. i tried using these with dolphin (have created an .exe file) but when the game opens i can’t use that steam menu ingame (the one from Shift+Tab) but when i select the dolphin.exe from steam the menu appears…
    any help on opening the menu from the .exe i created?

    i tried puting it to load the game directily but didn’t worked the same way (steam menu did not appeared)
    my batch file:
    CD “C:\Users\Maxi\Desktop\EmuCR-dolphin-master-3.5-1772-x64\EmuCR-dolphin-master-3.5-1772-x64″
    “C:\Users\Maxi\Desktop\EmuCR-dolphin-master-3.5-1772-x64\EmuCR-dolphin-master-3.5-1772-x64\Dolphin.exe”

  4. This blog thread started me down a fantastic path. I’ve been setting up a gaming rig at work that will eventually morph into a full arcade cabinet; and using STEAM as a frontend was an idea I had. Having found this, it’s helped immensely, and my idea has come to reality.

    So first off, thanks a ton!

    I would like to see if I can’t get your help with something, however.

    I’ve been researching and getting command line batch files (later tuned into exe files) to run with great success on many emulators. My only problem is getting a unified “exit” strategy.

    While something like MAME allows the ‘esc’ key to exit the game, other emulators do not. With something like FCEUX for NES, I was able to configure it’s system “hotkeys” to set ‘esc’ to be it’s “exit” command, so that’s easy enough. Where I’m having some difficulties is with NullDC and SNES9x. I have a macro button for “alt+f4″, but I’d really like to get ‘esc’ to be the exit key for everything.

    Can you give any advice?

    • AutoHotKey can make the Escape key do anything. You could either load the appropriate AutoHotKey script as part of your batch file and reset afterward or use the #IfWinActive command to make sure that certain windows receive the appropriate quit command.

  5. Hey, I’ve been setting up my emulators to work with steam with the help of your guide, and I seem to be having trouble with epsxe. It worked fine the first time, and loaded the game, but after that I just get a BIOS error. Here’s what a batch looks like:

    Any advice?

  6. Please, i have already resolved my problem, i added /d after the first CD, i did it like this:

    CD /d “C:\Program Files\Dolphin”
    “C:\Program Files\Dolphin\Dolphin.exe” /e “E:\Gamecube\R-Racing Evolution Gamecube.gcz” /b

  7. It gives me various errors, some of they are (mi dolphin is not installed, is just portable):

    Says “Error loading plugin Plugin_VideoOGL.dll: cant find file”
    “Cant init video Plugin”
    “Couldnt Init the core check you configuration”

    The emulator works if i launch the emulator from his exe normally, even if i setup the shortcut on steam, launch and select the game individually it works normally.
    What should i do ?

  8. Hi, n64 is all set, I even saved a template so I don’t have to bug ya. But no with Dolphin I enter this:
    CD “D:\Emulation\Wii”

    “D:\Emulation\Wii\Dolphin.exe” /e
    “D:\EMulation\Wii\Super Mario Sunshine.iso” /b

    And I get the program telling me a set of usage commands. Im using the latest version of Dolphin.

    • Final Burn Alpha supports command-line launching. Simply supply the name of the rom, for example, bionicc, as a parameter to launch, in this case, Bionic Commando.

      fba bionicc
      fba64 bionicc

      If it is the first time you’ve played a game, press F5 to set up your controller.

  9. Thanks for the guide, I got it working fine with 3 of the 4 of the examples you listed.

    I seem to be having a little problem setting my own batch up for Project64 though. I’m not sure what I’m doing wrong, would you mind helping me out?
    Here is the one I made for reference:

    CD “C:\Program Files (x86)\N64″
    “C:\Program Files (x86)\N64\Project64″ “D:\Emulators\N64\(game.exe).n64″

    The game loads fine, but the command prompt window stays up for some reason. This doesn’t happen with any of the other emulator batches.

    Thanks in advance, if you’re able to help.

    • 1. Right-click your batch file and create a shortcut.
      2. Right-click the shortcut and under the Shortcut tab, set Run to Minimized.
      3. Use the shortcut to run the batch file invisibly.

      Alternatively, you can convert the batch file to a windowless exe using Slimm Bat to Exe found on the Solutions page of this blog. If you do that, you can also use Steam to launch the game.

    • I presume it works fine directly from Dolphin. Make sure there are quotation marks around any file path. The difference between forward slash and backward slash is important. Dolphin may need to be run as an administrator.

      Oddly, I can run the Dolphin command-line shown above but I can’t launch Dolphin itself from Steam. How strange is that?

  10. Might be kind of silly to ask, but what about SNES, N64, GBA, Genesis, and other emulators? Surely there’s a command line to load up a ROM immediately for these older emulators?

  11. Is it possible to make Dolphin run iso’s like this? Because it keeps saying the file doesn’t exist, even though it brings the directory up in Dolphin.

    • When I wrote this article it certainly worked. I was using it to play The Legend of Zelda: Wind Waker direct from Steam. Are you using full path names in quotes? Also, there is a small mistake in the first CD which should read CD “C:\Program Files\Dolphin”. Perhaps that’s the problem.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s