Doom Marine
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > Chocolate Doom and OPL Passthrough for CMI8738 sound cards
 
Author
All times are GMT. The time now is 12:50. Post New Thread    Post A Reply
Porsche Monty
Member


Posts: 454
Registered: 06-10


I just can't seem to get this working on XP Pro SP3. No problems in DOS, though, even with the oldest drivers.

Here's the relevant lines from stdout.txt:

"S_Init: Setting up sound.
IOperm_InstallDriver: ioperm driver installed.
OPL_Init: No OPL detected using 'Win32' driver.
IOperm_UnInstallDriver: ioperm driver uninstalled.
OPL_Init: Using driver 'SDL'"

Here's the instructions I followed: http://chocolate-doom.svn.sourcefor...anch/README.OPL

Any help would be greatly appreciated.

Old Post 06-16-10 17:27 #
Porsche Monty is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
GhostlyDeath
Forum Retard


Posts: 1027
Registered: 08-05



Porsche Monty said:
I just can't seem to get this working on XP Pro SP3. No problems in DOS, though, even with the oldest drivers.

Here's the relevant lines from stdout.txt:

"S_Init: Setting up sound.
IOperm_InstallDriver: ioperm driver installed.
OPL_Init: No OPL detected using 'Win32' driver.
IOperm_UnInstallDriver: ioperm driver uninstalled.
OPL_Init: Using driver 'SDL'"

Here's the instructions I followed: http://chocolate-doom.svn.sourcefor...anch/README.OPL

Any help would be greatly appreciated.



"For the cards listed above with (*) next to them, OPL support is
disabled by default and must be explictly enabled in software."

You made sure that it is enabled?

Old Post 06-16-10 18:49 #
GhostlyDeath is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Porsche Monty
Member


Posts: 454
Registered: 06-10



GhostlyDeath said:


"For the cards listed above with (*) next to them, OPL support is
disabled by default and must be explictly enabled in software."

You made sure that it is enabled?



Ain't that what ioperm is supposed to do?

Old Post 06-16-10 18:56 #
Porsche Monty is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Super Jamie
Forum Staple


Posts: 2722
Registered: 03-08


Is it an option in the Device Manager driver page?

According to the ALSA Wiki, OPL quality in the 8738 is pretty poor anyway.

Old Post 06-16-10 23:41 #
Super Jamie is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Porsche Monty
Member


Posts: 454
Registered: 06-10


