VOGONS


Reply 40 of 89, by Stretch

User metadata
Rank Member
Rank
Member

According to the last post by Lemonzest at
Chocolate Doom and OPL Passthrough for CMI8738 sound cards "Only CMI8738 cards upto Model 55 Support the OPL".

What model is your sound card? Does the card state SBPro or SB16 in the specs?

Win 11 - Intel i7-1360p - 32 GB - Intel Iris Xe - Sound BlasterX G5

Reply 41 of 89, by Ace

User metadata
Rank Oldbie
Rank
Oldbie

It's a CMI8738-LX card, and I've gotten at least two of the plain PCI versions working with hardware OPL3. This one is a PCI Express version with an ASMedia ASM1083 PCI bridge. For whatever reason, PeekPoke writes to the ASM1083 instead of the CMI8738-LX's FM enable bit. It's like the CMI8738-LX is hiding behind the ASM1083 and is inaccessible.

As for what model this is, I have no idea how to determine that. The markings on the chip are as follows:

CMI8738/PCI-6ch-LX
HRTF 3D Audio
M2A05-0112
UGGDA

The cards I got working that are plain PCI have this written on them.

Card 1:

CMI8738/PCI-6ch-LX
HRTF 3D Audio
MK084.01-0447
UYD1DH

Card 2:

CMI8738/PCI-6ch-LX
HRTF 3D Audio
MJL92-0502
UGG1DH

According to the date codes, the chipset on the PCI Express card is older than the others, so I highly doubt the PCI Express card is lacking OPL3. This does, however, concern me for my upcoming Skylake Core i7 build as I would really like to have hardware OPL3 working on that, but the motherboard I'm looking to buy (Gigabyte GA-Z170XP-SLI) uses the same ASM1083 bridge on its PCI slots, which may potentially prevent hardware OPL3 from working on the PCI cards (this board has two PCI slots, though I would prefer to only use one because if I will go CrossFire in this thing, one of the PCI slots will be obstructed, and I need to have one slot occupied by my SoundBlaster Audigy 2, which I use regularly for audio sampling).

Creator of The Many Sounds of:, a collection of various DOS games played using different sound cards.

Reply 42 of 89, by Ace

User metadata
Rank Oldbie
Rank
Oldbie

Update on the PCI Express CMI8738-LX situation.

It turns out PeekPoke was actually writing to the proper registers inside the CMI8738-LX and what I was seeing with RWEverything was actually, according to the CMI8738 datasheet, the PCI configuration spaces. Still, even with OPL3 enabled, port 388 is still closed with the PCI Express CMI8738-LX.

Then I decided to try using one of my PCI CMI8738-LX cards to force port 388 open. With both CMI8738-LXes running at once, both with OPL3 enabled via PeekPoke (verified with RWEverything as well) and with port 388 open, the only card that would put out FM sound was the PCI CMI8738-LX. The PCI Express one was completely silent. This makes me think there are one of three issues at play here preventing OPL3 from working:

1. The PCI Express buses in the test computers are not allowing anything through port 388 (I tried on a Lenovo ThinkCentre with a Core 2 Duo E8400 and an HP Workstation Z420 with a Sandy Bridge-E Xeon E5-1603)
2. The ASM1083 is not letting anything through port 388
3. The FM block is faulty on the PCI Express CMI8378-LX

I'm not sure which of these is the most probable issue, but considering user Soeuni managed to get both a YMF724 and CMI8738 working through an ASM1083 bridge on one motherboard while being unsuccessful with this same PCI bridge on another motherboard, I'm thinking the PCI Express bus has no access to port 388.

I only have three other computers I could test this out on. The first is an older Lenovo ThinkCentre running on a Core 2 Duo E6420 (upgraded from a Pentium D), the second an Acer Aspire with an AMD Athlon X2 (not sure what chipset this runs on, but it does have ATi on-board graphics, if that helps - I will check the exact chipset with CPU-Z) and the third is a custom-built PC from 2007 running on a Core 2 Quad Q6600 (this computer had the aforementioned Core 2 Duo E6420 prior to being upgraded to a Core 2 Quad) with an ASUS P5B-VM motherboard (Intel G965 Express chipset). If it doesn't work on any of these, I think the FM block is broken on the PCI Express CMI8738-LX.

Creator of The Many Sounds of:, a collection of various DOS games played using different sound cards.

Reply 43 of 89, by MaliceX

User metadata
Rank Newbie
Rank
Newbie

Hi. Just necroposting to say that I decided to upgrade my desktop from Win7 x64 to Win10 x64 today.

Custom CMI8738 driver with OPL3 mode enabled by default confirmed still working (disable driver signature enforcement). Respective Inpout32.dll also still works under Win10 x64. 😀

Reply 44 of 89, by Stiletto

User metadata
Rank l33t++
Rank
l33t++
MaliceX wrote:

Hi. Just necroposting

Seven days since the last reply in the thread? Hardly. 😀

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 45 of 89, by Ace

