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.

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

Postby socram8888 » 2013-8-02 @ 21:20

Well, hi everybody. I've always loved the sound of the good old Yamaha synthesizers, and a few weeks ago while looking on eBay for random stuff, I saw a sound card whose picture had a YMF744, and just for 4$! It was so cheap I couldn't resist myself from buying one, so I did it. I should had asked the seller first if the picture really matched the article, but I didn't. Well, the seller instead sent me a CMI8738. He refunded my money, but nevertheless I felt a bit scammed, because I were really looking forward to that card.

Well, I am into electronics, so I searched the CMI8738 datasheet in Google, and I saw that it had an embedded OPL3 synthesizer to provide compatibility with legacy hardware and software. Interesting. Of course, the Windows 7 driver didn't allowed me to enable or use it, neither the one for Windows XP did it. I tried downloading that DosBox version that has inpout32 and allows you to use a hardware OPL3, in case the FM synthesizer was enabled by default, but it didn't work. Damn...

Later, while reading all the datasheet in order to figure out why my the card made my computer reboot every time I tried to shut it down (it turned out to be a nasty design error in the sound card PCB), I saw that the card has a flag called "FM_EN" (FM enable). I coded a small program using inpout32 that allowed me to peek and poke registers in the processor's I/O bus, and tried manually setting that flag to 1. The result?

Image

Well, the result is that I got a sound card with a very good OPL3 implementation running in a 64-bit version of Windows 7 *^_^*

The SoundBlaster isn't working, because I haven't figured out how to enable it.

Here's a recording I made using DosBox and AMusic playing AN_OTDSE.AMD https://docs.google.com/file/d/0B1Hl-pa ... sp=sharing
socram8888
Newbie
 
Posts: 21
Joined: 2013-8-02 @ 20:43

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

Postby eL_PuSHeR » 2013-8-03 @ 06:47

What does your post have to do with Windows?
Intel i7 5960X
Gigabye GA-X99-Gaming 5
8 GB DDR4 (2100)
8 GB GeForce GTX 1070 G1 Gaming (Gigabyte)
User avatar
eL_PuSHeR
Moderator
 
Posts: 6495
Joined: 2003-6-20 @ 16:39

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

Postby socram8888 » 2013-8-03 @ 07:41

Well, there's no forum dedicated to hardware, and as I've got it running in Windows, this was the forums that IMHO matched the contents better. But well, you've a mod, feel free to move it anywhere if you think this is not the right place.

Well, here's how to get the CMI's OPL3 synth working:
  1. Grab the inpout32 frontend I programmed: https://docs.google.com/file/d/0B1Hl-pa ... sp=sharing
  2. Open the Windows Device Manager. You can open it by pressing the Windows key and R, which opens the "Run" command prompt, then typing "devmgmt.msc" and pressing ENTER.
  3. Find the CMI8738 device. Its name will be something like "C-Media Audio Device" and will be in the Audio section.
  4. Right click on it and select "Properties"
  5. Choose the "Resources" tab, and take note of the "I/O Range" start value. In my case it is "C000-C0FF". You can now close the Device Manager.
  6. Open the "peekpoke.exe" tool (you have to open it as admin if you haven't used "inpout32.dll" before), and in address put the start I/O address with the two last bytes set to "1A" (ie for "C000" type "C01A"), and in "data" put "08". Press "POKE" and it should be working :)
socram8888
Newbie
 
Posts: 21
Joined: 2013-8-02 @ 20:43

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

Postby Stiletto » 2013-8-03 @ 09:27

How's about we move it to Marvin, the forum for "old hardware and retro PCs", you're one of the two. ;)
viewforum.php?f=46
"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto
User avatar
Stiletto
l33t
 
Posts: 4098
Joined: 2002-7-01 @ 21:57

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

Postby gerwin » 2013-8-03 @ 13:04

Nice work! Thanks for sharing.