Mine sounds just great and has none of the problems plaguing the emulated alternative, so even just for that it's totally worth it. Unfortunately Chocolate Doom freezes when emulated OPL is used jointly with 11khz, thus it's either this (assuming it wouldn't freeze to begin with) or a much suboptimal 22khz + post-DAC lowpass workaround.

Anyways, I don't think I should be seeing anything in the device manager as the XP drivers don't support OPL, besides: "To do hardware OPL, Chocolate Doom must access the chip directly"

Old Post 06-17-10 00:18 #
Porsche Monty is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
fraggle
Filled with the code of Doom


Posts: 7513
Registered: 07-00



Porsche Monty said:
Mine sounds just great and has none of the problems plaguing the emulated alternative, so even just for that it's totally worth it. Unfortunately Chocolate Doom freezes when emulated OPL is used jointly with 11khz, thus it's either this (assuming it wouldn't freeze to begin with) or a much suboptimal 22khz + post-DAC lowpass workaround.

Anyways, I don't think I should be seeing anything in the device manager as the XP drivers don't support OPL, besides: "To do hardware OPL, Chocolate Doom must access the chip directly"

The CMI8738 has hardware OPL, but it isn't enabled on the chip by default. Under Linux there's a driver option to turn it on but I don't know how it's done under Windows. There might be something you can set in the driver properties pane. Search for options named something like "Legacy FM" or similar.

I think I actually have a CMI8738 at home, so if I get the time maybe I'll try to get hardware OPL working on it under Windows.

Old Post 06-17-10 13:30 #
fraggle is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Porsche Monty
Member


Posts: 454
Registered: 06-10


Alright, here's all I found: http://img64.imageshack.us/img64/9836/capture1zt.png

Right now I'm using unofficial drivers optimized for low latencies, but I could go back to the official ones if that's what it takes.

Old Post 06-17-10 14:01 #
Porsche Monty is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
fraggle
Filled with the code of Doom


Posts: 7513
Registered: 07-00


Tried my card. I get the same options, and there's no sign of anything obvious that would enable OPL support.

I also tried under Linux but that doesn't detect an OPL card either. After looking through the kernel source it looks like later CMI cards don't support hardware OPL. From what I get, it looks like that is the case for my card, at least.

Old Post 06-17-10 21:36 #
fraggle is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Super Jamie
Forum Staple


Posts: 2722
Registered: 03-08


What driver are you using in Windows?

What model 8738 chipset do guys you have?

I looked through some old boxes and dug out a "CMI8738/PCI-SX", it's a big old ugly green one, not a trim angular cut-down card like you see on eBay these days. According to the C-Media Driver page there are 8738-SX, -MX, and -LX chips available.

I wonder if there's some way to read that chip_version string from the Windows driver info? (or even how one would go about reading it from the Linux kernel module?)

Old Post 06-17-10 22:06 #
Super Jamie is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Super Jamie
Forum Staple


Posts: 2722
Registered: 03-08


Looking through the XP SB16 driver (C:\Windows\inf\wdma_ctl.inf) you can see it creates ports for a device "FMSynth", whereas the new CMI driver doesn't create this at all (grepping for "ynth" in the directory with the inf files returns nothing). I am guessing to enable OPL in Windows with an 8738 you need an old driver that still has FM Synth support in it?

This driver I found dated 2006 has references to "FMSynth" in the inf file, perhaps give that a go?

Old Post 06-17-10 22:24 #
Super Jamie is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Porsche Monty
Member


Posts: 454
Registered: 06-10


I just went back to the driver you provided but I'm not seeing any new potentially useful options. OPL works perfectly in DOS and FMSynth is in wdma_ctl.inf, but that's about it.

Guess we just don't know how to actually enable it on XP.

-SX, -MX, and -LX must be the newer models. I remember the official driver downloads from a year ago only listed "cmi-8738" For whatever reason, each of the 3 drivers offered today work just fine with my ancient standalone card.

Old Post 06-18-10 00:18 #
Porsche Monty is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Super Jamie
Forum Staple


Posts: 2722
Registered: 03-08


With the 2006 XP driver, if you run Chocolate with ioperm does it open the synth port when it does OPL_Init, or does it still not detect?

I found model differences here:
http://www.cmedia.com.tw/ProductsDe...no=28&PSerno=30


# 8738-SX supports 4CH DAC surround output for movies and 3D games.
# 8738-MX provides additional digital interface S/PDIF IN/OUT (44.1K and 48KHz).
# 8738-LX/MX supports 6CH DAC 5.1 surround output for movies and 3D games.

wdma_ctl.inf is the XP Creative Labs driver, don't use that for your 8738.

I will have a play around with this as well, you've got me curious. I'm gonna try find one of those Yamaha PCI cards too.

fraggle, should OPL-branch output correctly on an 8738 under Linux with OPL enabled in modprobe? If so, I assume it will work correctly with a true SB16 as well?

Old Post 06-18-10 00:43 #
Super Jamie is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Porsche Monty
Member


Posts: 454
Registered: 06-10


After testing every single driver in existence I can safely conclude that OPL never really worked in XP. Older CMAUDIO.INF's contain many references to "WDM Interface FMSynth", but since these generic drivers were supposed to work in Win9X as well, that's probably why they're there.

One could also speculate about the possibilities of bogus drivers not installing properly, which wouldn't be surprising considering the record.

For all I know there's no way to "enable" OPL in XP, drivers plainly and simply have to support it, which doesn't seem to be the case here so all there's left is figure out a way to talk directly to the hardware, like a driver would, and quite honestly I don't see anybody signing up for it.

What a shame :(

Old Post 06-18-10 20:31 #
Porsche Monty is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Maes
I like big butts!


Posts: 12371
Registered: 07-06


You mean there is no way to use the OPL chips in a direct register-banging mode? Wouldn't surprise me under XP/2000/Vista. I recall there was an utility called PortTalk that should allow for that, but I never got it to work right with an AWE64.

It is however possible to use the OPL chips as a regular MIDI device if you're happy with the stock drivers- but then you'll have almost zero control on the timbres used, unless you find where they're defined, usually inside some obscure .dll

Old Post 06-18-10 22:50 #
Maes is online now Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
fraggle
Filled with the code of Doom


Posts: 7513
Registered: 07-00



Super Jamie said:
I will have a play around with this as well, you've got me curious. I'm gonna try find one of those Yamaha PCI cards too.

fraggle, should OPL-branch output correctly on an 8738 under Linux with OPL enabled in modprobe? If so, I assume it will work correctly with a true SB16 as well?

Yes and yes. My normal card is a YMF724.

This whole CMI card thing is interesting though. From the driver source it seems pretty clear that older revisions support OPL and newer ones don't. Porsche Monty's card obviously supports it because it works under DOS. So it looks like you need both the right card AND the right driver to get it to work.


Maes said:
You mean there is no way to use the OPL chips in a direct register-banging mode? Wouldn't surprise me under XP/2000/Vista. I recall there was an utility called PortTalk that should allow for that, but I never got it to work right with an AWE64.
No, it's more complicated than that. The C-Media CMI8738 and Yamaha YMF724 both support OPL in hardware, but it has to be enabled by turning on a configuration flag in a specific PCI register on the card. You need to configure the driver to do that, and once you have, you can write to port 0x388 just like there's a real adlib/SB there.

Under Linux you can enable it by setting options to the driver modules in your modprobe.conf file. The Windows XP driver for the YMF724 seems to turn it on by default. The Windows XP driver for the CMI8738 doesn't, and there doesn't seem to be any way to tell it to.

The I/O port permissions issue is a completely separate issue and one that I'm aware of. Chocolate Doom on NT-based systems (XP etc) will load a driver called ioperm.sys that can enable access to the OPL I/O port. It essentially does the same thing as PortTalk. I didn't use PortTalk because the license was offensively draconian.

Porsche Monty said:
For all I know there's no way to "enable" OPL in XP, drivers plainly and simply have to support it, which doesn't seem to be the case here so all there's left is figure out a way to talk directly to the hardware, like a driver would, and quite honestly I don't see anybody signing up for it.

What a shame :(

The really frustrating part is that it's literally just a few bits that need to be turned on - bit 3 (VOICE_EN) in function control register 1 and bit 19 (FM_EN) in the miscellaneous control register. If my card had OPL on it, I might have tried reverse engineering the driver to see if it could be patched to turn the appropriate bits on. As it stands, I don't have any way to test it though.

Old Post 06-19-10 00:20 #
fraggle is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
GhostlyDeath
Forum Retard


Posts: 1027
Registered: 08-05


Maybe you can turn it on using the hidden \\Device\ files you aren't supposed to know about?

Old Post 06-19-10 02:05 #
GhostlyDeath is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Porsche Monty
Member


Posts: 454
Registered: 06-10


If it's not prohibitively inconvenient for you, I'd be willing to test it and provide the necessary feedback.

Old Post 06-19-10 12:41 #
Porsche Monty is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
fraggle
Filled with the code of Doom


Posts: 7513
Registered: 07-00



Porsche Monty said:
If it's not prohibitively inconvenient for you, I'd be willing to test it and provide the necessary feedback.
I've found from experience that debugging by proxy is very tedious and frustrating so I don't really want to try that. If you can provide the manufacturer and exact model number of your card, and ideally a photo of the board, I might be able to get an identical card off eBay to test with.

Old Post 07-14-10 10:31 #
fraggle is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Porsche Monty
Member


Posts: 454
Registered: 06-10


Alrighty. I tried my best to identify this sound card but to no avail. No visual clue beyond the manufacturer of the chip and all hardware identification software reports is "CMI8738". Too many generic CMI8738-based cards out there and not a single tineye match, it's a waste of time, but here's the good news; I found an alternative, another CMI8738 with hardware OPL.

http://www.genius-europe.com/en/pro...40&ID=30&ID3=80

It arrived yesterday and I spent most of the day experimenting with it. Results? different-sounding (if not bad) but fully functional hardware OPL/Adlib support for at least DOS (haven't tried it on 9x-based systems) While worthless for regular sound in DOS, OPL/Adlib works fine and that's what actually matters (the fact that it exists) Also, and just as I was expecting, the XP drivers have been completely stripped of OPL support.

The card is dirt cheap, still in production and apparently compatible with pretty much every Microsoft OS ranging from DOS to Win7.

Old Post 07-18-10 01:57 #
Porsche Monty is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Super Jamie
Forum Staple


Posts: 2722
Registered: 03-08


Nice find. OPL isn't dead yet.

Old Post 07-18-10 02:24 #
Super Jamie is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
fraggle
Filled with the code of Doom


Posts: 7513
Registered: 07-00


I did some further investigation and it seems like the chip version number corresponds to the last two digits of its name, so CMI8738 = version 38, etc. I think my card might actually be a CMI8768, but I need to confirm. If I'm right then I just need to buy any card that has a real CMI8738 chip on it.

Thanks for the link though!

Old Post 07-18-10 15:08 #
fraggle is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Porsche Monty
Member


Posts: 454
Registered: 06-10


Here's an update. I was recently googling for a second opinion on the OPL dilemma and came across this nice little open-source CMI8738 driver: http://code.google.com/p/cmediadrivers/downloads/list

It works flawlessly here and the download is barely a few kb's big.

I then spent some time trying to get it to compile (the source assumes an older version of WinDDK so it wasn't as straightforward as I had envisioned) and when I finally succeeded, I proceeded to modify the source as an attempt to integrate the register bit tweak you spoke about, just to realize I had absolutely no idea what I was doing.

This thing literally compiles in 3 seconds and the driver installs in about 10, and most of those 10 secs account for the time WinXP takes to pop up the warning message telling you they're not Microsoft-approved drivers.

Anyways, do you think I could get a hand over here? cmireg.hpp sounds like a good place where to start but I wouldn't even know what to do with those 0x numbers.

Regards.

Old Post 06-13-11 22:33 #
Porsche Monty is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Lemonzest
Mini-Member


Posts: 61
Registered: 09-06



fraggle said:
I did some further investigation and it seems like the chip version number corresponds to the last two digits of its name, so CMI8738 = version 38, etc. I think my card might actually be a CMI8768, but I need to confirm. If I'm right then I just need to buy any card that has a real CMI8738 chip on it.

Thanks for the link though!



Only CMI8738 cards upto Model 55 Support the OPL, Model 68, aka the 7.1 Channel version of the card (8768) had it removed for some reason.

Old Post 07-21-12 16:43 #
Lemonzest is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 12:50. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > Chocolate Doom and OPL Passthrough for CMI8738 sound cards

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.