VOGONS


First post, by ludicrous_peridot

User metadata
Rank Member
Rank
Member

Appreciate there have been topics on VOGONS already on this family of chips, and on SPDIF in vintage systems, but I am still curious if anyone has achieved digital sound output with CMI chip in DOS?

I have a PCI card with chip marked CMI-8738/PCI-6ch-mx
Vendor ID: 13F6h (C-Media)
Device ID: 0111h, Revision ID: 16, Class: 04h (multimedia device)

It does allow SPDIF output in Windows 9x (with VxD drivers it shipped with) and Windows 10 (with driver package downloaded from VOGONS driver library) - for Windows games apparently, like Doom 95, Hexen 95 or Indy Desktop Adventures.
What I would like to understand is if output from line in/SPDIF in/FM and digital/"Wave" could be routed to SPDIF out in DOS, especially when using a chipset/motherboard that do not directly support DMA (like the one in my signature).
That said, digital output is not something that works for me with, say, Windows 9x DOS window. Moreover my manipulations with the chip via SMB.EXE and following the generally available data sheet, including attempts to replicate in DOS the state of registers I dumped while running in Windows did not work.

But since other forum members, like @kodi have spend significant time with the chip and have likely much better understanding of how it operates, could someone share some advice on it?

UPD:

After having read further through @kodi's DDMA thread about these chips and also some notes on linux kernel documentations site, I think I start to understand the problem better. According to sources, for this chip revisions 33 and 37 were known to output FM via SPDIF. In my case there's no obvious marking on the chip, but looking at the registers used by the driver to detect the version of the chip (also cross referencing with the data sheet), this is unlikely a version from 33 or 37 generation, as the driver assigns 55 - it's default for modern chip versions. The name of the chip on the datasheet with matching version register content described is "PCI-6C C3DX".

