Tomb Raider Forums  

Go Back   Tomb Raider Forums > General Forums > Technical Support

Closed Thread
 
Thread Tools
Old 23-12-08, 01:13   #1
gidierre
Grease Monkey
 
gidierre's Avatar
 
Joined: Nov 2007
Posts: 1,644
Default Restoring use of dgVoodoo - Tomb Raider 1 under Windows Vista

I finally came up with a working solution to the problem of sapucdex failing under Windows Vista.


Quick start for Windows Vista users (XP users read section 1.1 below)
-----------

1. Extract all files from ssdh.zip (see below for download link) to the TombRaider folder, usually c:\tombraid

2. Run install.bat

3. To play, provided the TR cdrom is in the drive,
- run Play TR1.bat for TombRaider 1 or
- run Play TR1 Gold.bat for TombRaider 1 Unfinished business

--------------------------



Windows NT/2000/XP's default MSCDEXNT emulation for cdaudio does not support many functions that DOS programs (like Tomb Raider 1) require, hence Windows NT and later do not route CD commands to Windows, and CD audio will not be played.
Sapucdex was made as MSCDEXNT replacement to route the correct DOS commands from the game to Windows' sound system.

Enter Windows Vista and Sapucdex itself, the replacement, needs replacement, because it can't route the cdrom commands, like play, pause, stop etc., from DOS (i.e. the game) to Windows and again it falls back to no chance to play cdaudio tracks music.

Ssdh which is going to be discussed here in its turn is aimed to restore this DOS cd audio playing capability lost in the Vista era.