User metadata
Rank Oldbie
Rank
Oldbie
MaliceX wrote:

Hi. Just necroposting to say that I decided to upgrade my desktop from Win7 x64 to Win10 x64 today.

Custom CMI8738 driver with OPL3 mode enabled by default confirmed still working (disable driver signature enforcement). Respective Inpout32.dll also still works under Win10 x64. 😀

What motherboard are you using and are you using a PCI or PCI Express version of the CMI8738?

Creator of The Many Sounds of:, a collection of various DOS games played using different sound cards.

Reply 46 of 89, by MaliceX

User metadata
Rank Newbie
Rank
Newbie

Motherboard: ASUS P8Z77-V PRO (has 2x PCI slots - probably one of the last recent Intel boards with classic PCI)
OS: Windows 10 Pro x64

CMI8738 variant - PCI version
PCI\VEN_13F6&DEV_0111&SUBSYS_011113F6&REV_10\5&36BEC05D&0&0000E4

EDIT (23 Aug 2016): Win10 x64 Build 14393.rs1_release.160715-1616 (Anniversary Update) confirmed working w/ Driver Signature Enforcement disabled.

Last edited by MaliceX on 2016-08-23, 11:44. Edited 2 times in total.

Reply 47 of 89, by Ace

User metadata
Rank Oldbie
Rank
Oldbie

That's actually an Ivy Bridge motherboard with no native PCI, instead relying on an ASMedia ASM1083 PCI bridge (this allows PCI hardware to work through PCI Express). It seems these bridges are hit-or-miss, though, as it was reported earlier in the thread that the ASUS Z170-K (Skylake) motherboard, which uses the same bridge, doesn't work with the CMI8738's OPL3. In fact, I couldn't even get a PCI Express version of the CMI8738-LX with this same ASM1083 on the board working on ANYTHING with PCI Express from an ASUS P5B-VM (Socket 775 board with the Intel G965 chipset) all the way up to an ASUS P8H61-M LX3 R2.0 (Socket 1155 board with the Intel H61 chipset) and even an HP Workstation Z420 (this computer uses a Socket 2011 server board using a Sandy Bridge-E Xeon). No matter what I tried, PeekPoke would return FF for ports 220 and 388, meaning both were closed regardless of whether the legacy audio block in the CMI8738 was enabled.

I will now take the opportunity to call out anybody who owns CMI8738 cards that are PCI Express as well as those with the following Z170 boards:

-ASUS Z170-A
-Gigabyte GA-Z170XP-SLI
-MSI Z170A GAMING M3
-MSI Z170A KRAIT GAMING

If you have a PCI Express version of the CMI8738 that works with hardware OPL3 passthrough, post where you got the card from. If you have one of the four Z170 boards I listed (particularly the GA-Z170XP-SLI as that's the board I'm looking to buy for my Skylake build), post your results using a PCI CMI8738. I want to locate at least one Z170 board where I can not only put in the most powerful hardware I can get my hands on, but also as much retro hardware as possible (Roland devices are covered with a USB to MIDI adapter that works everywhere I plug it into, but OPL3 appears a bit more problematic).

On that note, here's another motherboard added to the list of INCOMPATIBLE motherboards with OPL3 passhtrough on the CMI8738: ASUS M5A78L-M/USB3. This is an AMD Socket AM3+ motherboard. No matter whether I used PeekPoke to enable the legacy audio block or used the custom drivers posted earlier in the thread, ports 220 and 388 were always inaccessible.

Creator of The Many Sounds of:, a collection of various DOS games played using different sound cards.

Reply 49 of 89, by Ace

User metadata
Rank Oldbie
Rank
Oldbie

No I haven't, but isn't DOSBox Daum limited to addresses 220 and 388? I'm going to try your driver which uses FM at CMI8738 base address + 0x50 on my Athlon X2-based Acer Aspire since that's the only computer I have on hand where ports 220 and 388 don't work to see if I can get FM out of DOSBox Daum that way (PCI cards only, I no longer have any PCI Express CMI8738s on hand).

UPDATE: It doesn't work. The card's base address on the Aspire is E800, and at E850, it's set to 00. As per usual, ports 220 and 388 read back FF. DOSBox Daum does not output any FM whatsoever.

Creator of The Many Sounds of:, a collection of various DOS games played using different sound cards.

Reply 51 of 89, by Ace

User metadata
Rank Oldbie
Rank
Oldbie

I will have to take a look at this. If you find anything in inpout32.dll to redirect ports 220 and 388 to base + 0x50 before I do, post your findings. This will make choosing a Z170 board for my Skylake mega build much less of a headache.

Creator of The Many Sounds of:, a collection of various DOS games played using different sound cards.

Reply 52 of 89, by nukeykt

User metadata
Rank Member
Rank
Member

I've modified inpout32.dll, from http://www.highrez.co.uk/downloads/inpout32/, but i haven't checked it, since my new PC has no CMI8738 card, no PCI ports 🙁 and i already have Arduino OPL3 rig. Please install original driver first(from site). Then at 42400h in modified inpout32.dll write your FM address in DWORD little endian form. Also you have to install Visual Studio 2015 redistributle.

