Digital CD Audio performance issues with SATA optical drive, Windows 98 SE

Discussion about old sound cards, MIDI devices and sound related accessories.

Digital CD Audio performance issues with SATA optical drive, Windows 98 SE

Postby hooby » 2018-1-01 @ 21:48

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
User avatar
hooby
Newbie
 
Posts: 12
Joined: 2004-11-08 @ 02:49
Location: USA

Re: Digital CD Audio performance issues with SATA optical drive, Windows 98 SE

Postby .legaCy » 2018-1-01 @ 22:00

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.
User avatar
.legaCy
Member
 
Posts: 485
Joined: 2016-4-08 @ 23:11
Location: Brazil

Re: Digital CD Audio performance issues with SATA optical drive, Windows 98 SE

Postby chinny22 » 2018-1-01 @ 23:31

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
viewtopic.php?f=46&t=52215
http://www.vogons.org/viewtopic.php?t=33493
User avatar
chinny22
Oldbie
 
Posts: 1914
Joined: 2011-8-26 @ 12:02
Location: Australian but living in the UK for now

Re: Digital CD Audio performance issues with SATA optical drive, Windows 98 SE

Postby hooby » 2018-1-02 @ 15:57

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!
User avatar
hooby
Newbie
 
Posts: 12
Joined: 2004-11-08 @ 02:49
Location: USA

Re: Digital CD Audio performance issues with SATA optical drive, Windows 98 SE

Postby firage » 2018-1-02 @ 18:30

Don't forget to check that the drive is in DMA mode, not PIO.
User avatar
firage
Oldbie
 
Posts: 1059
Joined: 2013-1-06 @ 21:43
Location: Finland

Re: Digital CD Audio performance issues with SATA optical drive, Windows 98 SE

Postby hooby » 2018-1-03 @ 04:03

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/ ... 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!
User avatar
hooby
Newbie
 
Posts: 12
Joined: 2004-11-08 @ 02:49
Location: USA

Re: Digital CD Audio performance issues with SATA optical drive, Windows 98 SE

Postby Moogle! » 2018-1-03 @ 06:18

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.
Moogle!
Member
 
Posts: 284
Joined: 2008-4-21 @ 01:03

Re: Digital CD Audio performance issues with SATA optical drive, Windows 98 SE

Postby hooby » 2018-1-03 @ 12:41

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.
User avatar
hooby
Newbie
 
Posts: 12
Joined: 2004-11-08 @ 02:49
Location: USA

Re: Digital CD Audio performance issues with SATA optical drive, Windows 98 SE

Postby firage » 2018-1-03 @ 13:30

hooby wrote:
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/ ... 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.
User avatar
firage
Oldbie
 
Posts: 1059
Joined: 2013-1-06 @ 21:43
Location: Finland

Re: Digital CD Audio performance issues with SATA optical drive, Windows 98 SE

Postby hooby » 2018-1-04 @ 04:05

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-inst ... indows-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...
User avatar
hooby
Newbie
 
Posts: 12
Joined: 2004-11-08 @ 02:49
Location: USA


Return to Sound

Who is online

Users browsing this forum: No registered users and 5 guests