Jump to content
LaunchBox Community Forums

An attempt at simplifying ScummVM integration


Recommended Posts

I've been tinkering a bit with a .bat file to try and get an easy generalized approach to add ScummVM games to LaunchBox and to launch them.
Also I really wanted to have compressed games rather than unzipped ones since a lot of the games compress really well and aren't that slow to decompress.

Here's what I got so far...

Make a bat file with this in it:

@echo off
REM --------------------------------
REM Set these paths:
set scummvmfolder="D:\ScummVM\"
set zipfolder="D:\LaunchBox\ThirdParty\7-Zip"
set romfolder="D:\Roms\ScummVM"
REM --------------------------------

cd %romfolder%
%zipfolder%\7z.exe e %1 -o*
set gamepath=%1
set gamepath=%gamepath:~0,-5%
echo %gamepath%
cd %scummvmfolder%
scummvm.exe -c scummvm.ini --auto-detect --path=%gamepath%"
rmdir /s /q %gamepath%"

Remove the "-c scummvm.ini" part from the 2nd to last line if you're not using a portable install.

Edit the paths to match your folders and then save the .bat file wherever you like.

 

Add an emulator in Launchbox, point it to this .bat file and make it the default emulator for ScummVM.

Now you can import ScummVM zip files as rom files just like you can for any other system!

 

This worked fine for me running on Windows 10 Pro, tested out a whole bunch of games such as Beneath a Steel Sky, Flight of the Amazon Queen, Leisure Suit Larry, Space Quest 4 and a few others I can't remember right now.

 

---

 

Now it's been a while since I spent some time doing batch scripts so I'm certain there are more efficient approaches here and quite possibly ways to avoid having to set all these paths. So I figured I'd just put this out here so that others can take a look and probably figure out an even better solution.

Things that I imagine could be improved:
- Reduce the need to set up paths manually
- Use Launchbox own way of decompressing rom files
- Does the auto-detect feature of scummvm correctly auto-detect every game out there? I have no idea.

Cheers,
Krof

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

  • 11 months later...
  • 1 year later...
  • 2 weeks later...
On 9/10/2022 at 10:37 PM, RetroKSB said:

Sorry to necro a thread, but thanks for this.

I wonder, how do saves work with this method?

Using the method above it will read your save preference from scummvm.ini. In other words, what you have set up in ScummVM will be the save path.

 

If you want it to be changeable in the .bat file itself you could change it to this:

@echo off
REM --------------------------------
REM Set these paths:
set scummvmfolder="D:\ScummVM\"
set zipfolder="D:\LaunchBox\ThirdParty\7-Zip"
set romfolder="D:\Roms\ScummVM"
set savefolder="D:\Saves\ScummVM\"
REM --------------------------------

cd %romfolder%
%zipfolder%\7z.exe e %1 -o*
set gamepath=%1
set gamepath=%gamepath:~0,-5%
echo %gamepath%
cd %scummvmfolder%
scummvm.exe -c scummvm.ini --auto-detect --path=%gamepath%" --savepath=%savefolder%
rmdir /s /q %gamepath%"

Please note that you should not use the current game folder for the game to save ( %gamepath% ), since that folder does get removed when done playing the game.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...