Attachments

  • Filename
    inpout32.zip
    File size
    131.05 KiB
    Downloads
    131 downloads
    File license
    Fair use/fair dealing exception

Reply 53 of 89, by stamasd

User metadata
Rank l33t
Rank
l33t
khokh2001 wrote:

i already have Arduino OPL3 rig

I'd like to hear more about your Arduino OPL3 rig. The only thing that I could find is this: https://github.com/jetten/arduino-opl3

I/O, I/O,
It's off to disk I go,
With a bit and a byte
And a read and a write,
I/O, I/O

Reply 54 of 89, by nukeykt

User metadata
Rank Member
Rank
Member

I based schematic on midibox fm board. I have arduino mega 2560. I connected opl3 pins directly to arduino. Then i wrote simple sketch that recieves opl command through usb and patched dosbox to support arduino board. And it works. Sample: https://youtu.be/5Vf9jfgKBrY

Last edited by nukeykt on 2016-04-06, 15:34. Edited 1 time in total.

Reply 55 of 89, by Ace

User metadata
Rank Oldbie
Rank
Oldbie

I'm not sure if I'm doing this right, but I replaced the addresses at 0x42400 (both 388 and 220) to E850, dumped the driver into DOSBox Daum's directory and got... absolutely nothing. What the hell? Does DOSBox's source code need to be modified too?

UPDATE: Durrrrrrr... I'm stupid. I left out the Visual C++ 2015 redistributable installation. It's now working on Windows 10 x64 using the AMD Athlon X2-based Acer Aspire! Now to see if this works with PCI Express CMI8738s... *goes out to buy another one*

UPDATE 2: Minor problem found. There is a patched driver for the floppy version of Star Wars X-Wing here on VOGONS which uses port 220 to access the OPL3 hardware, but with your modified inpout32.dll, this patched driver outputs nothing. Only the original buggy LucasArts driver works (this one uses port 388).

Now, I did find what I presume is references to port 220 at three different locations in the driver (hex values 20 02 00 00): 0x22913, 0x24DE2 and 0x42404. I only changed 0x42404 to 50 E8 00 00 (base address of the CMI8738 is 0xE800, so the FM address is 0xE850), and that doesn't seem to have worked. Could you have a look at those specific addresses and tell me if one or all should be changed?

UPDATE 3: Changed all of them to 50 E8 00 00, still no sound.

EXTRA EDIT: Forgot to mention I'm using this driver. Does it enable the entirety of the legacy audio block or just the FM block? I remember having no sound with X-Wing using the patched ADLIB_W.IMS driver found on this site when just the FM block is enabled. Perhaps I should revert to this driver instead?

Creator of The Many Sounds of:, a collection of various DOS games played using different sound cards.

Reply 57 of 89, by Ace

User metadata
Rank Oldbie
Rank
Oldbie

The patched driver is here: Star Wars X-Wing (floppy version) Sound Blaster driver fix

It was made prior to you joining the forum, so I don't expect you to know about this. This includes a modified ADLIB_W.IMS for the floppy disk edition of Star Wars X-Wing which corrects timing errors and also accesses FM hardware via port 220 instead of the typical port 388. With your modified inpout32.dll and the drivers that access the CMI8738's FM hardware at base + 0x50, I get no sound with this driver.

EDIT: Never mind, I got it working now. Thanks for the modified inpout32.dll! Only two things left to do:

1. Get a PCI Express CMI8738 and see if you can use these with hardware OPL3 in DOSBox Daum.
2. Build a Skylake Core i7-based computer with hardware OPL3

Creator of The Many Sounds of:, a collection of various DOS games played using different sound cards.

Reply 58 of 89, by PatchedUp

User metadata
Rank Newbie
Rank
Newbie
khokh2001 wrote:

I based schematic on midibox fm board. I have arduino mega 2560. I connected opl3 pins directly to arduino. Then i wrote simple sketch that recieves opl command through usb and patched dosbox to support arduino board. And it works. Sample: https://youtu.be/5Vf9jfgKBrY

Apologies for digging up a slightly older thread. Long-time lurker too, time to start posting though!

Khokh2001 - did you write the patch to allow arduino support, if so would you be willing to share it? Would be great to just be able to plug in an opl chip and passthrough the commands straight to it for occasions when I can't lug around the old hardware.

Reply 59 of 89, by MaliceX

User metadata
Rank Newbie
Rank
Newbie

Just thought I'd mention. CMI8738 driver while it will still install under Win10 Anniversary update (currently on Build 14393.rs1), it will ONLY function when manually booting with Disable Driver Signature Enforcement. This option is no longer permanently enabled even with Test mode after installing driver - it will complain about no digital signature info on INF. 🙁 Frustrating.

Possible reason why: http://www.davidegrayson.com/signing/

Need to somehow sign the drivers in a way that won't make this thing complain every boot. 🙁