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 datajake1999 » 2017-10-22 @ 03:57

Peeking 388 returned FF, but when peeking port 50, I was getting some values such as D7, C2, and 7F.
datajake1999
Newbie
 
Posts: 45
Joined: 2016-4-17 @ 17:04

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

Postby Kamerat » 2018-2-08 @ 23:49

Kamerat wrote:Got OPL passthrough working on my Philips PSC605 under Windows XP, but unlike my Zoltrix Nightingale it can't mix OPL to the SPDIF output. I think the whole PSC60x series uses rebranded CMI8738 chips and on the HP OEM PSC1602 you can actually find both rebranded and non rebranded CMI chips.

Using the same card behind a PCI to PCIe bridge under Windows 98 right now, accessing the FM synth through port C850h. I initialize the card with "SETAUDIO.COM U" before I boot Windows. Haven't tried it under NT based Windows yet.

cmi8738pcie.png


Edit: Tried with Adlib Tracker II under pure DOS, also working when set to port C850h (C800h is the PCI base address of the card revealed by SETAUDIO).
Edit 2: Seems like it's unnecessary to initialize the sound card at all, the FM synth is always aviable at port C850h.
Edit 3: Using DOSMid it seems like the MPU interface are located at xx40h, C840h in my case.
User avatar
Kamerat
Oldbie
 
Posts: 862
Joined: 2014-3-14 @ 19:09
Location: Oslo, Norway

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

Postby Kamerat » 2018-3-04 @ 08:12

Tried with the Pericom PI7C9X111SL bridge (same as Windows 98) under Windows 7 with DosBox. FM works fine but sampled sound playback of the card disappears after a short while, not sure if it happens because of the FM synth.

Another use of the PCI base adress FM synth is within a virtualized environment using PCI passthrough as shown in this video.
User avatar
Kamerat
Oldbie
 
Posts: 862
Joined: 2014-3-14 @ 19:09
Location: Oslo, Norway

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

Postby kodi » 2018-12-20 @ 21:23

nukeykt wrote:I've got the OPL3 synth working by modifying CMI8738 driver. I used this driver : http://code.google.com/p/cmediadrivers/.

The attachment archive is containing modified drivers(You must install this driver before),opl3 midi synth and other helpful tools.
cmiopl.zip


OPL3 MIDI synth based on WDK sample.

x64 drivers must be signed by "driver signature enforcement overrider"(Only Windows vista and seven)

Tools:
HBA.bat - enables OPL3 mode(write 0x01 to 0x105)
HBDA.bat - disables OPL3 mode(write 0x00 to 0x105)
TVFIX.bat - enables OPL3 mode, disables 4op mode, sets Tremolo and Vibrato to high and disables percussion mode(fixing some issues of midi synth)
P.S : you must launch these tools repeatedly, because these tools some times don't working.


@nukeykt : I hope you will see this (because as new member I am not allowed to send private messages) and be so kind to help me.

So, I want to use your "cmiopl.zip" on WinXP, but what's inside your "cmiopl.zip" fails (I get "yellow exclamation marks" in Control Panel-->Device Manager). My best guess is because you built it with Windows Drivers Kit (WDK) for Windows7.

So, I installed WDK for WinXP and I can build Microsoft "fmsynth" sample - in WDK for XP, it's located in:

"\WinDDK\6000\src\audio\fmsynth"

but I have several questions:

1) Did you make any changes in "fmsynth" or it's the original Microsoft code? Please, if you made some changes provide patch file (or details what to patch/change manually) and so I can build it for XP. My understanding is that you used WDK7600 for Win7. I can compare if there are any differences between "fmsynth" from WDK6000 (WinXP) and from WDK7600(Win7), but still I need to know if you made any additional changes.

2) Same for the "cmediadrivers" - it's the original code or you made changes? Please, if you made changes provide patch file (or details what to patch/change manually) and so I can build it for XP.

Thank you!
kodi
Newbie
 
Posts: 5
Joined: 2018-12-09 @ 16:37

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

Postby nukeykt » 2018-12-21 @ 09:12

kodi wrote:@nukeykt : I hope you will see this (because as new member I am not allowed to send private messages) and be so kind to help me.

So, I want to use your "cmiopl.zip" on WinXP, but what's inside your "cmiopl.zip" fails (I get "yellow exclamation marks" in Control Panel-->Device Manager). My best guess is because you built it with Windows Drivers Kit (WDK) for Windows7.

So, I installed WDK for WinXP and I can build Microsoft "fmsynth" sample - in WDK for XP, it's located in:

"\WinDDK\6000\src\audio\fmsynth"

but I have several questions:

1) Did you make any changes in "fmsynth" or it's the original Microsoft code? Please, if you made some changes provide patch file (or details what to patch/change manually) and so I can build it for XP. My understanding is that you used WDK7600 for Win7. I can compare if there are any differences between "fmsynth" from WDK6000 (WinXP) and from WDK7600(Win7), but still I need to know if you made any additional changes.

