theMK2k / MetropolisLauncher

A data-heavy Emulation & Gaming front-end for Windows
http://metropolis-launcher.net
Other
40 stars 3 forks source link

Add ScummVM platform #18

Closed lmills87 closed 7 years ago

lmills87 commented 7 years ago

Requesting addition of ScummVM platform

theMK2k commented 7 years ago

I looked a bit at ScummVM. It seems you can't just launch scummvm with the path to the game. So the generic launching approach wouldn't work here. This is not a problem, as MAME also doesn't work that way and is supported by Metropolis Launcher.

Another thing is, it seems ScummVM needs to:

Only after these steps, launching a ScummVM game is possible by providing the game's identifier for example:

With these observations, I would implement for Metropolis Launcher's Rom Manager an "import from scummvm.ini" which reads all entries within the ini and links them to MobyGames Metadata if possible.

A re-import would be possible too. Also this (re-)import could check for availability of the game paths given within the scummvm.ini.

theMK2k commented 7 years ago

Is there a use case where you need more than one version of ScummVM?

If so, would there be mutiple scummvm.ini files on the same system?

I'm asking, because MAME is currently only supported as one instance in Metropolis Launcher. I would treat ScummVM the same way. But if multiple instances are neccessary, I have to go a different route.

lmills87 commented 7 years ago

It is possible to launch games without them being added to the ScummVM GUI's game list first. See here.

The way that (I think) D-Fend Reloaded handles both ScummVM and DOSBox is by generating a dosbox.conf and scummvm.ini from the GUI's options somewhere in a temporary folder each time a game is launched, and then launching DOSBox and ScummVM with those temporary .ini files, respectively.

