VOGONS

Common searches


First post, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Hi,

I recently purchased Glidos to play Tomb Raider from an original CD, and have been raiding mostly free of problems... just the occasional hang in the NTVDM process between levels. I think Glidos works pretty well, overall, for something that allows a game produced almost a decade ago to run on modern PCs. However, I ran into a show-stopper, and the short version of the story is that the redbook emulation in Glidos causes a crash for me later in the game. I realize this problem may not occur for everyone on every system config, but the cause does seem rational at face value, and I'm probably not the only one who will run into it. The testing I had to do to determine and verify this was complicated, so I warn you that this is a long explanation. I'll try to be as economical with the verbiage as I can.

My system is a P4 3.2ghz, 1gb RAM, Radeon 9800Pro 128mb, Audigy 2 ZS running Windows XP SP1. I'm using the 1.33rc5 version of Glidos and VDMSound 2.1.0 -- I also tried Glidos 1.32 and had the same problem.

There is a point during the game in Tomb Raider where you have a showdown with Larson in the last room of the Sanctuary of the Scion. Just as you enter this room, the ambient CD audio cuts off and stays off until you've moved on to the next level. At least it SHOULD stay cut off. With the redbook emulation in Glidos, you can hear it cut off as you enter the room, but it fairly quickly starts up again. This results in the audio track playing over the end-of-level screen and as the game starts to play the FMV called CANYON.RPL between levels. I guess playing redbook audio and a 30mb movie file from the CD at the same time is too much to ask, because the game crashes before the FMV starts. However, if the movie file is in disk cache the crash doesn't occur... more on that later.

I started the Glidos server with redbook emulation enabled, and instead of launching the game from there I manually opened a command window and issued the same commands as the Glidos batch file; this way I could see the game's error message after it crashed because the command window stays open. The message was "ERROR: Cannot initialise FMV player".

Using the manual command window again, I added SAPUCDEX to the startup commands with the redbook emulation in Glidos disabled. The CD audio cut off at the right point and stayed off until the next level started, and the crash did not occur. This jelly was not easy to pin to the wall because if you get past the crash by disabling redbook emulation, the crash does not subsequently occur if you immediately test again with the emulation enabled -- even though you do hear the CD audio mixed with the FMV audio. I had a hunch this was due to the FMV file being in the disk cache from the earlier success with emulation disabled. I put this to the test by ensuring the cache was cleared by restarting the OS before testing with the emulation enabled or disabled, and this supported my hypothesis.

To boil all of this down: it appears the redbook emulation in Glidos is missing a cue to keep the CD audio shut off at the particular section of the game that I described above, and the CD audio playback is causing the movie file to be unreadable from the CD unless that file happens to be in the cache (which it normally wouldn't be). SAPUCDEX does not miss the cue, whatever that cue may be.

I can provide a saved game file of the point in the game where the issue arises if necessary; and please let me know if there is something I can clarify from my description of the problem. Thanks.

Reply 1 of 8, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

Isn't there an option to use MP3's with Tomb Raider? I've noticed it in the GLIDOS program but have never tried it.

How To Ask Questions The Smart Way
Make your games work offline

Reply 2 of 8, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The Glidos site does have an audiopack available for download. I understand that it has some additional tracks from the PlayStation version of the game or some other source, and requires location-based triggers because the DOS version does not internally trigger them. I wonder if there's a subset pack that has just the audio from the DOS version?

At any rate, I do have a workaround for the issue; I just start the Glidos server without the redbook emulation and separately run a batch file that uses SAPUCDEX.

BTW, I found a post from the author of Glidos on the forum here that has the source for the redbook emulation. The source files are dated 2002, so it is in doubt if that is the current state of the code. I don't claim to be an expert in C++ but it appears there is a "polling" of the CD audio playback state going on that checks to see if playback is stopped, and if it is, to start it up again with the last track that was previously playing. This would account for why the playback doesn't remain cut off. My guess is that SAPUCDEX is very literal about things: you tell it to start playing or stop playing and it does only that; whereas the Glidos server always tries to keep the tracks playing with its polling. The game code may be assuming the CD audio is already shut down from its earlier command and not issuing another shut down before the FMV is played...

It also occurs to me this issue may be very much related to the optical drive and its BIOS (which can vary quite a bit) regarding simultaneous playback of CD audio and reading of data.

Reply 3 of 8, by Glidos

User metadata
Rank l33t
Rank
l33t

Thanks for all that effort tracking the problem down. I ran into a similar problem when I first implemented redbook. I believe its because drives cannot be in both CD player mode, and data read mode symultaneously.

Its not simple to get right in Glidos because there is a lag in commuication between the DOS process and the server. Its made worse by the fact that the CD commands are carried back only on video buffer swaps. Come to think of it the route for commands is cut off during VESA mode graphics, as in the case of the FMVs. My first attempt had Glidos crashing at the start of every level but the first because of the drive being busy.

I didn't know there was still a situation that caused it. A saved game would be handy.

Reply 4 of 8, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Using the save, just slide down the slope and climb up through the window into the last room. The CD audio will cut off just as you cross the window ledge into the room and then Larson begins talking. Normally the CD audio should stay off at this point until you've gone to the next level, but the the polling you are doing to keep the CD tracks playing (I think) is causing it to start playing again almost immediately; and when the FMV starts there is the potential for trouble.

I understand that the redbook emulation you are doing is probably not solely for TR, so the polling behavior may not be dispensible for that and other reasons. The separate batch file using SAPUCDEX has been working well for me thus far, and it even seems I've stopped getting the intermittent NTVDM hangs between levels now... but it's probably too early to say for sure, I need to do some more raiding for awhile. 😉

Attachments

  • Filename
    savegame.zip
    File size
    988 Bytes
    Downloads
    290 downloads
    File license
    Fair use/fair dealing exception

Reply 5 of 8, by Glidos

User metadata
Rank l33t
Rank
l33t

Thanks. I'll see if I can get it to fail for me.

Redbook was put into Glidos purely for Tomb Raider. At the moment I can't remember why I needed the polling, except that the background sounds just stopped otherwise.

Reply 6 of 8, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

After some more testing I found my prior conclusions were partly incorrect. It seems that the digital sound dialogue from Natla and any of her henchmen in-game also triggers the CD audio to be shut off. I suppose this is to make what they're saying easier to hear. At any rate, if you save the game after defeating any of them, and then restore from that save, the CD audio starts up again.

In the case of the fight with Larson in the Sanctuary, it seems the problem with the redbook emulation in Glidos is not that the CD audio starts up again after he starts talking, it's that the audio is not shut down on the end-of-level statistics screen. If it's only catching CD commands on the rendering buffers flips, perhaps the real problem is that it's missing the final shutdown command before the FMV is played because it occurs on that freezeframe?

Reply 7 of 8, by noname

User metadata
Rank Newbie
Rank
Newbie

I'm not really sure if having CD audio stop when a voice clip starts was intentional. There was another area in Tomb of Qualopec where if you passed over a certain point that was an audio trigger in the PlayStation version, the ambience would stop until you saved and reloaded your game. And in the PlayStation version, I believe voice clips came from CD audio, so Core might have accedently left those CD audio triggers in the PC version too.

Reply 8 of 8, by Kaminari

User metadata
Rank Oldbie
Rank
Oldbie

Yes, voice clips are CD tracks on PS1.

On the PC, the CD tracks stop because the voice clips are PCM, which simply means the data track needs to be accessed for the voice clips to be loaded on the fly, hence cutting the CD tracks off.