VOGONS


First post, by hooby

User metadata
Rank Newbie
Rank
Newbie

Background: I am setting up a system for playing old games with some spare parts available to me.
I have pretty much everything working except from one important feature: CD audio.

The system has a VIA based motherboard with integrated graphics and audio, and I have a SATA optical (DVD/CD) drive attached.
I got Windows 98 SE installed as well as all the device drivers.

Problem: Because there is no analog audio connector either on the CD/DVD drive or on the motherboard by default applications with CD audio do not output any sound. I suspected that this would be an issue, and am taking advantage of the setting to use digital CD audio (under Control Panel > Multimedia > CD Music: “Enable digital CD audio for this CD-ROM device”). At first glance this seemed to be working; the system can play audio CDs with the native CD player app, etc. However, there is some lag and stuttering like its being buffered at the start of play.
In games (Mechwarrior 2, Heretic 2, Descent 2) it gets much worse, where it plays fragments of the audio with gaps every second or so, or causing the game to hang.
I am trying to identify where the bottleneck is and see if there is any solution out there. I can’t imagine digital CD audio is that taxing of an operation.
I have tried swapping the optical drive with another model SATA drive but get the same result, so I don’t think the issue is specific to the drive.
Other audio plays clearly, so it’s not affecting all music/sound, just redbook CD audio.

System info:
VIA VT8237R Plus South Bridge (SATA RAID controller)
VIA VT1618 Multi-channel AC’97 Codec
Windows 98 SE
DirectX 7 installed

Reply 1 of 9, by .legaCy

User metadata
Rank Oldbie
Rank
Oldbie

AFAIK SATA Drives and CD Audio is a big no-no for retro gaming.
i strongly recommend you to use one IDE drive it is pretty cheap and widely available.
the analog CD-Audio is processed on the drive itself and the audio signal is sent through the cable directly to the sound card to be mixed on the output that's why even a 486 can playback cd audio with ease.
but i think that on your case the CPU has to do some work and that's why it might create stuttering and audio lag.

Reply 2 of 9, by chinny22

User metadata
Rank l33t++
Rank
l33t++

Your onboard sound isn't helping, that'll be fighting for CPU time as well. You could try a dedicated soundcard, but I doubt it'll make much difference.

Games would be expecting slow steady stream of music (well data) Even faster IDE drives caused problems waiting for the drive CD to spin up if it was left to use the cache.

You could also create a CD image and try using dtools, which people have some success with
DaemonTools No CD Audio
Redbook emulation (analog CD Audio)

Reply 3 of 9, by hooby

User metadata
Rank Newbie
Rank
Newbie

Thanks guys,
After some further prodding at buried settings (I love Windows 9x), I found a knob to turn which helps this issue:
Right click My Computer > Properties > Performance > File System > CD-ROM:
Here there are 2 options: “Supplemental cache size” and “Optimize access pattern for”.
I decreased the supplemental cache size bar all the way to the left, and there is way less stuttering now.
What’s really strange is that I later changed the setting back, but the problem was still solved… so I wonder if there was some bogus value in the registry (due to some other issue) and this just set it back.
Its not quite perfect, but a big improvement.
I will post again if I find any other enhancements!

Reply 5 of 9, by hooby

User metadata
Rank Newbie
Rank
Newbie
firage wrote:

Don't forget to check that the drive is in DMA mode, not PIO.

Thanks - I was trying to wrap my head around that and see if I could find a setting for it.
Is SATA inherently using DMA though?
https://superuser.com/questions/882870/how-do … sata-controller

The other thing I am curious about is how exactly digital CD audio support is implemented in Windows 98 SE, like at the SCSI layer.
From what I gather, analog works like this:
Application code uses API to "start CD playback" -> OS kernel sends command to drive to "start playback" for some track or msf timestamp -> Drive acks command and starts actual normal CD playback (@1x) -> Drive locally reads the bits off the disc and converts to analog -> Analog audio signal is sent to soundcard via analog cable -> Soundcard then mixes the CD analog signal and outputs to speakers
So for digital...:
Application code uses API to "start CD playback" -> OS kernel (knowing that cdda is set for digital) sends command to drive to read x sectors as data -> Drive reads data at some speed (controlled by what?) -> Drive locally reads the bits off the disc -> Audio data bits are sent back to kernel via SATA/IDE cable -> Kernel gives audio data bits to soundcard driver -> Soundcard at some point converts to analog and outputs to speakers

Can anyone confirm that assumption of how it works, or correct it?
Could anyone with a normally behaving Windows 98 SE system validate that this can actually work well with normal hardware? (Disconnect analog cable and set CD audio to digital and then use the basic CD player app and/or try games that have redbook audio, and see if it introduces significant delay/errors)

Thx!

Reply 7 of 9, by hooby

User metadata
Rank Newbie
Rank
Newbie
Moogle! wrote:

Isn't their a setting some where you can enable digital audio through the data cable connection? I forget where it is, but I know it's there somewhere. Might in the multimedia settings.

Thanks, yes I am using that option already. This thread is about understanding and resolving a performance issue when using the setting.

Reply 8 of 9, by firage

User metadata
Rank Oldbie
Rank
Oldbie
hooby wrote:
Thanks - I was trying to wrap my head around that and see if I could find a setting for it. Is SATA inherently using DMA though? […]
Show full quote
firage wrote:

Don't forget to check that the drive is in DMA mode, not PIO.

Thanks - I was trying to wrap my head around that and see if I could find a setting for it.
Is SATA inherently using DMA though?
https://superuser.com/questions/882870/how-do … sata-controller

I don't know about the architecture, but SATA devices do present non-DMA modes in Windows. If drive properties or controller properties don't show a DMA checkbox, might be interesting to inspect with some program.

Regardless, not looking very promising for simple software solutions.

My big-red-switch 486

Reply 9 of 9, by hooby

User metadata
Rank Newbie
Rank
Newbie

Well, it is my lucky day!
In an effort to see if digital CD audio itself was the problem, I attached a USB CD-ROM drive. In order for that to work, I had to install some USB mass storage drivers, so I downloaded the nusb36e.exe installer from https://www.raymond.cc/blog/how-to-install-us … -on-windows-98/.
Once I got the drive to appear, I set it as the default audio drive and for digital audio and tested it out - and it worked fine!
Then I tried the original drive again - and now it is also working fine!!!
So either that driver package updated the system with something that fixes the issue, or somehow by installing another drive, a hidden setting or value was changed that resolved the problem.
WTF!
Lesson of the day / important takeaway from the thread: SATA optical drives can work just fine on Windows 98 SE, even with digital CD audio (in the absence of an analog audio cable).
Now if only the same could be done for DOS...