VOGONS


VDMS from other apps

Topic actions

  • This topic is locked. You cannot reply or edit posts.

First post, by The_Mega_ZZTer

User metadata
Rank Newbie
Rank
Newbie

This isn't a development topic exactly, but I believe it is more technical to warrant the General secion, but if any of the mods feel otherwise feel free to move my topic.

I am making a program that serves as a frontend for a few of my favorite games... one of which is a DOS game (Dark Forces) that does not work properly on my XP system without VDMS... and it works best with a VDMS Launchpad profile (I haven't figured out the appropriate settings I need to set in VDMS.INI to get it to be equivilent to the VDMS Launchpad config for this program.)

Anyways, I want my program to be able to execute the VDMS Launchpad shortcut for Dark Forces. However, I cannot seem to do it any way other than double clicking the shortcut from inside Windows Explorer... I did a little digging and I believe it's because the Launchpad DLL itself handles the context menu for it's shortcuts, and thus the double click on the file...

So, I don't know how I would have my program start it. I'm sure there is a DLL call I could make to do it (rundll32.exe launchpaddll etc etc) but I don't know what to do, or even if that's the only way. Any help or information I could be given would be appreciated.

(Also please e-mail or IM me if you have a solution to my problem as I may forget all about this thread in the next few days... 😀)

[Edit: Silly me, I hate the "watch topic for replies" option so much I never use it. Never mind, don't e-mail or im me, just post... 😀]

Thanks in advance for any help!

http://www.mzzt.net/

Reply 1 of 12, by Reckless

User metadata
Rank Oldbie
Rank
Oldbie

You are going about it the wrong way I'd say.

Launchpad is itself a wrapper around the command line tools of VDMSound. You should therefore concentrate on the command line switches/environment setup of running dosdrv.exe in your shell.

Here's an example run which is a summary of what Launchpad does...

Creates an ini file (~VLP6599.INI) with the following config:

[*.debug]
detail=0
file=C:\Program Files\VDMSound\VDMS2.LOG
[VDMServicesProvider]
CLSID=VDDLoader.VDMServices
[VDMServicesProvider.config]
fixPOPF=1
[MPU401Controller]
CLSID=EmuMPU401.MPU401Ctl
[MPU401Controller.debug]
detail=0
[MPU401Controller.config]
port=0x330
IRQ=2
[MPU401Controller.depends]
VDMSrv=VDMServicesProvider
MidiOut=MIDIPlayer
[MIDIPlayer]
CLSID=MIDIDevice.MIDIOut
[MIDIPlayer.debug]
detail=0
[MIDIPlayer.config]
device=-1
[MIDIPlayer.depends]
MidiOut=SysExIndicator
[SysExIndicator]
CLSID=MIDIIndicator.ActivityLights
[SysExIndicator.debug]
detail=0
[SysExIndicator.config]
led=scroll
[DMATransferManager]
CLSID=DMAController.TransferMgr
[DMATransferManager.debug]
detail=0
[DMATransferManager.config]
minDMAPeriod=5
maxDMAPeriod=15
[DMATransferManager.depends]
VDMSrv=VDMServicesProvider
[SBController]
CLSID=EmuSBCompat.SBCompatCtl
[SBController.debug]
detail=0
[SBController.config]
version=4.05 (SoundBlaster 16)
port=0x220
IRQ=7
DMA8=1
DMA16=5
[SBController.depends]
VDMSrv=VDMServicesProvider
DMACtl=DMATransferManager
AdLib=AdLibController
WaveOut=SBWavePlayer
[SBWavePlayer]
CLSID=DSoundDevice.WaveOut
[SBWavePlayer.debug]
detail=0
[SBWavePlayer.config]
Show last 35 lines
device=-1
buffer=75
[SBWavePlayer.depends]
[AdLibController]
CLSID=EmuAdLib.AdLibCtl
[AdLibController.debug]
detail=0
[AdLibController.config]
port=0x388
sampleRate=44100
oplMode=opl3
[AdLibController.depends]
VDMSrv=VDMServicesProvider
WaveOut=AdLibWavePlayer
[AdLibWavePlayer]
CLSID=DSoundDevice.WaveOut
[AdLibWavePlayer.debug]
detail=0
[AdLibWavePlayer.config]
device=-1
buffer=75
[AdLibWavePlayer.depends]
[JoystickController]
CLSID=EmuJoystick.JoystickCtl
[JoystickController.debug]
detail=0
[JoystickController.config]
port=0x201
minCoord=5
maxCoord=250
pollPeriod=125
mapFile=C:\Program Files\VDMSound\joy2.map
[JoystickController.depends]
VDMSrv=VDMServicesProvider

Creates an autoexec.nt file (~VLP5A9D.NT) with the following content:

@ECHO OFF
LH %SYSTEMROOT%\SYSTEM32\DOSX
C:\PROGRA~1\VDMSound\dosdrv.exe "-i:C:\DOCUME~1\adam\LOCALS~1\Temp\~VLP6599.INI"

Creates a config.net file (~VLP6599.NT) with the following content:

DOS=HIGH,UMB
EMM=RAM
DEVICE=%SYSTEMROOT%\SYSTEM32\HIMEM.SYS
FILES=40

It also creates a shortuct to the target file which is then executed. I'm not exactly sure how this is created/used but the source is available for you to examine. As you can see Launchpad is 'just' an add-on for VDMSound albeit a rather cool one!!

Hope that helps!

Reply 3 of 12, by The_Mega_ZZTer

User metadata
Rank Newbie
Rank
Newbie

Well I'm running into a couple problems... my program is going to be able to dynamically generate and execute a batch file like this:

@echo off
C:\Winapp\VDMSound\dosdrv.exe "-i:C:\WinGame\Jedi Knight\Uber Jedi Suite\DarkForces.VDMS.INI"
c:
cd \dosgame\dark
dark.exe -shots

However dosdrv gives me an "Unhandled error" when I use the -i parameter, and gives me error code 0xff (wtf?)... yes the file does exist, I used a tool to copy the full path of it and pasted it right in. The file contents are the same as what you posted, with the exception that I changed the [*.debug] file to file=VDMS.LOG.

I am guessing that the config file you posted is not the default VDMSLaunchpad one, and thus might cause problems with some system configurations...?

Where does VDMSLaunchpad store the ~*.INI files when it creates them? I could probably fix my problem by obtaining a ready-made config...

I am trying to search for it, but Windows feels the need to search all the network computers even though I specifically told it not to. Goooo XPSP2....

[Edit: I can't find the INI file VDMSLaunchpad creates (yes the program was still running whileI searched.]

http://www.mzzt.net/

Reply 5 of 12, by The_Mega_ZZTer

User metadata
Rank Newbie
Rank
Newbie

I tried 8.3 paths, it didn't work.
I don't need to load DOSX, it loads fine when I don't use the INI. And there is an option in VDMSLaunchpad to not use DOSX, which implies VDMS works without it.

[Edit: AHA, dunno HOW I missed it before, but I found an error message in the log...

@W - 06:23:04.515 - AdLibController
Could not obtain the setting 'oplMode'; using a default value of OPL2
instead. Description follows:
0x80004004 - Operation aborted
Could not locate the configuration property 'oplMode' in either of
the [AdLibController.config] or [*.config] INI sections (see
C:\WinGame\JediKn~1\UberJe~1\DarkForces.VDMS.INI:68).

I'll try copying this value from the default VDMS config...]

[Edit: It seems this value is missing from the default VDMS config as well! Well it didn't fix it... I suspected that after I read the error more closely. I'll try commenting stuff out of my custom INI until it works to figure out what's causing the problem. 😉

WTF? It seems there are TWO unhandled errors. One appears to come from the Joystick section, one from the adlib section (it only loads correctly once both sections are gone).

GAH. Turns out it was because the joystick map file pointed to a file that didn't exist... 🙁 It all works now tho. 😀]

http://www.mzzt.net/

Reply 6 of 12, by vladr

User metadata
Rank Oldbie
Rank
Oldbie

you should be able to run a .vlp file by either calling into the Shell API execut or whatevre it's called, the shell will automatically figure out the Open" command for it and invoke the DLL, or by spawning "start blabla.vlp" from your app (does the same thing.)
V.

Reply 7 of 12, by noabody

User metadata
Rank Newbie
Rank
Newbie

How to run VDMS .vlp from command line.

I noticed a few people are trying to execute the .vlp shortcut from a command prompt in Windows XP. I found this post about using shell execute which does not work from either the command line scripting host or windows scripting host (cscript/wscript). Here is the relevant visual basic code:

Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "tomb.vlp"

You can see I'm trying to run the Tomb Raider .vlp . I created a batch file as part of an install that checks for the presence of DAEMON tools, installs or runs it to load a bin/cue of the Tomb Raider disc (so the audio tracks will work without the real CD in a drive). Checks for the presence of VDMsound and installs as necessary. Checks for the presence of a Tomb Raider install in %SystemDrive%\TOMBRAID\ and runs the tr1setup program as required. And finally runs the tomb.vlp shortcut.

The ShellExecute function has to be right because it's essentially the same as the Windows Run menu. The only thing I could figure is that the code actually needed to be run from inside of a window. By sheer luck I discovered a fairly simple way to open a window and run the code to get the game to run from a batch file.

Here are the contents of my TR1.hta file. The HTA extension means HTml Application:

(head)
(title)TR1 Launch(/title)
(HTA:APPLICATION
APPLICATIONNAME="TR1 Launch"
SCROLL="no"
SINGLEINSTANCE="yes"
WINDOWSTATE="minimize"
)
(/head)

(script language="VBScript")
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "tomb.vlp"
(/script)

(body)

(/body)

I'm handy with command line scripting but not HTML or Visual Basic. The above was put together from simple snippets of code I found on the internet and guesswork. Hopefully this will help someone. I can't really post HTML code into this forum so do a find/replace and convert ( to < and ) to > for the real thing.

Attachments

  • Filename
    TR1.rar
    File size
    282 Bytes
    Downloads
    1067 downloads
    File comment
    I have attached the code in rar file.
    File license
    Fair use/fair dealing exception

Reply 11 of 12, by Reckless

User metadata
Rank Oldbie
Rank
Oldbie

It may not be exactly the same as I don't have a rig to try it on but on my PC 😉 an exception is generated when executing a VLP file from the command line:

start sciv.vlp
"Unhandled exception in cmd.exe"

If I just execute sciv.vlp then another console window is opened and the game executes but then when closing the game, the main console dies with the same error.

Anyways, it's VDMSound which hasn't got a huge future so wheel out a copy of DOSBox instead 😁 For the few games you need/want to use VDMSound for it's no great hardship to run them from Windows shortcut?!

Reply 12 of 12, by noabody

User metadata
Rank Newbie
Rank
Newbie

When I run tomb.vlp from the command line a process called dumprep.exe get's 100% processor utilization. Microsoft Knowlege Base article 899870. Suggests that this is "caused by hardware issues or damaged registry entries". Don't recall ever seeing a dumprep issue before but this computer hasn't seen a clean reinstall of WinXP in over two years. The virus and spyware scans come up clean. I used the Tomb Raider Advanced installer to setup the game with dgVoodoo 1.40+ and VDMSound on IRQ 7.

Like I said, everything works ok when I run the shortcut from a "window". I suppose I should load TR1 up on another computer and see what happens.

Edit:
Finally tried this out on a P4 1.6Ghz Pavilion laptop and same result more or less. The batch command "start" causes the computer to come up with a message that the program has been terminated to prevent damage to the computer or something like that. Anyway, I've tested the HTA solution on three computers now and it's worked like a charm. The final testbed was an Athlon 900Mhz.