I remember the YMF-724 OPL3 was available to WinAmp+Adplug in windows 98. NT systems are obviously less cooperative in that regard.
User avatar
gerwin
l33t
 
Posts: 2506
Joined: 2004-5-07 @ 19:21
Location: NL

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

Postby ik777 » 2013-8-06 @ 14:42

I installed cmi-8738 in my main PC and did what you means, but I found errors.
My card is 8738-sx, and tried it with installed and uninstalled "porttalk". Nothing different.
Run Peekpoke as Admin. See attached pic if I mistake something. Or I have a 8738 that didnt have OPL?
Attachments
8738-sx.jpg
(346.65 KiB) Not downloaded yet
User avatar
ik777
Member
 
Posts: 126
Joined: 2012-7-08 @ 13:02
Location: Seoul, Korea

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

Postby elianda » 2013-8-06 @ 17:13

gerwin wrote:Nice work! Thanks for sharing.

I remember the YMF-724 OPL3 was available to WinAmp+Adplug in windows 98. NT systems are obviously less cooperative in that regard.


For simple I/O stuff it is easy in NT. There is f.e. the giveio driver/service (that comes with older Speedfan versions f.e.)
This driver enables full port access to a process if a certain (virtual) file is tried to be opened.
This means, if you have giveio running you open a file dialog within Winamp, try to open the virtual file once. Of course Winamp can not play it, but now all ports are accessible and ADpLug will see a real OPL. No extra driver required. This works also with UART like MPU-401 interfaces.

If you have a card that has a DOS initialization tool only, you can do the following trick:
Boot Menu, Boot DOS with QEMM and Quickboot Feature enabled, initialize soundcard, reboot with Quickboot to the Boot Menu again (no BIOS) and now choose the NT OS.
Retronn.de - Vintage Hardware Gallery, Drivers, Guides, HQ Videos.
Youtube Channel
FTP Server - Driver Archive and more
DVI2PCIe alignment and 2D image quality measurement tool
User avatar
elianda
l33t
 
Posts: 2225
Joined: 2006-4-21 @ 16:56
Location: Halle / Germany

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

Postby socram8888 » 2013-8-10 @ 07:59

ik777 wrote:I installed cmi-8738 in my main PC and did what you means, but I found errors.
My card is 8738-sx, and tried it with installed and uninstalled "porttalk". Nothing different.
Run Peekpoke as Admin. See attached pic if I mistake something. Or I have a 8738 that didnt have OPL?

Did you use address C01A and data 08? Can you try downloading inpout32 from http://www.highrez.co.uk/Downloads/InpOut32/ (click on "binaries" in Downloads) and running the InstallDriver.exe tool?
socram8888
Newbie
 
Posts: 21
Joined: 2013-8-02 @ 20:43

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

Postby ik777 » 2013-8-10 @ 14:17

Did you use address C01A and data 08? Can you try downloading inpout32 from http://www.highrez.co.uk/Downloads/InpOut32/ (click on "binaries" in Downloads) and running the InstallDriver.exe tool?

I did it again installing inpout32 and even c++ 2010 something what you saying there, did "C01A" and "08" but nothing happened.
Does your peekpoke support Windows 7 x64 CJK(Chinese, Japanese, Korean) edition? I wonder peekpoke is so calm for autoit.
User avatar
ik777
Member
 
Posts: 126
Joined: 2012-7-08 @ 13:02
Location: Seoul, Korea

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

Postby socram8888 » 2013-8-10 @ 20:57

Well, try this:
Poke "00" to C01A.
Peek "388". Should return "FF" (open bus, as OPL3 is not enabled)
Poke "08" to C01A.
Peek "388". Should return 00.

Neither AutoIt nor my program do not rely on any obscure feature or hidden Windows call, so it should work under any Windows (from 2000 onwards, it technically possible to get it also working in 95-Me, but the binary I provide here was compiled using the Unicode compiler rather than the ANSI compiler)
socram8888
Newbie
 
