Is there any way to delay launching of a game with ScummVM?

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
lukeman3000
Got a warning
Posts: 29
Joined: Tue Mar 17, 2009 1:50 am

Is there any way to delay launching of a game with ScummVM?

Post by lukeman3000 »

Kind of an odd question, I know.

Basically, I'm looking for a way to delay the launching of a game by a preset amount of time (specified in seconds or milliseconds, preferably).

For example, DOSBox has an autoexec portion in which something like this is possible -- is there anything similar with ScummVM?

digitall
ScummVM Developer
Posts: 1040
Joined: Thu Aug 02, 2012 1:40 pm

Post by digitall »

Why do you want to do that?

I think unless there is a specific technical reason why this feature would need to be internal to ScummVM, then we would say that you should implement this using an Operating System specific script i.e. bat/scr file for Windows or Unix Shell for OSX / Linux.

For Linux, this would do whatever you need to start first, then call the sleep function, then call ScummVM...

lukeman3000
Got a warning
Posts: 29
Joined: Tue Mar 17, 2009 1:50 am

Post by lukeman3000 »

digitall wrote:Why do you want to do that?

I think unless there is a specific technical reason why this feature would need to be internal to ScummVM, then we would say that you should implement this using an Operating System specific script i.e. bat/scr file for Windows or Unix Shell for OSX / Linux.

For Linux, this would do whatever you need to start first, then call the sleep function, then call ScummVM...
I'm using a frontend called D-Fend Reloaded to launch all of my games. I need to be able to delay the launching of a game by x seconds in order to make sure that the MT-33 emulator (which launches simultaneously) is fully initialized before the game begins, otherwise, the sound can be messed up.

I know I can use a batch file or AutoHotkey script to do this, but, unfortunately, I lose the ability to tweak the game from the D-Fend Reloaded GUI because I will have to use a manually-generated .conf if I do it this way. That just means I have to edit the .conf directly when I want to change options instead of being able to change them within DFR itself. Not a huge deal, just a matter of convenience.

User avatar
scarmona
Posts: 28
Joined: Sun Jun 03, 2012 11:09 pm
Location: Toronto, Canada

Post by scarmona »

While I do get your point on getting a delay before starting the game using D-Fend Reloaded, that is a graphical environment for DosBox, right? Why do you need to use it with ScummVM which already has a graphical UI?

There is already an automatic delay when it's required in some games with MT-32 emulation enabled in ScummVM, so if the game is properly supported and you have the right files in place, the sound will be properly reproduced.

lukeman3000
Got a warning
Posts: 29
Joined: Tue Mar 17, 2009 1:50 am

Post by lukeman3000 »

scarmona wrote:While I do get your point on getting a delay before starting the game using D-Fend Reloaded, that is a graphical environment for DosBox, right? Why do you need to use it with ScummVM which already has a graphical UI?

There is already an automatic delay when it's required in some games with MT-32 emulation enabled in ScummVM, so if the game is properly supported and you have the right files in place, the sound will be properly reproduced.
Good questions.

Well, for starters, with DFR I can group all of my favorite DOS-era games into a single, visually-appealing interface. I can set icons for each game which really makes the game selection menu very aesthetically pleasing. DFR has a multitude of features that I enjoy, but I'm using it primarily because I can launch DOSBox, ScummVM, and even Windows games from the same interface.

As it relates to MT-32, you would be correct if I was using ScummVM's internal Munt emulation. However, I am using Falcosoft Munt VSTi. It has advantages over standard Munt which I cannot remember off the top of my head, but Falcosoft detailed them for me in a certain post over on the VOGONS forums if you are interested. Suffice to say that using Falcosoft to emulate Munt (as well as Sound Canvas VA) provides the best possible sound experience outside of using the real hardware.

Since ScummVM doesn't inherently know that I'm using external Munt emulation, I have to find another way to provide adequate delay so that Falcosoft can fully initialize before the game is launched.
Last edited by lukeman3000 on Mon Aug 14, 2017 5:35 pm, edited 1 time in total.

User avatar
scarmona
Posts: 28
Joined: Sun Jun 03, 2012 11:09 pm
Location: Toronto, Canada

Post by scarmona »

I see and stand educated :)

I guess it's back to Digitall's solution then.
Can you post your experience and maybe some screen shots of your D-Fend Reloaded configuration on the General Discussion forum maybe? You got me curious now

lukeman3000
Got a warning
Posts: 29
Joined: Tue Mar 17, 2009 1:50 am

Post by lukeman3000 »

scarmona wrote:I see and stand educated :)

I guess it's back to Digitall's solution then.
Can you post your experience and maybe some screen shots of your D-Fend Reloaded configuration on the General Discussion forum maybe? You got me curious now
Sure. I've been working on this collection for quite some time now. It's not so much about the games that I have (although I have around 40-50 or so), but it's about having them all in one place, with an aesthetically-pleasing menu, ease of use (simply double-click the game to play - no additional work needed), and high degree of portability (all paths are relative - no install required). Only loopMIDI needs to be installed to enable Falcosoft to work properly for Munt and SC-55 emulation.

Additionally, each game is being painstakingly configured to optimal settings, such as CPU cycles, graphics render modes (pixel perfect patch which gives perfect pixel aspect ratio and aspect ratio), and etc. A bunch of little things which 90% of people probably don't care about lol. It also involves a lot of custom batch files to make all of this work with as little effort from the user as possible. DFR is also not 100% compatible with newer builds of ScummVM so there is a little trickery that must be used to get it to work in this respect as well.

At the end of the day, I'll have a nearly 100% portable collection of my favorite DOS era games, preconfigured to run as good as they possibly can with respect to emulation.

User avatar
Raziel
ScummVM Porter
Posts: 1172
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet

Post by Raziel »

@lukeman3000

I hope you made backups...think about a hardware crash after all those work...

Post Reply