I think, that this game is a good candidate for improving fake multi-CD system.
In order that save time, I downloaded from some page savefile, when the game requires a third CD (in attachment).
Content 26411_save.zip I uploaded to the game folder and when start the game chose LOAD SAVED GAME - GAME_02.SGM.
The game has several problems on Win7+DxWnd.
1) The game requires 16bit color. This is not a problem, I set "Video-Initial Virtual color setting-16 BPP" + Hook-Debugger mode (Inject suspended process did not working for me on W7 in this case)
2) Error message about Music driver (attachment). I do not know if it's important, but after this, game go on.
3) The hotkey for switch to CD3 does not work.
4) After switching to CD3 via CD charger, you will see an error message about the impossibility to open the file 1002.avi (the file is present in the CD03 folder) and then another Debug Message error message.
Except these points, the game works good here on Win7 + DxWnd.
Interesting case. Unfortunately, to see what's going on with file paths it's necessary to set the logging "Debug" flag, which makes the logs quite big. I wonder what made the game believe that the CD drive was letter "A:" (see error4.png). Let's start to build a testbed ....
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, I made some tests myself, the situation is rather complex ....
The game hides much of its complexity in two additional dlls, hooking also DUKDll95.dll sos9503.dll seems to bring some benefits, though I'm not too sure about that. Adding these two DDLs and setting the hooking mode as "PE browse" I bypassed several times the 16bit video error message in Inject suspended mode, but only a few times!
My problem here is that the "Inject suspended mode" is the only mode that allows early injection with a task attached to a debugger, I have to make this working or it will be impossible to debug the program!
The error message about A:\1002.AVI movie carries a file pathname that was NOT translated in the proper real path. In effect, the logs have no trace of the 1002.AVI string, which means that this file is processed by some unknown and unhooked system function. If you mount the CD iso image and create a CD drive at the operating system level the operation succeeds. I have to find out what's playing the movie here (I thought a window message, but I couldn't find it either!) and hook it.
Last edit: gho 2019-03-10
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Using a mounted iso and ignoring all error messages you can load your savegame, but still there's something that doesn't make sense .... the game only allows you to see a few minutes of a silly movie scene and die ... aren't you supposed to be able to make "something" in the game?
I have a feeling that this game will give me much more troubles that it seems right now!
I think it's okay.
If I understand this is the final scene of the game.
The only context with 1002.avi that I found is the msvcrt20.dll library.
It probably will not help...
Edit:
The video codec is TrueMotion S as well as in Zork Nemesis.
A whole 3rd CD for about 2 minutes of dull gameplay? Can't believe that ... so I entered the 79000.avi file (the one that starts with the opening scene of CD3) in VLC media player and found that this movie (and many others, in reality) is much longer than what I saw, it holds multiple scenes that the player should switch somehow. In practice, it is an old multi-path movie game. Ok, this adds a little spicy flavor to the whole thing.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No.
In readme.txt (with downloaded savefiles), it says:
Just walk forward across the Engine Block up the ramps and through The door then just follow Luke. You will see the ending sequence to this Brill adventure.
I think it's the end of the game.
However.
Maybe, that I misunderstand the part this protocol.
The game looks for VOL.001 a VOL.002 and finds it, that missing on CD3. Then he searches VOL.003 and finds him on CD3.
In protocol is:
CreateFileA: FileName="A:\VOL.003" DesiredAccess=80000000(GENERIC_READ) SharedMode=1 Disposition=3 Flags=80(FILE_ATTRIBUTE_NORMAL)
TranslatePath: fake CD new FileName="C:\Hry\Adventury\Spycraft\CD\VOL.003"
If the game thinks, that on CD folder is VOL.003 it's a problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Incredible! adding msvcrt20.dll in the Additional modules field fixed the problem!!
Now the game is also working better, in the final scene I get prompted for choices that should lead me to either my death or an happy ending ... (p.s. the screenshot lost the movie overlay, but on the screen there was a movie scene).
Configuration in attach.
P.s. the game doesn't search very much for its CD, it picks the first available one, so the "Hide empty drives" is fundamental. For the other error messages ... well, I still don't know.
A quick morning test.
It works well now with switching CD over CD charger.
Do you have any information why you can not use a hotkey?
As far as the music driver error report is concerned, I think I've seen at my tests, that game search some .drv file (I do not know what file now, except wdmaud.drv there was yet some other).
I'll find out tonight.
Edit:
It is also mentioned here file msacm.drv, but I still think there was one more (maybe dll?).
Anyway, as described here
In effect, the CD change hotkeys are not working very well. They are working because in the log I can find traces of switching operations, but the game doesn't seem to react properly. Or, more precisely, the game reacts very well when you switch from the good CD to a wrong one, then it no longer reacts when you try to recover.
In any case, apart the technically interesting problem, since this game isn't checking for the CD label, the best arrangement for this case is probably to fake a DVD setting, mixing all files in a single folder where the game always finds what's looking for.
I'm a little short of HD space, but it's worth a try ...
update:
test completed, but there's something that doesn't work!
Merging the files from cd2 and cd3 to cd1 there were many duplicates, but this shouldn't matter since they were all identical. Anyway, they were too many so I can't be 100% sure.
When loading your savegame that requres CD3, the game complains asking for CD3 but then starts the same, finding all the needed files in the cd folder. But here the bad surprise: this time, again, the movie sequence went straight to my death without asking for interactions!
I have the suspect that someone of the files had to be merged ....
Last edit: gho 2019-03-11
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, so I created a merged CD folder and it seems to work well.
On CDs there are lots of files with the same name, I hope they are the same content.
I've had some redrawing problems.
With the flag "Share ddraw and GDI DC" it seems better.
I also found that the game looks for C:\Windows\skipbuf.ini and C:\Windows\spysound.
I thought it might have something to do with the music driver error. In virtual XP, I run SKIPBUF.EXE from CD1 and skipbuf.ini was created.
It does not seem to be enough.
Tomorrow I will look to Win98 if there is file C:\Windows\spysound (maybe it's a wrong way).
But here the bad surprise: this time, again, the movie sequence went straight to my death without asking for interactions!>
Maybe you do not see option icons?
Try the flag "Share ddraw and GDI DC".
If you mean the icons in the bottom of your screenshot, I can see them with some difficulty (they seem redrawn by the black window that should stay behind), but this is not the problem. Knowing that there could be something to click to pick the right choice, I waited patiently the end of the movie without using the mouse. Yesterday with the 3CD settings I finally got the game paused waiting for a player's choice with the icons and dialogs text choices and I got the impression that I could think for a while because the movie was completely paused. Today, with the merged single CD the movie went straight to the player's death without any pause, so it can't be a matter of seeing or not seeing the icons.
Did you try to load the CD3 savegame? I'm not at all sure that the cause of the problem was the merged CD, so I would be happy to hear that the merged game worked fine for you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, I had a loaded savefile and merged CD folder. If I remember, the game never offered me the choices, when I let the movie run through. But with "Share ddraw and GDI DC" I've seen icons and when I clicked on Drop Gun, choices appeared.
I think the synchronization is not quite right, icon Drop Gun did not appear until the hero dropped the gun, so when I clicked on the icon he dropped the weapon the second time.
But then the choices appeared.
Edit:
Oh, here you can see the end.
Although it is from Nintendo, behaving with Drop Gun is the same as at me.
Edit2:
Hmm my mistake this is just a channel NintendoComplete, the game is a PC version.
I noticed that music was playing here.
Probably due to problems with music driver I don't have music..
Last edit: huh 2019-03-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Now I was looking into W98 and there is no file C:\Windows\spysound (skipbuf.ini is present) and music in the game playing, so this was the wrong trace.
It is certain, that the game plays either wav or midi because you can change it when you run splash.exe from the first CD (spysound.ini 0 or 1).
I suspect, that dukdll95.dll or sos9503.dll play a role in this process.
Music stops playing in Win98 when focus is lost (but not always). Music does not play when restoring focus.
Option Adjust Volume in the game will launch ESSAudioDrive mixer. Music can be amplified/weakened in "Synthesizer".
Edit:
This sentence from spyhelp.hlp is interesting:
"If you install a new sound card into your system after you have installed Spycraft: The Great Game, you may need to uninstall and reinstall the game in order to get it to properly recognize the new hardware."
Last edit: huh 2019-03-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I found, that when I set up compatibility mode with W95 or W98 (without DxWnd on Win7) music is played. Of course, the game is unplayable everything is very slow, loading saves don't work.
But over it all, the music is playing, so some shim had to prove it!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
With Shim Database Tool (sdb) v1.0 I exported the shim database (Win7) to xml.
In the file I see the records for sos9503.dll
NAME tid="0x1b1f5e" typ="STRINGREF" WaveOutUsePreferredDevice /NAME
SHIM_TAGID tid="0x1b1f64" typ="DWORD" 0x28610 /SHIM_TAGID
INEXCLUDE tid="0x1b1f6a" typ="LIST"
INCLUDE tid="0x1b1f70" typ="NULL" /
MODULE tid="0x1b1f72" typ="STRINGREF" sos9503.dll /MODULE
So I think shim "WaveOutUsePreferredDevice" could solve the problem with music in Spycraft (and maybe some other games that use sos9503.dll).
Could it be programmed for DxWnd?
Last edit: huh 2019-03-18
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I can try.
Unfortunately there's no documentation on the web about what this shim exactly does, I will have to guess.
SPYCRAFT.EXE doesn't link directly any waveOut call, but it links to DUKDLL95.DLL that, in turn, links to calls such as waveOutGetNumDevs and waveOutOpen. A reasonable guess is that the shim will make waveOutOpen to open the wave device managed by sos9503.dll. I'm going to see what that would mean and how to force this choice.
W.I.P.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Clicking ok the game runs without music. The message in english should sound more or less like this:
Music system (midi ?) initialization failed, reboot your pc
I was disassembling the sound init session, in reality there's no failed call, it seems that the game is analyzing some data from the device capabilities and decides that the card isnt good enough ...
Is this the error message / problem that the WaveOutUsePreferredDevice is fixing?
Last edit: gho 2019-03-18
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The error message is listed at the beginning of this thread:
Can not initialize music driver, please restart your computer.
The game plays wav music or midi music, depending on what you choose. I have wav selected.
According to some searches, WaveOutUsePreferredDevice does this:
"The application attempts to send sound to the wrong device (usually to an audio card instead of to the desired USB devices)."
This shim was not directly listed in the shim database (Win7) related to Spycraft, but it was related to other games that use sos9503.dll.
I was hoping it would be it....
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The game plays wav music or midi music, depending on what you choose. I have wav selected.
My logs show that the game prompted the error message after a midiOutGetDevCaps call, then it seems that my configuration enables midi music. How did you pick the wav mode? I can see no way to configure wav instead of midi.....
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think, that this game is a good candidate for improving fake multi-CD system.
In order that save time, I downloaded from some page savefile, when the game requires a third CD (in attachment).
Content 26411_save.zip I uploaded to the game folder and when start the game chose LOAD SAVED GAME - GAME_02.SGM.
The game has several problems on Win7+DxWnd.
1) The game requires 16bit color. This is not a problem, I set "Video-Initial Virtual color setting-16 BPP" + Hook-Debugger mode (Inject suspended process did not working for me on W7 in this case)
2) Error message about Music driver (attachment). I do not know if it's important, but after this, game go on.
3) The hotkey for switch to CD3 does not work.
4) After switching to CD3 via CD charger, you will see an error message about the impossibility to open the file 1002.avi (the file is present in the CD03 folder) and then another Debug Message error message.
Except these points, the game works good here on Win7 + DxWnd.
Last edit: huh 2019-03-10
Interesting case. Unfortunately, to see what's going on with file paths it's necessary to set the logging "Debug" flag, which makes the logs quite big. I wonder what made the game believe that the CD drive was letter "A:" (see error4.png). Let's start to build a testbed ....
I myself set A: in DxWnd as a fake CD folder (and overwritten resource.ini)
Ok, I made some tests myself, the situation is rather complex ....
The game hides much of its complexity in two additional dlls, hooking also
DUKDll95.dll sos9503.dll
seems to bring some benefits, though I'm not too sure about that. Adding these two DDLs and setting the hooking mode as "PE browse" I bypassed several times the 16bit video error message in Inject suspended mode, but only a few times!My problem here is that the "Inject suspended mode" is the only mode that allows early injection with a task attached to a debugger, I have to make this working or it will be impossible to debug the program!
The error message about A:\1002.AVI movie carries a file pathname that was NOT translated in the proper real path. In effect, the logs have no trace of the 1002.AVI string, which means that this file is processed by some unknown and unhooked system function. If you mount the CD iso image and create a CD drive at the operating system level the operation succeeds. I have to find out what's playing the movie here (I thought a window message, but I couldn't find it either!) and hook it.
Last edit: gho 2019-03-10
Using a mounted iso and ignoring all error messages you can load your savegame, but still there's something that doesn't make sense .... the game only allows you to see a few minutes of a silly movie scene and die ... aren't you supposed to be able to make "something" in the game?
I have a feeling that this game will give me much more troubles that it seems right now!
I think it's okay.
If I understand this is the final scene of the game.
The only context with 1002.avi that I found is the msvcrt20.dll library.
It probably will not help...
Edit:
The video codec is TrueMotion S as well as in Zork Nemesis.
Last edit: huh 2019-03-10
A whole 3rd CD for about 2 minutes of dull gameplay? Can't believe that ... so I entered the 79000.avi file (the one that starts with the opening scene of CD3) in VLC media player and found that this movie (and many others, in reality) is much longer than what I saw, it holds multiple scenes that the player should switch somehow. In practice, it is an old multi-path movie game. Ok, this adds a little spicy flavor to the whole thing.
No.
In readme.txt (with downloaded savefiles), it says:
Just walk forward across the Engine Block up the ramps and through The door then just follow Luke. You will see the ending sequence to this Brill adventure.
I think it's the end of the game.
However.
Maybe, that I misunderstand the part this protocol.
The game looks for VOL.001 a VOL.002 and finds it, that missing on CD3. Then he searches VOL.003 and finds him on CD3.
In protocol is:
CreateFileA: FileName="A:\VOL.003" DesiredAccess=80000000(GENERIC_READ) SharedMode=1 Disposition=3 Flags=80(FILE_ATTRIBUTE_NORMAL)
TranslatePath: fake CD new FileName="C:\Hry\Adventury\Spycraft\CD\VOL.003"
If the game thinks, that on CD folder is VOL.003 it's a problem.
A little track: when starting a new game you get the virtual path "K:\1270.AVI" (where K is my virtual CD letter) used here
Now I have to undestand what happens inside DUKDll95.dll and why this path is not translated.
Nice progress.
As for the safefile maybe it's scene with "Mission failed", I do not know.
Anyway, for try to switch to CD3, I think it's enough.
Incredible! adding
msvcrt20.dll
in the Additional modules field fixed the problem!!Now the game is also working better, in the final scene I get prompted for choices that should lead me to either my death or an happy ending ... (p.s. the screenshot lost the movie overlay, but on the screen there was a movie scene).
Configuration in attach.
P.s. the game doesn't search very much for its CD, it picks the first available one, so the "Hide empty drives" is fundamental. For the other error messages ... well, I still don't know.
Last edit: gho 2019-03-10
I sent my post and in the meantime I found out I was slow :-)
Wow, interesting!
I'll try it tomorrow.
A quick morning test.
It works well now with switching CD over CD charger.
Do you have any information why you can not use a hotkey?
As far as the music driver error report is concerned, I think I've seen at my tests, that game search some .drv file (I do not know what file now, except wdmaud.drv there was yet some other).
I'll find out tonight.
Edit:
It is also mentioned here file msacm.drv, but I still think there was one more (maybe dll?).
Anyway, as described here
http://translate.google.com/translate?hl=&sl=ru&tl=en&u=http://yuwik-games.ru/4775-tayny-santa-fe-svyataya-zemlya-1996-activision-rus.html&sandbox=1
the driver error is the same as in Santa Fe Mysteries: Sacred Ground, even there is resource.ini, so the game is probably created the same way.
Last edit: huh 2019-03-11
In effect, the CD change hotkeys are not working very well. They are working because in the log I can find traces of switching operations, but the game doesn't seem to react properly. Or, more precisely, the game reacts very well when you switch from the good CD to a wrong one, then it no longer reacts when you try to recover.
In any case, apart the technically interesting problem, since this game isn't checking for the CD label, the best arrangement for this case is probably to fake a DVD setting, mixing all files in a single folder where the game always finds what's looking for.
I'm a little short of HD space, but it's worth a try ...
update:
test completed, but there's something that doesn't work!
Merging the files from cd2 and cd3 to cd1 there were many duplicates, but this shouldn't matter since they were all identical. Anyway, they were too many so I can't be 100% sure.
When loading your savegame that requres CD3, the game complains asking for CD3 but then starts the same, finding all the needed files in the cd folder. But here the bad surprise: this time, again, the movie sequence went straight to my death without asking for interactions!
I have the suspect that someone of the files had to be merged ....
Last edit: gho 2019-03-11
Ok, so I created a merged CD folder and it seems to work well.
On CDs there are lots of files with the same name, I hope they are the same content.
I've had some redrawing problems.
With the flag "Share ddraw and GDI DC" it seems better.
I also found that the game looks for C:\Windows\skipbuf.ini and C:\Windows\spysound.
I thought it might have something to do with the music driver error. In virtual XP, I run SKIPBUF.EXE from CD1 and skipbuf.ini was created.
It does not seem to be enough.
Tomorrow I will look to Win98 if there is file C:\Windows\spysound (maybe it's a wrong way).
Maybe you do not see option icons?
Try the flag "Share ddraw and GDI DC".
Last edit: huh 2019-03-11
If you mean the icons in the bottom of your screenshot, I can see them with some difficulty (they seem redrawn by the black window that should stay behind), but this is not the problem. Knowing that there could be something to click to pick the right choice, I waited patiently the end of the movie without using the mouse. Yesterday with the 3CD settings I finally got the game paused waiting for a player's choice with the icons and dialogs text choices and I got the impression that I could think for a while because the movie was completely paused. Today, with the merged single CD the movie went straight to the player's death without any pause, so it can't be a matter of seeing or not seeing the icons.
Did you try to load the CD3 savegame? I'm not at all sure that the cause of the problem was the merged CD, so I would be happy to hear that the merged game worked fine for you.
Yes, I had a loaded savefile and merged CD folder. If I remember, the game never offered me the choices, when I let the movie run through. But with "Share ddraw and GDI DC" I've seen icons and when I clicked on Drop Gun, choices appeared.
I think the synchronization is not quite right, icon Drop Gun did not appear until the hero dropped the gun, so when I clicked on the icon he dropped the weapon the second time.
But then the choices appeared.
Edit:
Oh, here you can see the end.
Although it is from Nintendo, behaving with Drop Gun is the same as at me.
https://www.youtube.com/watch?v=0z_eWMm_jCU&t=9835s&hd=1
Edit2:
Hmm my mistake this is just a channel NintendoComplete, the game is a PC version.
I noticed that music was playing here.
Probably due to problems with music driver I don't have music..
Last edit: huh 2019-03-12
Now I was looking into W98 and there is no file C:\Windows\spysound (skipbuf.ini is present) and music in the game playing, so this was the wrong trace.
It is certain, that the game plays either wav or midi because you can change it when you run splash.exe from the first CD (spysound.ini 0 or 1).
I suspect, that dukdll95.dll or sos9503.dll play a role in this process.
Music stops playing in Win98 when focus is lost (but not always). Music does not play when restoring focus.
Option Adjust Volume in the game will launch ESSAudioDrive mixer. Music can be amplified/weakened in "Synthesizer".
Edit:
This sentence from spyhelp.hlp is interesting:
"If you install a new sound card into your system after you have installed Spycraft: The Great Game, you may need to uninstall and reinstall the game in order to get it to properly recognize the new hardware."
Last edit: huh 2019-03-12
I found, that when I set up compatibility mode with W95 or W98 (without DxWnd on Win7) music is played. Of course, the game is unplayable everything is very slow, loading saves don't work.
But over it all, the music is playing, so some shim had to prove it!
With Shim Database Tool (sdb) v1.0 I exported the shim database (Win7) to xml.
In the file I see the records for sos9503.dll
NAME tid="0x1b1f5e" typ="STRINGREF" WaveOutUsePreferredDevice /NAME
SHIM_TAGID tid="0x1b1f64" typ="DWORD" 0x28610 /SHIM_TAGID
INEXCLUDE tid="0x1b1f6a" typ="LIST"
INCLUDE tid="0x1b1f70" typ="NULL" /
MODULE tid="0x1b1f72" typ="STRINGREF" sos9503.dll /MODULE
So I think shim "WaveOutUsePreferredDevice" could solve the problem with music in Spycraft (and maybe some other games that use sos9503.dll).
Could it be programmed for DxWnd?
Last edit: huh 2019-03-18
I can try.
Unfortunately there's no documentation on the web about what this shim exactly does, I will have to guess.
SPYCRAFT.EXE doesn't link directly any waveOut call, but it links to DUKDLL95.DLL that, in turn, links to calls such as waveOutGetNumDevs and waveOutOpen. A reasonable guess is that the shim will make waveOutOpen to open the wave device managed by sos9503.dll. I'm going to see what that would mean and how to force this choice.
W.I.P.
I am making tests with the game french version. When I start it I get this error messages in a dialog box
Clicking ok the game runs without music. The message in english should sound more or less like this:
Music system (midi ?) initialization failed, reboot your pc
I was disassembling the sound init session, in reality there's no failed call, it seems that the game is analyzing some data from the device capabilities and decides that the card isnt good enough ...
Is this the error message / problem that the WaveOutUsePreferredDevice is fixing?
Last edit: gho 2019-03-18
The error message is listed at the beginning of this thread:
Can not initialize music driver, please restart your computer.
The game plays wav music or midi music, depending on what you choose. I have wav selected.
According to some searches, WaveOutUsePreferredDevice does this:
"The application attempts to send sound to the wrong device (usually to an audio card instead of to the desired USB devices)."
This shim was not directly listed in the shim database (Win7) related to Spycraft, but it was related to other games that use sos9503.dll.
I was hoping it would be it....
Good, we're getting closer ...
My logs show that the game prompted the error message after a midiOutGetDevCaps call, then it seems that my configuration enables midi music. How did you pick the wav mode? I can see no way to configure wav instead of midi.....
I think it was over atorun.exe on CD-Options.
In cfg file 0 = Wav, 1 = midi.
I'll check it out when I get home.