Posts: 21
Joined: 2013-8-02 @ 20:43

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

Postby ik777 » 2013-8-11 @ 01:57

socram8888 wrote:Well, try this:
Poke "00" to C01A.
Peek "388". Should return "FF" (open bus, as OPL3 is not enabled)
Poke "08" to C01A.
Peek "388". Should return 00.


I poke 08 to C01A but 388 still return FF. (Peek C01A return 08)
My C-Media Audio version is 6.12.8.1737. I will try install another version of driver.

(Edit)
7.12.8.1740 - Fail
User avatar
ik777
Member
 
Posts: 126
Joined: 2012-7-08 @ 13:02
Location: Seoul, Korea

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

Postby socram8888 » 2013-8-11 @ 20:59

I'll get you the latest version tomorrow, 8.17.40
socram8888
Newbie
 
Posts: 21
Joined: 2013-8-02 @ 20:43

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

Postby MaxWar » 2013-8-11 @ 22:45

Very nice work here!
FM sound card comparison on a Grand Scale!!
The Grand OPL3 Comparison Run.
User avatar
MaxWar
Oldbie
 
Posts: 769
Joined: 2011-4-12 @ 23:32
Location: Canada

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

Postby nukeykt » 2013-8-28 @ 11:45

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
(144.26 KiB) Downloaded 306 times


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
Newbie
 
Posts: 98
Joined: 2013-8-28 @ 11:11
Location: Russia

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

Postby sliderider » 2013-8-28 @ 15:27

Now all we need is for someone to be ambitious enough to do this with a Vortex based card and get A3D working. Any takers?
User avatar
sliderider
l33t++
 
Posts: 5754
Joined: 2010-6-25 @ 13:02

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

Postby nukeykt » 2013-8-29 @ 08:38

canyon.mid on cmi8738 opl3(WIndows 7 x64, my opl3 midi synth):
canyon.mp3
(2.76 MiB) Downloaded 293 times
nukeykt
Newbie
 
Posts: 98
Joined: 2013-8-28 @ 11:11
Location: Russia

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

Postby ik777 » 2013-9-15 @ 03:37

Informed this method in korean retro game forum and found out who got working.

Audiotrak maya 5.1 gold (8738 mx)- works, but never works on asrock z77 extreme 6 M/B.(reinstalled W7-64x again, but vains) works on Asus P5E.
I don't know this is UEFI issue or chipset problem. Need M/B list which is support your method and kernel mode OPL3 synth drivers.

My board was z77 Ex4, vains.
User avatar
ik777
Member
 
Posts: 126
Joined: 2012-7-08 @ 13:02
Location: Seoul, Korea


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

Postby MaliceX » 2013-9-24 @ 07:31

Any suggestions on getting YMF724-based PCI cards working? Obviously there are no Win7 x64 drivers. I do have a spare card lying around which doesn't have a preamp.
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 ik777 » 2013-10-12 @ 09:24

Bought 2 8738-mx cards this week. (Audiotrak maya 5.1, Hoontech Extream 5.1 gold)
Tried on MSI P45 Neo mainboard today and finally it works. Now peekpoke makes address388 to 00.
(Tried HD video capturing, but e2160+7300GT are not suitable to do)
Sounds and behaviors are almost identical to real OPL3 chip!!!

Problem is fm reset requires on first play. (since there's no way to use mixer in any platform)
Some game or setup can do it, so running those games or applications first and I can enjoy real FM music.
And some games (confirmed Duke Nukem 3D and especially on Japanese DOS/V games with OPL3 TSR) won't sounds even did reseting action.
User avatar
ik777
Member
 
Posts: 126
Joined: 2012-7-08 @ 13:02
Location: Seoul, Korea

Next

Return to Sound

Who is online

Users browsing this forum: aquishix, Error 0x7CF and 3 guests