krof Posted August 24, 2020 Share Posted August 24, 2020 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 2 1 Quote Link to comment Share on other sites More sharing options...
krof Posted August 20, 2021 Author Share Posted August 20, 2021 Update: I have been using this for a long time now and haven't run into any issues as of yet and now with the current nightly build of scummvm it even works with all the newly supported AGS games! Quote Link to comment Share on other sites More sharing options...
KSBWasHere Posted September 10, 2022 Share Posted September 10, 2022 Sorry to necro a thread, but thanks for this. I wonder, how do saves work with this method? Quote Link to comment Share on other sites More sharing options...
krof Posted September 20, 2022 Author Share Posted September 20, 2022 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. Quote Link to comment Share on other sites More sharing options...
KSBWasHere Posted September 21, 2022 Share Posted September 21, 2022 Thanks, makes perfect sense. Quote Link to comment Share on other sites More sharing options...
DnK Posted May 12, 2023 Share Posted May 12, 2023 (edited) I always want to add this system and after I try a lot of ways of do it, and by the far, for the moment this is the best option i was try. Only took me some time to make it work, because i have the roms in a external HDD, and have other letter for it, and with this the script dont work. Is easy to fix only say to the script when need to do a change of letter. And when i fix that i have the problem that the gamepath set, have 1 minus character, i dont know why xD. Maybe you have the games in zip and mine are un 7z? Anyway, i has put the value in 4 and work well This is that i use to load games in diferent letters, and 7z files. Quote @echo off REM -------------------------------- REM Set these paths: set romfolder="H:\Roms\ScummVM" set scummvmfolder="C:\LaunchBox\ThirdParty\ScummVM" set zipfolder="C:\LaunchBox\ThirdParty\7-Zip" REM -------------------------------- cd %romfolder% h: %zipfolder%\7z.exe e %1 -o* set gamepath=%1 set gamepath=%gamepath:~0,-4% echo %gamepath% cd %scummvmfolder% c: scummvm.exe -c scummvm.ini --auto-detect --path=%gamepath%" h: rmdir /s /q %gamepath%" Any way, thanks a lot for the script and the idea to do this way, you has save me a lot of time. Edited May 12, 2023 by DnK Quote Link to comment Share on other sites More sharing options...
krof Posted April 30 Author Share Posted April 30 On 5/12/2023 at 7:45 AM, DnK said: Maybe you have the games in zip and mine are un 7z? Anyway, i has put the value in 4 and work well I believe you are correct! My files are all ".zip" files so using your adjustment would definitely be better for ".7z" (Specifically, this part:) set gamepath=%gamepath:~0,-4% Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.