By way of a quick account :
it necessarily resorts to using MCI functionality
(Windows Multimedia Media Control Interface : http://msdn.microsoft.com/en-us/libr...79(VS.85).aspx)
to make for needed cdrom access, which previously Sapucdex used to accomplish via the so called ioctl_cdrom structures (for input/output control), now apparently to be considered as deprecated, according to MSDN's own docs
e.g. : Obsolete, beginning with the [sic!] Windows Vista. Do not use this IOCTL to develop drivers in Windows Vista
as per http://msdn.microsoft.com/en-us/library/ms804546.aspx.

Now since sapucdex used to be taken advantage of by dgVoodoo, the free Glide wrapper by Dege who together with VDMSound would let WinXP machines to run smoothly TR1 (nicer looking Glide version) with music and everything, under Vista dgVoodoo had now become practically useless for want of music reproduction, and prone to extinction, even as visual features are still viable,
so the new MSCDEXNT replacement's replacement regains the chance to use dgVoodoo (with VDMSound and possibly via the TR1 Advanced Installer too) to be able to play Tomb Raider 1 and 1 Gold aka Unfinished Business under Vista as well

1.
WHAT CAN THIS PROGRAM DO FOR YOU

Ask not what this program can do for you—-ask what you can do for this program.
You can provide for it and give it a safe haven, nourishment and a fair chance to exert its full-fledged potential, IOW :
what is your Windows version?

1.1
WINDOWS XP
(successfully tested under XP Home SP3)

if it ain't broke...
actually sapucdex/VDMSound/dgVoodoo all run smoothly under XP. Me, I just had to try ssdh out all the same, and finally see it work, but why should you bother to try too ? Sometimes I really don't understand you.

If you do insist, just drop both ssdh.exe & ssdh.dll into the folder where sapucdex exe/dll have been dwelling smug for years, usually c:\tombraid, and assuming VDMSound, dgVoodoo and Tomb Raider are alreay installed preferably via the TRAdvancedInstaller, now you have 2 ways to run TR1/TR1 Gold w/ssdh, a hard and an easy one
(don't follow the previous Quick start instructions - Install.bat to use under Windows Vista only)

1.1.1
the hard one first

at the prompt in C:\tombraid , type (hitting Enter after each) :

dosdrv
dgvesa
ssdh
tomb


if it's TR1 Gold replace tomb with tombub,

or (I know, this ought to be 1.1.1.2 now ) you can make a plain tomb.bat file or tombub.bat doing the same without having to type it all every time.
Batch files, that's it. You know how to make you one, don't you. Well if you don't, tell me and it'll be very easy to add some simple no-brainer instructions here.
Or to post a link to two ready-made batch files, no other than the ones which I'm actually using myself , one for launching TR1 and the other for TR1Gold.

EDIT:
these two batch files are now present in the updated zip (see download link below)
and I called them "Play TR1" and "Play TR1 Gold",
while "Install.bat" in there is intended for convenience of Vista users only.



image (incidentally from a Vista, and not a XP run) of bat-file execution transfixed between ssdh and tomb stage (bat-screenshot taken bat-hitting the bat-printscreen key, after which my bat-keyboard bat-kaput )

1.1.2
the easy one is just via your good old VDMSound shortcut, that eye-catching .vlp file with the TR1 icon, you'll have to right click, go to properties tab-> VDMS Launchpad Advanced Settings-> DOS Environment-> AUTOEXEC.BAT-> Additional options :



where it reads, or should read, c:\tombraid\sapucdex.exe let it be aware it's got to be c:\tombraid\ssdh.exe, save and you're done.

1.2
WINDOWS VISTA
(successfully tested under Vista Home 32bit SP1)

see Quick start for Windows Vista users above


now that's what this is all about.

First of all, a previous if incomplete short primer I had already written here
http://vogons.zetafleet.com/viewtopic.php?t=6225 on page 15, message dating from 2007-11-22 @ 05:16 pm

Contrary to earlier reports and to what is still to be read all around the net, the assumption appears to be made up out of thin air that VDMSound and dgVoodoo won't work anymore under Vista, period : if they are installed, you run them at the command line and the dreadable no full screen crash won't pop up

copy ssdh.exe and ssdh.dll to c:\tombraid

move the relevant dll files for glide (glide2x.dll) and ssdh (ssdh.dll) from c:\tombraid to \windows\system32 folder

copy the vdmsound one (vddloader.dll) from c:\program files\vdmsound to \windows\system32 folder, so one copy of vddloader.dll stays in c:\program files\vdmsound, while presumably in c:\tombraid there should never have been one vddloader.dll file anyway (thanks Chug a Bug!)

(ssdh.exe can safely stay in \tombraid)

run dgVoodoosetup to let it look up the right path for glide2x.dll (dos tab)
and in the vesa tab enable "Use built in VESA support".

then you can get back to 1.1.1 up here (a-ha! I knew I'd get you there, confess to it, you had already forgotten about it, or never even read that didn't you) and follow through except....
you have no 1.1.2-like option here or it's all going to cave in on you and you'll see, if not the fatal BSOD, all the darn thing crash and burn.
So do me a favour and stick with 1.1.1.

To try it, here's the download link :


http://www.2shared.com/file/4621777/.../S__S_D_H.html


password : tombraider

Note that of the three batch files in the zip (namely Install, Play TR 1 and Play TR1 Gold: check the readme)
Install.bat is there just for the sake of user-friendliness under Vista.
Otoh Play TR 1 and Play TR1 Gold are both XP and Vista compliant.


Use it and kindly report, either if it works or if it doesn't flop in the least for you.
Come back with any other kind of response and the consequences of that could be disastrous (Doc Emmett Brown).
Particularly for me.

Have fun.

Don't ever lesnerize.


EDIT

this version of ssdh.dll has logging messages enabled which means that
each time you run it it creates a log file, either called c:\sapucdex.log or c:\tombraid\ssdh.log
depending on whether the dll file was built by me before or after... I noticed I'd been dumb enough to forget to edit the relevant line in the code

since it can quickly grow to eat up hundreds of KB if you play frequently and/or for a long time pretty soon I'll recompile, and link to, a new one without the log file making, which after all only serves a testing purpose

if you don't want any log files hanging around, you can delete c:\sapucdex.log, or c:\tombraid\ssdh.log, right away
or take a look at it

an interesting info comes from the recurring couplets of
Quote:
23:41:38.292 DEVICE_STATUS, STATUS = 0300, CF = 0
23:41:38.307 AUDIO_Q_CHANNEL_INFO, STATUS = 0300, CF = 0
23:41:42.260 DEVICE_STATUS, STATUS = 0300, CF = 0
23:41:42.260 AUDIO_Q_CHANNEL_INFO, STATUS = 0300, CF = 0
etc.

about every 3.9 seconds these check the status and CF parameters
where normally
CF (carry flag) should be = 0
while 1 means error

and status ought to equate = 0300, that is 0300h = 0200h (busy) + 0100h (done)
while all values like 81xx (8100 and above) e.g.: 81ADh spell trouble


----------------------

Discardable matters from here on.

2.
WHAT'S IN A NAME? THAT WHICH WE CALL A CDROM

damncdex.dll, that's what I should have called it!
As my old and sagging Visual C++ version is about 0% Vista-compliant, I had to become your human macro :
insert my shrewd code manipulations, compile and test with my XP machine, if it's any good, quick jump to the usb flash drive, flip it to the other PC, the Vista machine...
what's going on ?
oh no please, not another deafening sound of silence rerun, I only ask for some music to play.

I'll admit that I adore Groundhog day
http://www.imdb.com/title/tt0107048/
but enough is enough.

Now testing is over for me. Then again, damncdex.dll as I learned could constitute a pretty serious capital offense in 87 countries around the world.

I then thought of
It's a small step for mankind--a giant leap for a man.dll
but no, it dawned on me this might be not fully compliant with some systems using the filename 8.3 convention, what's more it could have turned by design into a ITSASM~1.dll, and whoa, ssdh.c is no .ASM file, not at all : ssdh.asm is, but ssdh.c is a C file isn't it (<- if that hasn't set you ROFL, you just have no heart, I say, and I'll quit playing with you)

OTOH
I thought mci_cdex.dll was just too true to be good.

In the end I felt it had to be ssdh. That's it.
Thank you.

P.S.
Ask what that ssdh thing stands for finally? Man, that's so curious of you.
Why, that's the acronym from so sagt die Hex, it's German, a quotation from Goethe's Faust, Part 1, it means: so says the witch (which old witch? The wicked witch!), from the Witch’s Kitchen mise-en-scène, you know, the Magic Square evocation...
http://mathsforeurope.digibel.be/Magic2.htm (halfway through)

have no clue what I'm talking about ? And you call that a life which you are living!
Anyway the big, dull deal about it is of course die Hex (German: witch) vs. the hex(adecimal) numbers. Dislike it ? Pal, are you hard to please!

Other than that, soSagtDieHex is an alternate nick of mine that I love and I've been using lately, and I wish so bad I could ditch my old gidierre one, I've grown so fed up with by now, for it...

3.
EASTER(N) EGG

You run it 666 times and it'll land you on top of the mountains of Ararat.

4.
A LIDDLE RINGERS... A RING-A-£|@#... A RIDDLE LINGERS

Now that all is said and done (until next blue screen of death) and my tears subside, a riddle keeps haunting me :
will this stuff still work under future OS versions, like Windows 7+ ? or under 7up ?

Well, uhm...
"Have you guessed the riddle yet?" the Hatter said, turning to Alice again.
"No, I give it up," Alice replied. "What's the answer?"
"I haven't the slightest idea," said the Hatter.
"Nor I," said the March Hare.
Alice sighed wearily. "I think you might do something better with the time," she said, "than wasting it in asking riddles that have no answers."


5.
TECHNICALITIES MUMBO-JUMBO

since this part about the ssdh code concoction probably runs the risk of going pretty gobbledygook, those interested and willing to contribute are referred to browse the relevant thread at the Vogons Forum,
skipping over to the technicalities paragraph at the bottom over there:
Re: A glide wrapper for DOS programs - part deux (dgVoodoo) :: 2008-12-23 @ 03:57 am
http://vogons.zetafleet.com/viewtopic.php?p=147504

But if someone wants, let me know and I can easily append some detailed info right here.
Thank you.

P.S.
All this was prepared long ago in this thread :
http://www.tombraiderforums.com/showthread.php?t=111264

(quick updated
http://www.tombraiderforums.com/showthread.php?t=138122)

when it first occurred to me I might as well start searching for a workaround myself.

Last edited by gidierre; 14-01-09 at 23:55.
gidierre is offline  
Old 23-12-08, 07:30   #2
EscondeR
Member
 
EscondeR's Avatar
 
Joined: Jan 2005
Posts: 51,185
Default

1. Downloaded.
2. Will be tested under WinXP SP3 (x64 also), WinServer2003, Vista Ultimate SP1 x64 till the end of this week. Under Windows 7 later...
3. Truly awesome

4. And yup... Don't circumvent the censor next time Just type "****ing" and it'll be asterisked as here


EscondeR is offline  
Old 23-12-08, 11:03   #3
Drone
Member
 
Drone's Avatar
 
Joined: Nov 2007
Posts: 37,470
Default

thats cool. I'll try it later

Drone is offline  
Old 24-12-08, 10:35   #4
gidierre
Grease Monkey
 
gidierre's Avatar
 
Joined: Nov 2007
Posts: 1,644
Default

Thanks for trying it.

Thanks Esconder for stickying it. (a new English verb ?)
Sorry for the *** censorship issue, I promise I won't be using such profane words as ***, or **** (uh-oh, foolish me, I just did, sorry) any further. No more **** four-letter words !
(If I use Italian expletives, will the learned let it pass ?)

I have no clue about the non-x86 system, it will be interesting to try,
although in a way it shouldn't be out of reach, chalk that up to the advantage of going win-native mci, I guess, hopefully allowing for a certain longevity, once the dos interrupts to windows gaps are bridged, and (some of the) ioctl calls had their show stolen by mci members taking over.

Ditto for Win7 or 77 (perhaps I won't be with you by then, I have a gloomy premonition about it, but I swear I'll bequeath this guardianship onto you)

yes, even for a skilled, experienced time traveler such as I provably am
http://vogons.zetafleet.com/viewtopic.php?t=18243
it's hard to tell

curiously, only after finishing this chore, I had a look at TR 2 (a Windows game, in fact) and saw it just relies on MCI too! :cranking up:

****, by a quick glance at the disassembler and then fetching an old remark by KMO @vogons (as he was talking about his great TR1 Audiopack for Glidos):

Quote:
Turns out TR2 is using a totally different API - makes sense, as it's now a Windows app. Instead of MSCDEX, it's using Windows MCI. This deals with the blocking for them - they just don't set the MCI_WAIT flag on the MCI_PLAY call, and it does its stuff in the background.
I think I'm going to have to assume that the CD stalls aren't easily resolvable with MSCDEX - if they were, I imagine Core would have done so.
(btw I didn't use that WAIT flag either, not because I'm such a mastermind, but because +/- serendipitously I understood it really has to be so)

what I'm trying to say is,
these hacks and more than to my little ssdh, I'm hinting at those wonderful glide wrappers (Glidos, dgVoodoo and Dosbox too in many ways),
all these hacks concur to grant Tomb Raider 1 a portability of sorts that makes it flush, even, parallel to Tomb Raider 2!

What do you think ? I had never thought of it this way, so far

Last edited by gidierre; 24-12-08 at 13:56.
gidierre is offline  
Old 24-12-08, 10:45   #5
Chug a Bug
Member
 
Joined: Feb 2005
Posts: 1,541
Talking

Bloody awesome mate! I'm off to visit relatives shortly for xmas so won't have access to my PC until the weekend at the earliest, will have a test then. Ciao!
Chug a Bug is offline  
Old 29-12-08, 22:16   #6
Chug a Bug
Member
 
Joined: Feb 2005
Posts: 1,541
Default

Ok this is technically a double post but since it's been nearly a week since I last posted I figure it's ok...

...otherwise no-one is going to notice this post, yes? Anyway..

Ok here we go! Let me say first of all, it works! This is an awesome piece of work! Well done!

Well, it works in 32bit Vista Ultimate sp1 at any rate. Just tried Vista 64bit Ultimate, and as expected it doesn't work. It doesn't even get past dosdrv it just reports an error "dosdrv.exe is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32bit) or x64 (64-bit) version of the program, and then contact the software publisher." dgVesa reports the same message. So it's a no-go.

Everything else worked as you said, the only odd thing was I had to copy (no, not move) vddloader.dll to %systemroot%/system32 Thats right, theres a copy in /VDMsound and /system32. Strange, eh? Otherwise I get errors...

Anyways, to anyone unsure of what to do get TR1 working with dgVoodoo and Vista 32bit here are the instructions-

1) Download and install VDMsound 2.10. Reboot.

2) Download and install the Advanced TR Installer (TR1setup.exe). Choose dgVoodoo 1.40 as the version. Do not choose the option to create an desktop shortcut.

3) Download ssdh.zip. Unzip the files.

