I've got the OPL3 synth from a CMI8738 working in Windows 7 x64

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

Re: I've got the OPL3 synth from a CMI8738 working in Windows 7 x64

Postby Stretch » 2016-3-14 @ 00:40

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?
Win98SE - Intel SE440BX-2 - Pentium II 233 Mhz - 256 MB System Ram - Voodoo 3 1000 AGP - Yamaha YMF-724 PCI - Soundblaster 32 ISA
Stretch
Member
 
Posts: 255
Joined: 2013-11-16 @ 00:57

Re: I've got the OPL3 synth from a CMI8738 working in Windows 7 x64

Postby Ace » 2016-3-14 @ 01:49

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.
Ace
Oldbie
 
Posts: 525
Joined: 2010-10-16 @ 17:35
Location: Montreal, Canada

Re: I've got the OPL3 synth from a CMI8738 working in Windows 7 x64

Postby Ace » 2016-3-15 @ 18:58

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.
Ace
Oldbie
 
Posts: 525
Joined: 2010-10-16 @ 17:35
Location: Montreal, Canada

Re: I've got the OPL3 synth from a CMI8738 working in Windows 7 x64

Postby MaliceX » 2016-3-22 @ 14:00

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. :)
User avatar
MaliceX
Newbie
 
Posts: 86
Joined: 2004-10-03 @ 05:03
Location: Australia, VIC

Re: I've got the OPL3 synth from a CMI8738 working in Windows 7 x64

Postby Stiletto » 2016-3-22 @ 15:50

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
User avatar
Stiletto
l33t
 
Posts: 3840
Joined: 2002-7-01 @ 21:57

Re: I've got the OPL3 synth from a CMI8738 working in Windows 7 x64

Postby Ace » 2016-3-29 @ 03:30

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.
Ace
Oldbie
 
Posts: 525
Joined: 2010-10-16 @ 17:35
Location: Montreal, Canada

Re: I've got the OPL3 synth from a CMI8738 working in Windows 7 x64

Postby MaliceX » 2016-3-29 @ 14:06

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-8-23 @ 11:44, edited 2 times in total.
User avatar
MaliceX
Newbie
 
Posts: 86
Joined: 2004-10-03 @ 05:03
Location: Australia, VIC

Re: I've got the OPL3 synth from a CMI8738 working in Windows 7 x64

Postby Ace » 2016-3-29 @ 15:14

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.
Ace
Oldbie
 
Posts: 525
Joined: 2010-10-16 @ 17:35
Location: Montreal, Canada

Re: I've got the OPL3 synth from a CMI8738 working in Windows 7 x64

Postby nukeykt » 2016-3-30 @ 11:44

Have you tried to check FM at base+50h address?
nukeykt
Newbie
 
Posts: 91
Joined: 2013-8-28 @ 11:11
Location: Russia

Re: I've got the OPL3 synth from a CMI8738 working in Windows 7 x64

Postby Ace » 2016-3-30 @ 15:08

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.
Ace
Oldbie
 
Posts: 525
Joined: 2010-10-16 @ 17:35
Location: Montreal, Canada

Re: I've got the OPL3 synth from a CMI8738 working in Windows 7 x64

Postby nukeykt » 2016-3-31 @ 04:49

I think it is possible to hack inpout32.dll to redirect 0x220 and 0x388 port to base + 50h. It should work with DOSBox SVN Daum.
nukeykt
Newbie
 
Posts: 91
Joined: 2013-8-28 @ 11:11
Location: Russia

Re: I've got the OPL3 synth from a CMI8738 working in Windows 7 x64

Postby Ace » 2016-3-31 @ 05:20

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.
Ace
Oldbie
 
Posts: 525
Joined: 2010-10-16 @ 17:35
Location: Montreal, Canada

Re: I've got the OPL3 synth from a CMI8738 working in Windows 7 x64

Postby nukeykt » 2016-3-31 @ 08:29

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
inpout32.zip
(131.05 KiB) Downloaded 32 times
nukeykt
Newbie
 
Posts: 91
Joined: 2013-8-28 @ 11:11
Location: Russia

Re: I've got the OPL3 synth from a CMI8738 working in Windows 7 x64

Postby stamasd » 2016-3-31 @ 11:08

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
stamasd
Oldbie
 
Posts: 1143
Joined: 2014-8-31 @ 19:59
Location: Connecticut

Re: I've got the OPL3 synth from a CMI8738 working in Windows 7 x64

Postby nukeykt » 2016-3-31 @ 11:58

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-4-06 @ 15:34, edited 1 time in total.
nukeykt
Newbie
 
Posts: 91
Joined: 2013-8-28 @ 11:11
Location: Russia

Re: I've got the OPL3 synth from a CMI8738 working in Windows 7 x64

Postby Ace » 2016-3-31 @ 16:17

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.
Ace
Oldbie
 
Posts: 525
Joined: 2010-10-16 @ 17:35
Location: Montreal, Canada

Re: I've got the OPL3 synth from a CMI8738 working in Windows 7 x64

Postby nukeykt » 2016-3-31 @ 21:57

Nice to hear that it works. You have to change only 0x388 , don't change any 0x220 values. Sorry. But i don't remember anything about these drivers.
nukeykt
Newbie
 
Posts: 91
Joined: 2013-8-28 @ 11:11
Location: Russia

Re: I've got the OPL3 synth from a CMI8738 working in Windows 7 x64

Postby Ace » 2016-4-01 @ 01:13

The patched driver is here: viewtopic.php?t=28364

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.
Ace
Oldbie
 
Posts: 525
Joined: 2010-10-16 @ 17:35
Location: Montreal, Canada

Re: I've got the OPL3 synth from a CMI8738 working in Windows 7 x64

Postby PatchedUp » 2016-6-01 @ 22:47

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.
PatchedUp
Newbie
 
Posts: 1
Joined: 2016-6-01 @ 22:26
Location: Antarctica

Re: I've got the OPL3 synth from a CMI8738 working in Windows 7 x64

Postby MaliceX » 2016-11-13 @ 11:41

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. :(
User avatar
MaliceX
Newbie
 
Posts: 86
Joined: 2004-10-03 @ 05:03
Location: Australia, VIC

PreviousNext

Return to Sound

Who is online

Users browsing this forum: No registered users and 1 guest