That said, this chip revision support FM pretty well (even if datasheet mentions "FM emulator" - so go figure if SBEMU's emulation could actually be preferred 😀 ) and the flag DAC2SPDO to mix in FM into SPDIF Out is there and is mentioned in the data sheet, but setting the flag results in distorted garbage sound, regardless of other settings.

So the summary is that this particular chip I have may be "too new" for what I am after, and same steps but taken with an older card may actually lead to success. Well, wish me luck 😀

Last edited by ludicrous_peridot on 2025-08-17, 22:31. Edited 1 time in total.

GA-G41M-Combo G41/ICH7 - Core 2 Quad Q9550 - DDR3 1033 - Radeon RX570 - CMI-8738 (Trust SC-5250) - X3MB (Buran)
Beetle/M/i815+ICH2 - Celeron 566Mhz - Opti 924 (Typhoon Media)

Reply 1 of 15, by ludicrous_peridot

User metadata
Rank Member
Rank
Member

So after going back and forth I could hear wave out via SPDIF finally, and all I had to do was select a combination of "Record from SPDIF" and "Enable SPDIF Out" via C3DMIX app shipped with the card's DOS drivers.

Sadly does not work in every game (Cyrill Cyberpunk for example, doesn't play sound), and SPDIF In, Line In, FM are all only output on the Speaker Out (Wave Out is not in this case). With the card's mediocre game compatibility, i am also using SBEMU as effectively its TSR driver (mentioned this in SBEMU thread), which in turn brings in some compatibility constraints of its own.

Having said that... and provided further testing with the games I have gives some agreable results, this may really be a "sweet spot" card for my machine for the following reasons:

+ Same SPDIF jack used in DOS, Win 9x and Windows 10 for Wave out is just plain great from "logistics" perpective and getting output devoid of noise, hiss and "machine bowels" sounds is a welcome change from my Cobra

+ the MIDI sound module I have outputs fine via analog out anyway, and is externally powered, so mixing this ouside PC (even passively?) will probably not impact the output much

There are of course disadvantages that I am starting to think I could accept:

- It's a shame SPDIF In doesnt get mixed in into SPDIf Out and only passthrough works so games like Hexen, Tomb Raider or Archimedean Dynasty in DOS or Hexen II in Windows do not get fully digital sound

- FM music is via Speaker Out (but frankly speaking it sounds very clear and nicer than how I remember Cobra sounded; maybe it's also a departure from the original sound as it's now "more analytical and colder" - but I am yet to give this a good thorough hearing with the headphones on)

- Game compatibility could be better, but I have a second small rig with an ISA card I got for the exactly same reason (e.g. Sam and Max DOS) in the previous setup

E: Well, with /K44100 the games that would normally work with SBEMU also work with SPDIF Out setup (incl. Aladdin and Cyrill Cyberpunk).

GA-G41M-Combo G41/ICH7 - Core 2 Quad Q9550 - DDR3 1033 - Radeon RX570 - CMI-8738 (Trust SC-5250) - X3MB (Buran)
Beetle/M/i815+ICH2 - Celeron 566Mhz - Opti 924 (Typhoon Media)

Reply 2 of 15, by zyzzle

User metadata
Rank Member
Rank
Member

That is great news. So, this gets "pure" digital sound output in DOS, with absolutely no analogue hiss or distortion. This is a milestone, since I didn't know of any card which could do this natively in baremetal DOS. CM8738/PCI seems to be the only one?

This basically means that using the 1/8" phono / analogue outputs on the card is obsolete and much worse sound quality. In a way, therefore, this makes your card the best in pure DOS for no distortion at all. Am I understanding correctly?

Reply 3 of 15, by ludicrous_peridot

User metadata
Rank Member
Rank
Member

I dont think that's exactly the case.

For my "weird build" scenario it is certainly an interesting card, but there are better ISA options, and some would argue better PCI options.

For example Audigy, I imagine, could be set up to ouput in SPDIF with a TSR, but that would have weird sounding OPL, as I understand (unless that's also emulated with a TSR). Top range Yamaha cards have the original OPL sound and SPDIF output, but I have not heard about Win64 compatible drivers for them. This forum section has a stickie on other great cards with CMedia chips, e.g. CMI8330 and then there's also MK8330, but these are ISA. And I suspect I only scratched the surface. And as much as I like the card I only got Wave Out work via SPDIF - OPL still comes out of Speaker Out port. (CD Audio SPDIF comes out of Speaker Out too, but that's less of a problem since one can in principle pass that into an external DAC directly from the drive.)

Anyway, on my quest for 8738 redemption I started porting MPXPlay driver for it from SMEMU 1.0b5 to current VSBHDA trunk. I got it working, but it still needs a lot of polish to add OPL and MPU401 "passthrough", have gameport enabled by default, package the driver for 16-bit version of VSBHDA, but more importantly, get rid of strange "quantization noise" I am hearing in all games. And also classic X-Wing (GoG) is crashing for me at the moment.

But... oh joy, Lands of Lore 2 now works and in its 16-bit sound glory, Wing Commander 4 video playback is operational, Dungeon Keeper now works as well (crashed with SBEMU), and Aladdin now... well, still works. All of that without residual artifacts (like when mouse becomes one's theremin or there's persistent nasty whistling after game has terminated). Yet to test id DJGPP stuff... but it seems that game compatibility is going to be much much better in a few weeks time.

GA-G41M-Combo G41/ICH7 - Core 2 Quad Q9550 - DDR3 1033 - Radeon RX570 - CMI-8738 (Trust SC-5250) - X3MB (Buran)
Beetle/M/i815+ICH2 - Celeron 566Mhz - Opti 924 (Typhoon Media)

Reply 4 of 15, by ludicrous_peridot

User metadata
Rank Member
Rank
Member

A small update on the VSBHDA fork. The good: driver is working and I have tweaked resampling code to avoid sound distortion. Card's own OPL3 is also heard (still from Speaker Out). Lands of Lore 2, Cyrill Cyberpunk, Wing Commander IV, Aladdin and Quake still work. The-not-so-good: implementing passthrough for MPU-401 turned out to be more complex than I though, so no idea at the moment as to when this comes along. Also no idea when/if 16-bit PM mode support is coming...

Also I tried connecting DVD-ROM drive's SPDIF Out to an external DAC directly and it was in fact super simple. If only I had a DAC that mixed input channels thoug, because for me it's either Toslink or SPDIF at the moment...

GA-G41M-Combo G41/ICH7 - Core 2 Quad Q9550 - DDR3 1033 - Radeon RX570 - CMI-8738 (Trust SC-5250) - X3MB (Buran)
Beetle/M/i815+ICH2 - Celeron 566Mhz - Opti 924 (Typhoon Media)

Reply 5 of 15, by zyzzle

User metadata
Rank Member
Rank
Member
ludicrous_peridot wrote on 2025-08-11, 22:38:

Anyway, on my quest for 8738 redemption I started porting MPXPlay driver for it from SMEMU 1.0b5 to current VSBHDA trunk. I got it working, but it still needs a lot of polish to add OPL and MPU401 "passthrough", have gameport enabled by default, package the driver for 16-bit version of VSBHDA, but more importantly, get rid of strange "quantization noise" I am hearing in all games. And also classic X-Wing (GoG) is crashing for me at the moment.

But... oh joy, Lands of Lore 2 now works and in its 16-bit sound glory, Wing Commander 4 video playback is operational, Dungeon Keeper now works as well (crashed with SBEMU), and Aladdin now... well, still works. All of that without residual artifacts (like when mouse becomes one's theremin or there's persistent nasty whistling after game has terminated). Yet to test id DJGPP stuff... but it seems that game compatibility is going to be much much better in a few weeks time.

I was mainly talking about pcm audio / digital, not necessarily OPL / MPU401 "passthrough". It is great you got MPXplay apparently forked / working through SBEMU and VSBHDA, I assume entirely through SPDIF digital output. Again, if I'm understanding, this produces the same bit-identical output for .pcm audio through the SPDIF connection as using MpxPlay to write its output directly to .WAV files does. This is ideal, since it produces "pure" digital output with no analog distortion present -- to passthrough to your headphones and / or speaker system.

I can see OPL audio still having analogue noise since this is "generated" .pcm data, not a pure pcm signal, in the sense that its generation is subject to the quirks of the OPL quality of the CM8738 prior to its being passed through the SPDIF connection.

Reply 6 of 15, by ludicrous_peridot

User metadata
Rank Member
Rank
Member

Well, I have a forked version of VSBHDA called VSBCMI now and with it some results of testing.
As mentioned before there's only conventional 32-bit PM build available. The fork does not interfere with the chip's built in OPL and Joystick and supports UART passthrough into the chip when started with, e.g. /P330. For further tweaks (like enabling SPDIF Out and such) C3DMIX.COM from the original DOS drivers can be used after loading VSBCMI.

E: One thing I would like to add eventually is "FM passthrough" like in SBEMU (not simply opening up ports 338/339), but for now it's not there yet. Hopefully this will improve game compatibility.

Testing results for 1.7.1 form the Core 2 Quad machine in sig:

Good
----
Aladdin
Dark Forces
Rebel Assault 2
Lands of Lore 2 (Patched with Descent drivers)
Tie Fighter classic (GoG, with Defender o.t.E.)
Wing Commander III (GoG)
Tomb Raider
Quake (DOSQUAKE.EXE)
Monkey Island 2 {$} (Ultimate Talkie Beta)
Lands of Lore 2 {$} (CD)
Dune II {$}
Legend of Kyrandia {$} (CD, patched with Dune II drivers)
Hand of Fate {$} (CD, patched with Lands of Lore drivers)
Raptor Call o.t.S. (Shareware)
Descent (Shareware)
Terminal Velocity (Shareware)
Kasparov's Gambit {?} (patched)
.ROL playback with INTUNE
.MID playback with MFPLAY

Not so good
-----------
Malcolm's Revenge - works,
but crashes without a slowdown tool
Magic Pockets, Gods {$} - works
but percussion and samples in intros which use SB are
a bit out of sync with OPL tune
Wacky Wheels - works,
but hangs when quit
Cyril Cyberpunk - works,
but hangs when quit
also needs a slowdown tool to sound cleanly in levels

Nope
----
Monkey Island 2, Monkey Island 2 CD (with NewRisingSun patch) -
only work with Roland or Adlib, crash with SB
X-Wing classic (GoG, with B-Wing) -
only works with Adlib, crashes with SB
Strike Commander (GoG) music and sound in menu, but crashes main game
Inherit the Earth CD doesn't start,
also eats up all XMS
Electro Man (Free release) - hangs after short time
Blackthorne (Web release) {$} - no digitized sound or crashes

Unsure
------
Whizz (CD) - doesn't start

I have marked with {$} the games that play sound effects via FM even when they support and play digitized sample via SB at the same time.
Seeing this, certainly, not having OPL route to SPDIF Out is a disadvantage, to the extent one may think getting something like MK8330 for the ISA machine may be a better way to play those in headphones.
Not sure, but maybe experienced board members like @keropi have an advice on this particular chip?

E: games list updated

Last edited by ludicrous_peridot on 2025-08-17, 20:56. Edited 2 times in total.

GA-G41M-Combo G41/ICH7 - Core 2 Quad Q9550 - DDR3 1033 - Radeon RX570 - CMI-8738 (Trust SC-5250) - X3MB (Buran)
Beetle/M/i815+ICH2 - Celeron 566Mhz - Opti 924 (Typhoon Media)

Reply 7 of 15, by vutt

User metadata
Rank Member
Rank
Member

I have Terratec Aureon 5.1 PCI on Asus P5B-E (cpu: E7500) 512MB ram with same 6ch MX chip.
Saw your thread, decided to to have a go - it works in DOS 7.1. Usual suspects Doom and Descent seems to be running fine.
Music players are mixed bag - XTC-Player, Cubic player (all versions), Inertia player, Fast Tracker 2 are not working.
Good news - Impulse Tracker and Morgul player are working in SB16 mode.
Second Reality demo is working as well, nice!

Now question / How can I enable TOSLINK out in DOS? Terratec does not provide any DOS drivers...
And thanks for your effort!

Reply 8 of 15, by ludicrous_peridot

User metadata
Rank Member
Rank
Member

For my Trust SC-5250 the drivers came on the CD, but I imagine you could grab DOS drivers from Vogons Driver Library e.g. from the Sabrent Package.

For me running C3DMIX and enabling "Record from SPDIF" and "SPDIF Out" is sufficient to enable wave ouput via Toslink.

GA-G41M-Combo G41/ICH7 - Core 2 Quad Q9550 - DDR3 1033 - Radeon RX570 - CMI-8738 (Trust SC-5250) - X3MB (Buran)
Beetle/M/i815+ICH2 - Celeron 566Mhz - Opti 924 (Typhoon Media)

Reply 9 of 15, by vutt

User metadata
Rank Member
Rank
Member

Ok that did the trick. Wave out is working indeed, but playback speed is x4 or even faster regardless of music app. FX in doom and descent are also 'chipmunked'...
It's affecting also OPL not 4x but playback seems to be shifted few octaves.

Descent setup example: https://www.youtube.com/shorts/ZmOyIYtcaYg

Edit: Fixed now. VSBCMI needs sampling rate parameter /F44100

Last edited by vutt on 2025-08-17, 15:31. Edited 1 time in total.

Reply 10 of 15, by ludicrous_peridot

User metadata
Rank Member
Rank
Member

My card would also sadly not do the resampling, so one can run VSBCMI with /F44100 to have software reampling by the TSR instead.

GA-G41M-Combo G41/ICH7 - Core 2 Quad Q9550 - DDR3 1033 - Radeon RX570 - CMI-8738 (Trust SC-5250) - X3MB (Buran)
Beetle/M/i815+ICH2 - Celeron 566Mhz - Opti 924 (Typhoon Media)

Reply 11 of 15, by ludicrous_peridot

User metadata
Rank Member
Rank
Member

And seeing this discussion here, I have added a HOWTO. Maybe a bit too detailed for the regulars of this board liking, but I'd rather keep it detailed and step-by-step, than make assumptions about reader's experience with the matter. Feedback is welcome, and if all good, I'll update the OP with the link.

GA-G41M-Combo G41/ICH7 - Core 2 Quad Q9550 - DDR3 1033 - Radeon RX570 - CMI-8738 (Trust SC-5250) - X3MB (Buran)
Beetle/M/i815+ICH2 - Celeron 566Mhz - Opti 924 (Typhoon Media)

Reply 12 of 15, by vutt

User metadata
Rank Member
Rank
Member

@ludicrous_peridot thanks.
Guide was just in time. /F44100 sample rate parameter cured my playback speed issue.
Q: Have you customized/removed Soundfonts support from your VSBCMI fork? If not then I need to dig into (VSBHDA/VSBHDASF) documentation.

Reply 13 of 15, by ludicrous_peridot

User metadata
Rank Member
Rank
Member

I have not removed it from the code, but VSBCMI has this feature off during compile time and instead UART forwarding is enabled.
I could build a version with SF enabled instead if there's interest, but have personally never tested how it works, so will not be able to advise.

GA-G41M-Combo G41/ICH7 - Core 2 Quad Q9550 - DDR3 1033 - Radeon RX570 - CMI-8738 (Trust SC-5250) - X3MB (Buran)
Beetle/M/i815+ICH2 - Celeron 566Mhz - Opti 924 (Typhoon Media)

Reply 14 of 15, by vutt

User metadata
Rank Member
Rank
Member

Ok, clear. Let it be then. Not that critical.
Your guide is based on 32MB ram setup which is not enough for modern popular .sf2 anyway. You need to rewrite that as well.
I will experiment with mainline vsbhda and SBLive card.

Reply 15 of 15, by ludicrous_peridot

User metadata
Rank Member
Rank
Member

Yes, and I need to reference a new game recommendation for the guide, that also drives SB directly, since Electro Man seems to have issues when VSBCMI is loaded. Thanks for testing.

I have updated some of the posts above with more actual/accurate information (for the benefit of whoever comes here from search engine, etc). So the latest for now is:

1. There's clearly possibility to have FM and SPDIF In sent to Digital Output, but that requires a new card with older chip model. And if I ever get one...
2. OPL ports forwarding to be implemented in VSBCMI
3. Startup flag to enable SPDIF out during initialization to be added (as well as output of the chip revision driver deides it has found)
4. Finally, adding 16 bit version may be a good idea

See you in 1.7.2...

GA-G41M-Combo G41/ICH7 - Core 2 Quad Q9550 - DDR3 1033 - Radeon RX570 - CMI-8738 (Trust SC-5250) - X3MB (Buran)
Beetle/M/i815+ICH2 - Celeron 566Mhz - Opti 924 (Typhoon Media)