4) Drag and drop ssdh.exe to C:\Tombraid and ssdh.dll to C:\windows\system32

5) Drag and drop glide2x.dll from C:\Tombraid to C:\windows\system32

6) Copy (not move) vddloader.dll from c:\program files\vdmsound to c:\windows\system32 (so theres a copy in both folders)

7) Open dgVoodooSetup if you havn't opened it already (C:\tombraid\dgVoodooSetup > click it) - on the right hand side click the "search" button - point it towards c:\windows\system32\glide2x.dll. Buttons are now no longer greyed out? Good, you've found it. Click the "DOS" platform > click the "VESA" tab> tick "Use built in VESA support". Click "ok".

8) Make a batch file in the folder C:\Tombraid -

dosdrv
dgvesa
ssdh
tomb

create a shortcut to it on the desktop if need be.

And you're done.

NOTE: if you create a .vlp desktop shortcut with TR1 Advanced Installer it's not going to work. Ok?

Last edited by Chug a Bug; 30-12-08 at 23:52. Reason: Updated information!
Chug a Bug is offline  
Old 29-12-08, 23:10   #7
gidierre
Grease Monkey
 
gidierre's Avatar
 
Joined: Nov 2007
Posts: 1,644
Default

Quote:
Originally Posted by Chug a Bug View Post
Everything worked as you said, the only odd thing was I had to copy (no, not move) vddloader.dll to %systemroot%/system32 Thats right, theres a copy in /VDMsound and /system32. Strange, eh? Otherwise I get errors...
very, very interesting annotation, thank you very much