2) Same for the "cmediadrivers" - it's the original code or you made changes? Please, if you made changes provide patch file (or details what to patch/change manually) and so I can build it for XP.

Thank you!

Sorry, but i don't remember much about these drivers anymore. IIRC only modification i did for CMI driver itself was enabling FM_EN register bit by default. For OPL3 driver i've made various tweaks to mimic Windows 98 SB16 driver. Not sure i still have source code for it though. i recommend you try this fork of my emulated OPL3 driver instead, which supports hardware OPL3 passthough instead of software OPL3 emulation(OPL3 emulation is actually perfect btw :D).
nukeykt
Newbie
 
Posts: 99
Joined: 2013-8-28 @ 11:11
Location: Russia

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

Postby kodi » 2018-12-21 @ 17:15

nukeykt wrote:Sorry, but i don't remember much about these drivers anymore. IIRC only modification i did for CMI driver itself was enabling FM_EN register bit by default. For OPL3 driver i've made various tweaks to mimic Windows 98 SB16 driver. Not sure i still have source code for it though. i recommend you try this fork of my emulated OPL3 driver instead, which supports hardware OPL3 passthough instead of software OPL3 emulation(OPL3 emulation is actually perfect btw :D).


many thanks for your reply, i am going to try your suggestion.
kodi
Newbie
 
Posts: 5
Joined: 2018-12-09 @ 16:37

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

Postby DragonSlayer » 2018-12-21 @ 19:42

@nukeykt: Thanks for the link to OPL3EMU. That's very cool what they've been able to do with your awesome OPL3 driver. This will keep me entertained for hours! LOL.

BTW, I'm a huge fan of your work. Thank you for freely sharing your work with the world. :)
"There are only 10 types of people in the world; those who understand binary, and those who don't."
User avatar
DragonSlayer
Newbie
 
Posts: 15
Joined: 2016-10-15 @ 17:44
Location: USA

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

Postby yawetaG » 2018-12-22 @ 08:05

Just FWIW, the official CMI8738 DOS driver (all drivers are still available from Asus' website for the Cusi-M motherboard) has this in the readme:

PCI audio DOS utilities instructions

* SETAUDIO.COM

DOS initial program

The following are the parameters format:
/Gx : x=0 disable game port, x=1 enable (default)
/Mx : x=0 disable MPU-401 MIDI port, x=1 enable (default)
/IOxxx : Set SB I/O port to 220(default),240,260 or 280.
/FMxxx : Set FM I/O port to 388(default),3C8,3E0 or 3E8.
/MPUxxx : Set MPU-401 MIDI port to 330(default),320,310,300.

* FIXEPIC.EXE

EPIC DOS games patch program

We found that there are some EPIC DOS games can not detect PCI
audio. This is due to these games using instruction loop as time
counter not a real constant period. In high speed CPU PC, the loop
time become shorter. That is reason that games can not detect PCI
audio. If you meet this problem, please run patch program to fix.
All of fixed files will backup to *.old.


More interestingly, the readmes for the various Windows versions give information on the different chip revisions and also imply that it's possible to detect which revision is used by a CMI8738-based card via software. Unfortunately none of those mention the FM synth (unless I missed it).
yawetaG
Oldbie
 
Posts: 1171
Joined: 2016-6-14 @ 14:36
Location: Netherlands

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

Postby kodi » 2018-12-26 @ 18:11

@yawetaG:

there is FM synth block inside most (if not even all) revisions of CMI8738, but there is not much research from the community and the information is very confusing and even contradictory.

you can see the post from the great and real expert "nukeykt" that I quoted few posts ago:

viewtopic.php?f=62&t=36445#p319488

as you can see he even did some improvements of the FM synth on CMI8738 with software settings:

"TVFIX.bat - enables OPL3 mode, disables 4op mode, sets Tremolo and Vibrato to high and disables percussion mode(fixing some issues of midi synth)"

but again not much information with those fixes what is the actual quality.

My understanding is that the previous C-Media chipset CMI8330 that's found on ISA cards has acceptable FM quality - that's why cards with CMI8330 are now very expensive. Also, as CMI8330, the CMI8738 has digital output, which you can use to bypass low-quality DAC and that's a big plus. In fact the reason why in this forum thread "opl3 hardware pass-thought" with CMI8738 is the main discussion.

Anyway, I already put some time in research, but need to find time and mood to write some long post here :)

BTW, just to make one last note for the time being - to determine the revision is very easy not just in software, but with visual inspection of the markings on the chip - that gives addition information as well. maybe, I should start with writing some small guide about it...
kodi
Newbie
 
Posts: 5
Joined: 2018-12-09 @ 16:37

Previous

Return to Sound

Who is online

Users browsing this forum: The Serpent Rider and 2 guests