SoundBlaster support on VMWare Player

Well it’s kind of skinny to be honest.  It works, Kinda though.

You can either have AdLib/OPL3 emulation, OR the PCM/Wave.

You can’t do both at the same time.

Really.

Edit the .vmx file, and look for the sound section..

sound.present = “TRUE”
sound.virtualDev = “sb16”
sound.opl3.enabled = “TRUE”
sound.autodetect = “TRUE”
sound.baseAddr = “0x220”
sound.dma16 = “7”
sound.dma8 =”1″
sound.irq = “5”
sound.mpu401baseAddr = “0x330”
sound.Opl3BaseAddr = “0x388”

And add in something like this.  To get the opl3 emulation set it to TRUE, but the PCM won’t work.  Set it to false and you’ll get sound.

And of course set your environment variable for MS-DOS

SET BLASTER=A220 I5 D1 H7 P330 T6

yay.

I’ve tested it with Doom v1.1, and it works.  Of course you can ‘cheat’ and setup a network game, with one player with Adlib, and the other with the Sound Blaster.  But I know that’s crazy!

33 thoughts on “SoundBlaster support on VMWare Player

  1. Hi! I’m the VMware engineer who wrote the OPL3 emulation. I did it in my free time as a random bit of fun and hackery, and I hope this totally-unsupported feature provides a bit of fun for you and your readers too.

    Sadly, it hasn’t yet been possible to make the OPL3 emulation coexist with the SB16’s PCM/wave emulation… The programming models used internally to generate sound for these two emulated devices are about a decade apart, which makes for a huge challenge, and I am sure you understand that OPL3 support is not going to be a top business priority. Maybe when I find a bit more free time… And I need to code up the OPL3’s rhythm instruments too. 🙂

    Meanwhile… OPL3 plus Adlib Tracker II satisfies my craving for retro music. Enjoy!

    • It doesn’t surprise me that the code has drifted somewhat… But it must be nice to know that people appreciate the work!

      • Indeed it is cool to hear of folks using it. I really do hope to finish it up at some point in the future though… I know that Doom without PCM audio is … meh. Not nearly as much fun as it should be. 🙂

  2. @dariusd – From what I heard the entire US VMWare team was disbanded earlier this year. I take it the AdLib/OPL3 & PCM/Wave was never made compatible?

    Side note, by using QEMU I got much farther than I ever have with VirtualBox or Virtual PC 2007 getting the DOS sound in my old game MegaRace to work. I actually got it to work a few times though I can’t get it to consistently work. The next time I boot up the game even after making no config changes it will no longer work. I never got this far in the other two VM programs. Perhaps QEMU will continue to improve and one day work. I know I could use Dosbox but that’s just not as fun 🙂

    • You should try PCem! It runs the old BIOS’s and is just as painful to setup as the real thing!

      It’s really cool, and really painful to remember how much PC’s of the 80’s and 90’s were.

    • Yes, the ongoing development of the VMware Workstation Pro, VMware Workstation Player and VMware Fusion products have been moved to new teams in Beijing, and they no doubt have their hands full getting up to speed with these very complicated software projects!

      Besides the loss of the awesome and fun gang of hosted UI engineers/crazies/friends, those of us working on the virtualization engine and virtual devices are relatively unaffected. I’ve still been working away slowly on improving Adlib/OPL3 and its coexistence with SB16 PCM, in my “free time”.

      As a shameless tease of stuff that’s in the pipeline: I have Adlib/OPL3 + SB16 PCM actually working together on a private build of Fusion, but not yet reliably working on Workstation Pro/Player — the homogeneity of OS X systems makes this much easier to get running on Fusion! I’ve also massively reduced the CPU burden of Adlib/OPL3 emulation and improved many aspects of the OPL3 timers to better handle some weird corner cases that the currently-released products don’t handle so well.

      I wouldn’t hold your breath waiting for SB16 to suddenly make great leaps forwards in the released products, though. It’ll take a lot more work to turn my hackery into something that we can actually ship to customers, and this pesky “job” thing keeps getting in the way by expecting me to do “serious” things… 😉

      shakes fist at reality

      We’ll get there. Some day.

  3. I know that this post has aged, but I’d love to see this working. I have been searching for years for a product that can replicate the original experience. Is there any hope?

    • Yes, there is hope, but there’s not much to show right now.

      The latest Tech Preview of VMware Workstation includes some relatively minor OPL3 tweaks and bugfixes so that the FM audio output is even more faithful to the original hardware, and as a bonus it also places much less burden on the host CPU — Earlier versions of Workstation struggled to play some more complex pieces of music even on a fast host system… with the latest Tech Preview, that’s no longer the case.

      Simultaneous PCM and FM output will still need a bit more work before it’s ready. It’s on my to-do list — as is getting it working in VMware Fusion. Sorry it’s not making observable progress. I work on this fun stuff when I can… and mostly that’s on the weekends…

      • Hi Darius,

        Stumbled upon your comments here on having SB16 emulation working with Fusion on Mac hosts. As of Fusion 10.0.1 recently released, SB16 emulation is apparently still not available. Any idea as to when it will be there? It works fine under Virtualbox but I really would like Fusion to make it work, as it’s so much more efficient than Virtualbox. Thanks

  4. I im using Workstation 12.5 , but i wasnt able to find most of setting mentioned above i only see – sound.virtualDev = “sb16”.
    Midi not working at all, sound only with some games, im using SB16 dos driver from Zamba 31in1 pack.

    • That is how it works you can have pcm audio or midi but not both at the same time.

      I believe you need to manually put the changes in yourself

  5. I am pleased to report good progress – and a few weekends well spent, in my humble opinion.

    The newly-released Workstation 15.5 and Fusion 11.5 now include SB16 support… with simultaneous PCM/wave and OPL3/Adlib output… and even SB16 MIDI Out forwarded to the host. The same capabilities are available across VMware Workstation Player (https://www.vmware.com/products/workstation-player.html ), VMware Workstation Pro (https://www.vmware.com/products/workstation-pro.html ) and VMware Fusion (https://www.vmware.com/products/fusion.html ), across all supported host operating systems.

    It’s still all quite unofficial, and still all under a special configuration option which must be manually added… even on Fusion. I have documented the improvements and setup instructions here: https://communities.vmware.com/docs/DOC-40539

    There are still *plenty* of gaps in our SB16 emulation, so please refrain from setting your expectations *too* high, but now I think all the basics are there and should be usable in Workstation and Fusion on all hosts.

    Enjoy!

      • Heh, I didn’t even know that Qemu had MIDI passthrough, let alone that I was conversing with the person who added it! Way cool… I HAVE FOUND MY PEOPLE! 🙂

        But yeah, DOOM is pretty crazy with FluidSynth on the host doing the MIDI rendering. All good fun!

    • Thank you for sticking with it!.

      I can report that this works on VMware Fusion 11.5.1 for my Openstep 4.2.

      At first, I couldn’t seem to get anything to play sound. But I tired NEXTIME and it played the audio tracks just fine.

      Not sure why the other apps won’t play, but this is definitely progress.

    • I don’t have a massive game collection to try, so I don’t have extensive test results.

      Known not working: Brøderbund’s _Prince of Persia_ (the game tries to use older DSP commands to play audio, the emulated DSP stops responding, and the VM crashes after a few seconds); Monkey Island demo (the game fails with a divide error on my test machine here, probably a game timing loop problem due to the CPU being too darned fast, perhaps Mo’Slo or similar might help).

      Known working: _DOOM_, the _Commander Keen_ series, _Raptor_, the demo of _Day of the Tentacle_, Win95’s Media Player/Sound Recorder.

      Known implementation gaps: Some legacy DSP commands from SB/SBPro/SBPro2 should be supported by an SB16 but are not yet included in our emulation. There are still timing issues with DMA operations which can lead to pops/clicks or truncated sounds… these will be difficult to fix. I *still* haven’t implemented the OPL3 built-in rhythm instruments.

      In short, I’d love to hear your feedback on what you find works and what could use improvement, particularly if your most favorite games encounter problems. You all probably have a vastly superior collection of DOS games and programs to try out, and I’m always open to feedback.

  6. I tested couple of games:
    https://docs.zoho.com/sheet/published.do?rid=8mn7n8efd4da1b3034db1a04bf92a9209e034
    First sheet – at the end in right are collums. Vmware workstation 15.5 + DOS 7.1
    Some games are not working as expected, because are from SB, SB pro era.. but there are exception as Golden Axe, but there is other Vmware problem, has is running to slow and there are not pc speaker sounds.. so its marked as NOT OK – im testing everything as whole platform.
    From big games Duke3D and Blood are running..

    Otherwise in collumn B you can see which game from my list (170 games) has demos, shareware version etc.. – because this great era, most of them do, i created testing package with all of them which you can download here, it could speed up testing for everyone who want to test it.. I dont have problem give someone editing rights..
    Otherwise games with * in name are pc speaker only because original target was test whole platform and most fast machine as possible, these you can ignore, or just test, if speaker and Vmware are ok with them.

    Testing package Dropbox dowload link:
    https://drive.google.com/file/d/1NVtYeaaCw76s2TKxHv62p3RZTexh8Piq/view

  7. Tested couple more games, summary can be find on line 37 in sheet OS-Support-Summary.

    Otherwise if you need some details about SB, here is link to Tiidos project, this guy made whole own Yamaha based soundcard dos SB compatible soundcard.
    One hint is in quite need of cash, some small reward for help or cards order, would be nice. https://www.vogons.org/viewtopic.php?f=62&t=61282

  8. The latest Tech Previews of Workstation and Fusion, released today, include a few minor Sound Blaster 16 improvements.

    Firstly, there is no longer the need for any .vmx file edits to add configuration options… if your VM has a Sound Blaster 16, it now has all the enhancements I’ve worked on over the last few years.

    I’ve made several minor enhancements to the mixer so that it behaves a bit more like the real SB16’s mixer, and various enhancements to the way the DSP and mixer handle a reset. These might improve compatibility with some games and applications… perhaps. They are unlikely to hurt, at least.

    I have not been able to make progress on the backwards-compatible DSP commands or the timing of DMA reads/writes… that is all a bit more challenging to get right. I will keep investigating as my spare time permits.

    (I have also made some compatibility improvements to the Ensoniq AudioPCI ES1371. That might be less likely to generate much excitement here. )

    VMware Workstation Tech Preview 20H1: https://communities.vmware.com/thread/624829

    VMware Fusion Tech Preview 20H1: https://communities.vmware.com/thread/624828

    As usual, feedback is welcome.

    • I am currently on VMware Workstation 15.5.6 and got it working in a Windows 95 VM for which I earlier had AudioPCI as the sound device but now have SB16. It works in several DOS games I tried – Disney’s Beauty and the Beast, Disney’s The Jungle Book, Dangerous Dave, M-Cycle Racing, Virtual Pool, Electronic Arts Grand Slam Bridge II.

      But at the same time it crashes and takes down the whole VM when I tried to check Where in the World is Carmen Sandiego, Prince of Persia 1 and 2 (as noted). In other games like Disney’s The Lion King or Disney’s Aladdin, it produced no sound (note that Aladdin requires both XMS and EMS) if running from DOS. Anyway it’s safe to run it from DOS with a VM snapshot so even if the VM crashes, Windows won’t get an improper shutdown.

      Once VMware Workstation 16 final is out and ready for purchase, I am eager to upgrade to it. I will check how much then it has improved and report back. Also the DirectX 11 and USB 3.1 Gen 2 (20 Gbps) virtualization support in VMW Workstation 16 is something I want anyway.

    • Also I would like to add (very important) that my Windows 95 VM crashes with a critical error when I shut it down when the sound.virtualDev = “sb16” line is present in the VMX. But not otherwise.

    • THANK YOU for the support, hard work and efforts towards bringing us Adlib/OPL3 + SB16 PCM.

      Apart for work and business, I use VMware on my free time to relive and pass time with glorious releases of the past, and to tell the truth, most of all It is fussy and tiresome to use one PC for DOS, another for Windows 9x and another for WinXP for more modern Software,
      I always wanted to virtualize all those machines as to avoid the constant switching and have the readily available and should any problem arise just to restore the image to a previous state.

      Sooo, THANK YOU!
      Keep up the awesome work and do keep us posted whenever you can with Interesting news about your work and your progress towards Immortality!

  9. Thanks for progress and info. Above is my compatibility testing list and package, did you tried it? If yes which games are running fine with sound?

    That Ensoniq AudioPCI ES1371 improvements are what for Win95/Win98 virtualization?

    • I looked through your list but have still not yet tested much myself. I have obtained a real SB16 (yay!) and have been comparing it with our emulation and trying to make things match more closely… Once I handle the “low hanging fruit” and have our emulated SB16 looking more like a real SB16, I will try to find the time to do some real testing. Easier to fix the known discrepancies first… After that will come debugging whatever still doesn’t work.

      ES1371 improvements in this release focus on host OS support… ES1371 should now work with newer sound APIs compared to before: DirectSound on Windows hosts, AudioQueue on macOS hosts, and coming soon will be PulseAudio on Linux hosts. The guest OS side should see little or no difference to the behavior of the emulated device.

  10. Hi, i tried the SB16 Emulation with Workstation Player, and it works sometimes.
    I tried for example quake shareware and the sound is playing, but sometimes the game crashes. Taht’s for info only.
    I appreciate the work on this emultion too ! 🙂 A “real” VM in VMware for DOS Retro feeling is much more fun than dosbox or other Hypervisors…

  11. @dariusd, Can you provide the code for your OPL3 emulator core, or at least provide the sources for your your research in developing the core?

Leave a Reply to dariusd Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.