in fact if vddloader.dll is absent in \program files\vdmsound
there is an instantiation error that reads:

Unable to instantiate emulation module 'VDMServicesProvider'
error # 80040154


pointing to: vdms.ini:66

so I went and checked it and and what's with that in the .INI @line 66?
The path (line #66) has been registered on vdmsound installation and can't be overlooked!
See:

Quote:
[*.config] ; Add here settings common to all modules
;--------------------------------------------------------------------------------------------------------
; This provides VDM services such as hooking I/O ports, manipulating registers and memory, etc.
;--------------------------------------------------------------------------------------------------------
[VDMServicesProvider]
CLSID = VDDLoader.VDMServices
Path = VDDLoader.dll
this is important
accordingly in the wide-ranging general windows PATH parameter (at the prompt: PATH= + Enter)
there has to be the C:\Program Files\VDMSound; entry, if it is installed

IOW as you have shown, vddloader.dll doesn't have to be in c:\tombraid but, as opposed to glide and ssdh dll, should stay in its registered path where vdms.ini expects it to be, besides being within system32 too together with glide and ssdh, because of Vista's demand

(actually if you click through that instantiation error message box, it eventually loads, apparently via the %systemroot%\system32 default, only it appears to take ages...)
as regards the reason why no such error had occurred to me as I was testing, it would appear to arise from the very simple and primeval fact that... I had been having that [bl**ping] file in vdmsound folder too all along! :/

thx again for your help , I'm editing the relevant part


Quote:
Originally Posted by Chug a Bug View Post
Make a batch file in the folder C:\Tombraid -
dosdrv
dgvesa
ssdh
tomb
or tombub for TR1 Gold

Last edited by gidierre; 30-12-08 at 02:09.
gidierre is offline  
Old 31-12-08, 10:04   #8
gidierre
Grease Monkey
 
gidierre's Avatar
 
Joined: Nov 2007
Posts: 1,644
Default

Quote:
Originally Posted by Chug a Bug View Post
Well, it works in 32bit Vista Ultimate sp1 at any rate. Just tried Vista 64bit Ultimate, and as expected it doesn't work. It doesn't even get past dosdrv it just reports an error "dosdrv.exe is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32bit) or x64 (64-bit) version of the program, and then contact the software publisher." dgVesa reports the same message. So it's a no-go.

thx for testing

so, for sure not unexpectedly, it's dosdrv & dgvesa in as much as 16 bit stuff that will crack up

if/when you have time to check:

is there a Win9x/XP/32bit layer compatibility mode of sorts under Vista64 ?
Although probably it's bound to be useless too.

The only way to save the day: use a virtual windows environment, like a guest OS within a VirtualPC (64bit host) wrapper.
Or, dosbox it.

And what about ssdh?
If you run it twice, shall it warn it's already been installed?

You know, honestly I always deemed it pretty lame that sapucdex wasn't spouting no mumbo-jumbo lines when loading (as opposed to vdmsound and dgvesa) so... I had sapucdex.asm, I had Masm 6.15, I decided to recompile a ssdh.asm to a ssdh.exe too to let go some gibberish (see earlier screenshot)

but at any rate if you invoke ssdh and it's all already successfully loaded, let alone dgVoodoo or whatever else going or not (as they're totally independent), on its own it should complain it's already up and running and it needn't invoking once more

