VOGONS


First post, by socram8888

User metadata
Rank Newbie
Rank
Newbie

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?

6IJsN4r.jpg

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-pamwJ8kd … dit?usp=sharing

Reply 1 of 89, by eL_PuSHeR

User metadata
Rank l33t++
Rank
l33t++

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)

Reply 2 of 89, by socram8888

User metadata
Rank Newbie
Rank
Newbie

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-pamwJ8ka … dit?usp=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 😀

Reply 3 of 89, by Stiletto

User metadata
Rank l33t++
Rank
l33t++

How's about we move it to Marvin, the forum for "old hardware and retro PCs", you're one of the two. 😉
General Old Hardware

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

Stiletto

Reply 4 of 89, by gerwin

User metadata
Rank l33t
Rank
l33t

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.

--> ISA Soundcard Overview // Doom MBF 2.04 // SetMul

Reply 5 of 89, by ik777

User metadata
Rank Member
Rank
Member

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?

Reply 6 of 89, by elianda

User metadata
Rank l33t
Rank
l33t
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, Videos. Now with file search
Youtube Channel
FTP Server - Driver Archive and more
DVI2PCIe alignment and 2D image quality measurement tool

Reply 7 of 89, by socram8888

User metadata
Rank Newbie
Rank
Newbie
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?

Reply 8 of 89, by ik777

User metadata
Rank Member
Rank
Member

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.

Reply 9 of 89, by socram8888

User metadata
Rank Newbie
Rank
Newbie

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)

Reply 10 of 89, by ik777

User metadata
Rank Member
Rank
Member
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 "38 […]
Show full quote

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

Reply 11 of 89, by socram8888

User metadata
Rank Newbie
Rank
Newbie

I'll get you the latest version tomorrow, 8.17.40

Reply 12 of 89, by MaxWar

User metadata
Rank Oldbie
Rank
Oldbie

Very nice work here!

FM sound card comparison on a Grand Scale!!
The Grand OPL3 Comparison Run.

Reply 13 of 89, by nukeykt

User metadata
Rank Member
Rank
Member

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.

The attachment cmiopl.zip is no longer available

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.

Reply 14 of 89, by sliderider

User metadata
Rank l33t++
Rank
l33t++

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?

Reply 15 of 89, by nukeykt

User metadata
Rank Member
Rank
Member

canyon.mid on cmi8738 opl3(WIndows 7 x64, my opl3 midi synth):

The attachment canyon.mp3 is no longer available

Reply 16 of 89, by ik777

User metadata
Rank Member
Rank
Member

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.

Reply 18 of 89, by MaliceX

User metadata
Rank Newbie
Rank
Newbie

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.

Reply 19 of 89, by ik777

User metadata
Rank Member
Rank
Member

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.