As far as needing more than one version of ScummVM... maybe. I could see how this could potentially be needed (if a particular game runs better on an older version of ScummVM or something to that effect. The same could be true of DOSBox (probably moreso a potential issue with DOSBox). DFR does allow the user to specify between the default DOSBox/ScummVM installation on a per-game basis, or using a custom DOSBox/ScummVM installation, as seen here:

ihancxd

theMK2k commented 7 years ago

About directly launching:

The forum post tells it works with: "C:\Program Files\Leisure Suit Larry\scummvm.exe" -f -p "C:\Program Files\Leisure Suit Larry" lsl1

My problem with this is: the lsl1 part at the end. There is no way for me to find out that a given instance is lsl1, atlantis, dig or whatever. So it seems I'll stick to the (re)import via scummvm.ini, this way it will be safe even for future versions and more supported games.

theMK2k commented 7 years ago

About multiple versions:

There's no issue with DOSBox as you can add multiple DOSBox instances to the Emulators collection, define global default instance and per-game default instance.

However, the game list for ScummVM in Metropolis Launcher will be tied to a single scummvm.ini so i thought it would be consequencial to only support a single ScummVM.

I won't do that and let the user add as many ScummVM instances he likes, because he could then also define different command line options, which would be better.

lmills87 commented 7 years ago

Additionally, here's a complete list of Game IDs.

The "Game Short Name" is the Game IDs which is used to start the game (in command-line fashion). I'm not sure if having this list may potentially change how you want to go about things. There aren't all too many games supported by ScummVM, so if you had these game IDs in a list, a user could simply choose the game that they're adding to apply the appropriate Game ID, or something similar.

theMK2k commented 7 years ago

A proper ScummVM Fullset is well over 700 games (incl. alternative languages). If I provide a list by myself I have to take care of updates, which is not the way to go. It's unfortunate that ScummVM doesn't provide a command-line based scan to let me know the short name of a certain game in order to launch it :(

lmills87 commented 7 years ago

In the readme, it states the following:

The short game name ('game target') you see at the end of the command line specifies which game is started. It either corresponds to an arbitrary user defined target (from the configuration file), or to a built-in gameid.

So the target can be defined in the config as "gameid" in the scummvm.ini file; e.g.:

[scummvm]
last_fullscreen_mode_height=1440
filtering=false
mute=false
speech_volume=192
native_mt32=false
mt32_device=null
enable_gs=false
last_fullscreen_mode_width=2560
talkspeed=60
midi_gain=100
subtitles=false
multi_midi=false
fullscreen=false
updates_check=0
gui_browser_show_hidden=false
browser_lastpath=L:\Games\D-Fend Reloaded\VirtualHD\Games\Beneath a Steel Sky\
gm_device=null
aspect_ratio=true
sfx_volume=192
music_volume=192
autosave_period=300
lastselectedgame=samnmax
music_driver=auto
opl_driver=auto
kbdmouse_speed=3
versioninfo=1.10.0git4103-g3382a32
speech_mute=false
gfx_mode=opengl

[samnmax]
description=Sam & Max Hit the Road (CD/English)
mute=false
speech_volume=100
talkspeed=85
path=..\VirtualHD\Games\Sam and Max Hit the Road (CD)\
subtitles=false
gameid=samnmax
language=en
output_rate=48000
sfx_volume=100
music_volume=150
music_driver=windows_SC-55
opl_driver=auto
speech_mute=false
guioptions=lang_English

Furthermore, I think that ScummVM _does_ provide a command-line based scan which outputs supported Game IDs as of that version.

-z | --list-games | Display list of supported games and exit

For some reason I cannot seem to get this to work. I've tried:

scummvm -z scummvm --list-games

In a command prompt, but nothing happens. Not sure what I'm doing wrong. I've posted on the forums about it.

theMK2k commented 7 years ago

Well, none of the "list" commands seem to output anything. By the looks of it however, list-games just lists (from an internal db?) but doesn't scan.

theMK2k commented 7 years ago

I'm currently still at the point providing an import by scummvm.ini, this would definitely work.

theMK2k commented 7 years ago

While we're at it: what exactly is the ScummVM support in D-Fend Reloaded? Does it support platforms other than DOS? As ScummVM doesn't need executables, how do you add ScummVM games to D-Fend Reloaded?

lmills87 commented 7 years ago

Like this.

You choose the game folder with the necessary files, and then from a drop-down box, the game is chosen. I'm guessing that this is so that the gameid can be applied to the command line launching of scummvm.

theMK2k commented 7 years ago

Thanks! That explains some of the open questions I had. Actually I didn't have the option "Add ScummVM profile" in the d-fend reloaded instance on my machine.

lmills87 commented 7 years ago

There is also a "wizard" which sets up the games in a more automatic fashion, but I never use it. The large database is only accessed if you use the wizard (which incurs a slight loading time), and D-Fend Reloaded also does not automatically download meta data for the games unless you tell it to connect to moby games to do so.

theMK2k commented 7 years ago

Alright, I dropped a post on scummvm forums. The situation is not ideal to say the least :)

theMK2k commented 7 years ago

Milestone reached: Import of ScummVM games from scummvm.ini implemented.

theMK2k commented 7 years ago

Milestone reached: Import from command line scan (ScummVM 1.10.0 necessary)

theMK2k commented 7 years ago

Milestone reached: Linking to MobyGames metadata of 300+ ScummVM game entries

lmills87 commented 7 years ago

Awesome. How does the command line scan work?

theMK2k commented 7 years ago

I do it this way:

x:\path\to\scummvm.exe --config="x:\path\to\temporary\scummvm.ini" --path="x:\path\to\scummvm\games" --recursive --add

This lets scummvm.exe recursively scan the games under x:\path\to\scummvm\games and saves them in a new, temporary scummvm.ini

The scummvm.ini gets scanned by the launcher and finally the entries therein get added :)

Mind you, this only works with v1.10.0 (currently not stable released)

theMK2k commented 7 years ago

Had the help from scummvm staff: http://forums.scummvm.org/viewtopic.php?t=14408

theMK2k commented 7 years ago

Interestingly the neccessary command line options have just been introduced to the current dev-branch of scummvm, else it wouldn't be possible. So, great timing there :)

theMK2k commented 7 years ago

Milestone reached: simple launching even with older scummvm versions, no scummvm settings though

theMK2k commented 7 years ago

I'm working on the ScummVM settings within Metropolis Launcher right now and could need some help:

the ScummVM Wiki site http://wiki.scummvm.org/index.php/User_Manual/Configuring_ScummVM#General_config_file_settings shows all possible config keywords. What I'm missing here are the default values for each. Any idea?

theMK2k commented 7 years ago

Milestone reached: over 60 options now configurable in the GUI with a template-based configuration system (like DOSBox)

theMK2k commented 7 years ago

Alright, we're at the point where a beta release for testing makes sense. Download here: https://mk2k.net/releases/pc/emu/metropolis_launcher_1.1.0b1-mk2k.zip

Just unpack and overwrite existing files. Your current database should not be affected.

theMK2k commented 7 years ago

ScummVM is now supported in v1.1.0