if it doesn't that means it didn't really install either.

Last edited by gidierre; 31-12-08 at 12:24.
gidierre is offline  
Old 31-12-08, 15:15   #9
Chug a Bug
Member
 
Joined: Feb 2005
Posts: 1,541
Default

Quote:
Originally Posted by gidierre View Post
thx for testing

so, for sure not unexpectedly, it's dosdrv & dgvesa in as much as 16 bit stuff that will crack up

And what about ssdh?
If you run it twice, shall it warn it's already been installed?
Ok! I tried ssdh.exe and tomb.exe as well and they both spit out the same error message about 64bit incompatibility!

Quote:
if/when you have time to check:

is there a Win9x/XP/32bit layer compatibility mode of sorts under Vista64 ?
Although probably it's bound to be useless too.
Thats the trouble isn't it? There is no x86 compatibility layer with x64 bit Windows. Until there is x64 is always going to be a minority interest. I did hear a rumour that Windows 7 was going to be 64bit only, and I then heard that it would be commercial suicide for MS to do that.

Quote:
The only way to save the day: use a virtual windows environment, like a guest OS within a VirtualPC (64bit host) wrapper.
Or, dosbox it.
And there you have the reason that despite the fact that my last two processors I've owned have been 64-bit my working installs of XP and Vista have remained stubbornly 32-bit.
Chug a Bug is offline  
Old 31-12-08, 17:21   #10
gidierre
Grease Monkey
 
gidierre's Avatar
 
Joined: Nov 2007
Posts: 1,644
Default

Quote:
Originally Posted by Chug a Bug View Post
I did hear a rumour that Windows 7 was going to be 64bit only, and I then heard that it would be commercial suicide for MS to do that.
I'm convinced Windows v7 will still have a 32bit version
if anything out of mere trade considerations.


EDIT
see e.g.
http://www.winsupersite.com/faq/windows_7.asp

Quote:
Q: Will Windows 7 be available in both 32-bit and 64-bit versions like Vista?
A: Though I had expected Windows 7 to ship only in 64-bit versions, Microsoft now says it will be the final Windows version to ship in both 32-bit and 64-bit versions.
so it appears 32-bit is safe, preserved, both "worlds" living on, adios until Windows 8.

Last edited by gidierre; 01-01-09 at 20:06.
gidierre is offline  
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 18:39.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Tomb Raider Forums is not owned or operated by CDE Entertainment Ltd.
Lara Croft and Tomb Raider are trademarks of CDE Entertainment Ltd.