Sound driver crashes NeXTStep under VMware Fusion 3.1

NeXT Computer, Inc. -> Emulation / Virtualization

Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: andreas_g on May 27, 2010, 01:44:35 PM
I am using this sound driver for my virtual machine running NeXTStep 3.3 under VMware Fusion:

http://mitglied.lycos.de/Morgon_de/downloads/SoundBlaster16PCI-1.0.I.bs.tar.gz

I always had some problems using this driver. The system alert sounds worked just ok (like "ni.snd"), but on most other applications i do not hear any sound or just very very silent. These issues persisted from VMware Fusion v2.0.2 (first i tested) to v3.0.2.

But since I have updated VMware Fusion to v3.1 the sound driver crashes NeXTStep 3.3 after playing sound for the fraction of a second.
The system gets completely irresponsible (mouse cursor freezes, no keyboard input is recognized).

I think this driver needs some fixing.
Is there another sound driver for VMware virtual hardware out there?
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: eagle on June 03, 2010, 02:48:20 PM
I've noticed that too.  I want to upgrade to Fusion 3.1, but not if it means that my NeXT VMs won't work...

On a related note, do you know if it's possible to get audio input working in Fusion?  I want to use Lip Service, which I thought had been removed from the Intel versions.  I will be able to use Lip Service if I can get audio input working in VMware 2.x.
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: kb7sqi on June 03, 2010, 07:20:14 PM
Quote from: "eagle"I've noticed that too.  I want to upgrade to Fusion 3.1, but not if it means that my NeXT VMs won't work...

On a related note, do you know if it's possible to get audio input working in Fusion?  I want to use Lip Service, which I thought had been removed from the Intel versions.  I will be able to use Lip Service if I can get audio input working in VMware 2.x.

I just updated one of my x86 laptops to Workstation 7.1 & noticed things started getting flakey also.  Just opening up Cables.app and hitting the Tab buttion caused the VM to lock up.  I haven't had that issue w/ the same VM & Workstation 7.0.  But back to using Audio Input working in the VM.  If I remember correctly, I don't think the driver supports Audio In, just Audio Out.  I'll have to test it here in a bit.   Eagle, got your email.  How the h*ll ya been man?  It's been too long.  I'll hit you up on IM the next time I see you on. :)

Edit: I confirmed that audio in don't work on VMWare fyi.  I wish it did.
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: eagle on June 04, 2010, 05:31:48 AM
Well, if that's all it is, I don't care.  I'll upgrade to Fusion 3.1 because otherwise 3.1 is very nice.  I'll disable sound and see if it runs fine.
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: eagle on June 04, 2010, 08:29:09 AM
So, yup, I have updated my VMs in Fusion 3.1 (using the trial key that they offered for the 3.1 beta), and they all work.  Guess I'll upgrade to Fusion 3.1.

I just wish the network driver worked in Rhapsody DR1.

And, I wish the audio driver worked still. :(

So, Andreas, I have confirmed that the VMs (NS3.3, OS4.2, Rhapsody DR1/DR2) all run fine without the sound driver loaded.  Thanks for the pointer.
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: Uli on June 18, 2010, 08:32:32 PM
I also can confirm that the sound driver crashes OPENSTEP 4.2. on Fusion 3.1.  :(

Seems now that video is solved, audio becomes the problem. :cry:

Unfortunately, at least on my Mac, I'm forced to upgrade to Fusion 3.1 as Fusion 3.0.2 complains about an outdated graphics driver since I updated to Mac OS X 10.6.4 (Apple changed the graphics drivers in 10.6.4). So there's just no alternative to updating Fusion to 3.1.   :shock:

Has somebody already tried to contact the author of the audio driver?

Uli
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: Morgon on June 20, 2010, 03:13:43 PM
Quote from: "Uli"
Has somebody already tried to contact the author of the audio driver?

No one has contacted me yet. But even if, I can't help since I have no access to MacOSX or VMwareFusion nor do I have the time to debug and maybe fix the driver.

In the first place I wrote the driver for myself to get sound running with my Soundblaster16PCI. Just by luck that's just the chip VMware emulates so it works in there as well.

As stated in the driver itself I have no plans (and no time) to maintain or continue developing the driver unless it will fail on my own system. Sorry for that folks, but that's why I included source code with my driver so everyone can have a look at it for himself and fix things bugging him.

At the end maybe an idea. For my network driver VMwareFusion changed the emulated NIC with some update which can be undone by a setting in the configuration file. Maybe there is something similar happening with the sound driver now.

Sorry again for not beeing able to help.

Morgon
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: Uli on June 20, 2010, 03:42:41 PM
Quote from: "Morgon"
Quote from: "Uli"
Has somebody already tried to contact the author of the audio driver?
No one has contacted me yet.
Sorry for talking about instead of to you, but I wasn't aware that you participate in this forum. :oops:

QuoteIn the first place I wrote the driver for myself to get sound running with my Soundblaster16PCI. Just by luck that's just the chip VMware emulates so it works in there as well. [...] At the end maybe an idea. For my network driver VMwareFusion changed the emulated NIC with some update which can be undone by a setting in the configuration file. Maybe there is something similar happening with the sound driver now.
The Fusion 3.1 documentation (I have no idea if it is up-to-date) says it emulates the Sound Blaster ES1371 AudioPCI card. Is this the chip you refer to?

Edit: Uhm, yep, it is, as your website clearly states. Sorry for not remembering to look there at the moment I wrote this.

QuoteSorry again for not beeing able to help.
No need for an excuse! You've already provided a big service to the community by making your drivers available as is.  :D

I have little time myself, and unfortunately know little about writing drivers, but your source code certainly provides a starting point. I will try to contact VMware and find out what exactly changed in Fusion 3.1, and maybe this will provide a path to go on ...

Uli
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: Morgon on June 21, 2010, 04:17:44 PM
Quote from: "Uli"
I have little time myself, and unfortunately know little about writing drivers, but your source code certainly provides a starting point. I will try to contact VMware and find out what exactly changed in Fusion 3.1, and maybe this will provide a path to go on ...

Uli

The sound driver was my first driver for NeXTStep as well.

In fact I did little more than take parts of the linux alsa driver and merge them with the driver examples available and put some PCI glue to it ;) Last one was the hardest part since I had to study the Darwin kernel sources a bit to find out how to adapt the ISA audio stuff I found in the driver examples to use the PCI bus instead.

Morgon
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: rmaniac on July 03, 2010, 11:14:20 AM
I am only on a fusion demo and am pretty sad to see this happening. Why dosn't everyone who owns the product put in a support ticket and see if just maybe they will take mercy on us. I just got a copy of NeXTStep 4 and since the VESA driver is a no go Fusion with VMFB is my only option. I would like to buy fusion but not if I am already stuck at 3.0 with it. If that fails maybe we can pass the donation can to convince someone to upgrade the sound driver to better work with it.
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: Thomas on August 20, 2010, 01:24:38 PM
I can confirm that the SoundBlaster driver also crashes NeXTSTEP 3.3 in VMware Workstation 7.1 on a Windows 7 64bit system.
When clicking to select a System Warning Sound in Preferences it you hear the beginning of a sound but in the same moment the system freezes dead. :cry:

I have never tried to write or even tried to modify a NS driver so I have no clue wher to start.
If somebody finds a solutionon or could give some (rather detailed) instructions  - or links to such - how to write a NeXTSTEP driver please post it here.
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: bkmoore on August 20, 2010, 03:21:18 PM
I've been following this thread with interest, and would like to help fix the driver, but I am not a programmer, I am a hardware designer.  I think the first step would be running the driver in a debugger to find out exactly why it is crashing.  Then it should be relatively easy to fix the driver.

I checked the developer documentation on debugging drivers, but didn't find much useful information.  It suggested using a dedicated machine for driver testing and using a logic probe.  Since Fusion is software, I think we need to find a software-based approach to debugging this driver.

Brian
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: Thomas on August 20, 2010, 05:00:43 PM
After restarting the VM NeXTSTEP reported some of the driver issues in the Console. I took a snap shot of the screen but have at the moment no way to host the images to post them here (why isn't it possible to directly attach images or files here??)
Also I have debugging enabled in VMware so I may already have what you need - I just need to find a way to post it.
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: aragon on August 21, 2010, 09:47:54 AM
Why don't you just put it up to megaupload?
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: andreas_g on August 23, 2010, 04:44:50 AM
@Thomas

You can upload your screenshot to some free image hosting website; for example http://de.tinypic.com/, or just search the internet for "free image hosting".

Then you can link to that site in your post.

Thanks to everyone who helps fixing this driver!
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: bkmoore on August 25, 2010, 02:39:13 PM
I found some good documentation on debugging the kernel in the Next Developer documentation and driver kit examples.  I made a copy of my NS3.3 VM and got both virtual machines talking to each other on a peer-to-peer NeXT Network.

The basic idea is to run the driver on the slave VM, and over the network run the debugger on the master.  I was not able to get the master's debugger to link to the slaves debugger however.  I read that not all networking cards support network debugging.  So my question is if the VMXNet driver supports this feature. If not, I may have to try a different approach.

I think if I can get the sound driver going in the debugger, there's a good chance I might be able to fix the driver if it's something simple.  Otherwise, at the very least I hope to be able to know why it keeps crashing and maybe someone more knowledgeable could fix it.

On a side note, if this community wants to remain viable, we probably should develop some community expertise in driver maintenance and development.  Emulators will change, drivers will keep getting broken.

Brian
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: Morgon on August 25, 2010, 04:37:39 PM
Quote from: "bkmoore"So my question is if the VMXNet driver supports this feature. If not, I may have to try a different approach.

Unfortunately my network driver doesn't support remote kernel debuging due to the fact that the interface and driver methods needed for this aren't documented anywhere. Even the demo drivers supplied with NeXTDeveloper don't suppport kernel debugging.

When I wrote the driver in the first place I already had a look at the old darwin sources to figure out some things but even there the debugging interface wasn't that obvious to find that I could implement it easily. Since I had no need for kernel debuging at that time (debugging the network driver which had some bugs in the first release would not have been possible after all) I haven't bothered after that to find out how to implement the interface.

Maybe I have a look at that again when I find the time someday, but right now I'm too busy with other stuff much more urgent for my company. Sorry for that.

Hope you can solve the problem with the SoundBlaster driver so it gets usable again for the VMWareFusion users. From the description I would think it's a kind of memory access error happening while playing sound but as quite some years have passed since I wrote that driver I can't even give advice where to look for in the first place.

Good luck everyone, I'm happy that there are still other ppl out there using this great system and bothering to get it running better in newer VM versions. For sure I will do the same again once vital parts of the system stops working in newer versions of VMware we have to install in our company.

Morgon
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: Thomas on August 26, 2010, 05:11:28 AM
Are there any logging tools available for NeXTSTEP that allow to record a detailed log of all events going on?
I looked at the VMware log and it really doesn't show much. I figure that a detailed log from within NeXTSTEP could give more insight.
I never thought I could miss the Windors Blue Screen but in such cases it is really useful.
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: bkmoore on August 26, 2010, 11:15:52 AM
There are two other supported options to get information on a driver while it is running.  The simplest is to use the IOLog() macro at various points in the code to try to get a window into the execution.  The drawback is it interrupts driver execution to dump the data into the /usr/adm/messages file.  Also, I don't know how much use it would be if the driver crashes because it would crash before making the log entry, so I may not be able to find the cause from the log file.

The other option is to use the DDM Macros.  I am currently reading up on how to do this.  I suspect, as Morgon posted, that the problem is probably a memory access error somewhere.  I think finding the error will probably be more difficult than actually fixing it once found.  But I make no promises, as I am working on other projects and this is just a hobby for me.

Brian
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: Morgon on August 26, 2010, 04:06:12 PM
Quote from: "bkmoore"There are two other supported options to get information on a driver while it is running.  The simplest is to use the IOLog() macro at various points in the code to try to get a window into the execution.  The drawback is it interrupts driver execution to dump the data into the /usr/adm/messages file.  Also, I don't know how much use it would be if the driver crashes because it would crash before making the log entry, so I may not be able to find the cause from the log file.

When used too extensive IOLog() looses more than just the last log lines before a crash. Even when not crashing not all log lines make it to /usr/adm/messages.

That's because IOLog() uses an in-kernel buffer first before things get flushed to disk to minimize interference with driver and other interrupts. So when many IOLog() calls are done within short time you will miss other log lines too as older ones get purged from the buffer when new ones arrive while the buffer is full.

Other than you OpenStep is more than a hobby for me, but since we don't need sound for our company programs that driver falls in the category hobby for me for sure.

Morgon
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: bkmoore on August 27, 2010, 05:49:19 AM
I tried inserting some IOLog() calls in the code to get an idea where it's crashing, but for the reasons Morgon stated there was no useful information in the messages log.  I will try using the DDM viewer next.

I do 99% of my NeXT work on an actual NeXTStation Color.  But I paid good money for a copy of VMWare because it worked with a sound driver and ran on my MacBook Pro.  Even though I barely use VMWare, I feel like I wasted my money.  (I use Parallels for Windows and Linux) That's why I'm trying to fix the driver.

Brian
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: bergqvistjl on December 09, 2010, 09:49:09 PM
Hi guys, has anyone managed to get sound back up and running in VMware?
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: aragon on December 10, 2010, 04:15:06 AM
Quote from: "bergqvistjl"Hi guys, has anyone managed to get sound back up and running in VMware?

Yes,

this works with the SB16PCI driver by Jens Heise:
http://mitglied.lycos.de/Morgon_de/downloads/SoundBlaster16PCI-1.0.I.bs.tar.gz

Simply set the soundcard in vmware to autodetect andf install this driver.
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: bergqvistjl on December 10, 2010, 06:43:17 AM
Quote from: "aragon"
Quote from: "bergqvistjl"Hi guys, has anyone managed to get sound back up and running in VMware?

Yes,

this works with the SB16PCI driver by Jens Heise:
http://mitglied.lycos.de/Morgon_de/downloads/SoundBlaster16PCI-1.0.I.bs.tar.gz

Simply set the soundcard in vmware to autodetect andf install this driver.
As far as I can see this is just the same driver that crashes openstep in VMware any way, which was the entire reason why this thread was created. Did you upload the correct one?

I'm using VMware 7.1.2 in Windows 7 64-bit.
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: bkmoore on December 10, 2010, 01:34:00 PM
As far as I can tell from reading the forum, the driver only crashes in the Mac version of VMware after the 3.1 update. Earlier versions of Fusion on the Mac work fine with the driver. Windows versions of Fusion (as far as I know) are not affected.

I tried to get the driver going in a remote debugger to see where it is crashing. My suspicion is a bad memory address somewhere. The VMware network driver doesn't support network debugging. I do not have the time to do any more debugging.

Another thought, if Windows versions of Fusion are not affected, the crash might be a bug in the Mac version of Fusion itself.
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: bergqvistjl on December 10, 2010, 01:39:40 PM
Quote from: "bkmoore"As far as I can tell from reading the forum, the driver only crashes in the Mac version of VMware after the 3.1 update. Earlier versions of Fusion on the Mac work fine with the driver. Windows versions of Fusion (as far as I know) are not affected.

I tried to get the driver going in a remote debugger to see where it is crashing. My suspicion is a bad memory address somewhere. The VMware network driver doesn't support network debugging. I do not have the time to do any more debugging.

Another thought, if Windows versions of Fusion are not affected, the crash might be a bug in the Mac version of Fusion itself.
Well I am using Windows 7 64bit with WMare workstation 7.1.2 and the sound crashes exactly in the same way as the users have described previously, you can hear the beginning of the sound and the system completely freezes.
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: Stealthii on December 17, 2010, 01:06:45 PM
VMWare Fusion 3 on OSX stopped emulating SB16.  It's some ES chipset it emulates now.  For now you'll not get sound working on OSX, and I think recent versions of VMWorkstation are starting to depreciate the SB16 emulation.  Check your VM's config file and manually set it to use SB16 if it's not already set.
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: Morgon on December 17, 2010, 02:56:45 PM
Quote from: "Stealthii"VMWare Fusion 3 on OSX stopped emulating SB16.  It's some ES chipset it emulates now.  

The SoundBlaster16 PCI uses an ES chipset. It is the ES1371 to be exact. And that's just the chipset my driver is able to talk to. With a different chipset the driver won't load at all due to different PCI-IDs and thus won't cause a crash.

I know that they changed the host side of the sound system to ALSA in the latest version 7 of VMware for Linux. And with just that version the sound broke for Linux too as far as I read from this forum.  Maybethey changed something similar on MacOSX before and that affects the implementation of the sound device towards the guest as well causing these nasty crashes.

Unfortunately I still have no free time to add debugging support to my network driver and then debug the sound driver itself under VMware 7.x under linux.
Title: Workaround for crashing ens1371 driver
Post by: Deek on November 10, 2011, 02:00:16 PM
It's not exactly a workaround for the DRIVER, but if you want your bleeps and bloops to work then you can do the following:

Find the .vmx file for your VM, and add the following:

sound.virtualDev = "sb16"
sound.synth.operational = "true"
sound.baseAddr = "0x220"
sound.dma16 = "7"
sound.dma8 = "1"
sound.irq = "5"
sound.mpu401baseAddr = "0x330"
sound.Opl3BaseAddr = "0x388"


then install the SoundBlaster 16 (8 and 16 bit DMA) sound driver (it won't auto-detect).

Choose DMA Channel 1 and 7, IRQ Level 5, Port Address 0x220, and reboot the VM. It probably won't be perfect (some sounds don't seem to play on my machine), but it should at least work without crashing the OS.
Title: Sound driver crashes NeXTStep under VMware Fusion 3.1
Post by: eagle on August 29, 2012, 02:57:03 PM
Thanks for posting these instructions.  Unfortunately they don't restore sound to either my NS3.3 or my OS4.2 VM running in Fusion 4.

Has anyone by chance come up with a solution that will restore sound in Fusion 4 or 5?
Title: Re: Workaround for crashing ens1371 driver
Post by: Simple Xu on January 24, 2014, 11:55:47 PM
Quote from: "Deek"It's not exactly a workaround for the DRIVER, but if you want your bleeps and bloops to work then you can do the following:

Find the .vmx file for your VM, and add the following:

sound.virtualDev = "sb16"
sound.synth.operational = "true"
sound.baseAddr = "0x220"
sound.dma16 = "7"
sound.dma8 = "1"
sound.irq = "5"
sound.mpu401baseAddr = "0x330"
sound.Opl3BaseAddr = "0x388"


then install the SoundBlaster 16 (8 and 16 bit DMA) sound driver (it won't auto-detect).

Choose DMA Channel 1 and 7, IRQ Level 5, Port Address 0x220, and reboot the VM. It probably won't be perfect (some sounds don't seem to play on my machine), but it should at least work without crashing the OS.


this works for me, thanks! : )

p.s. vmware workstation 9.0 on Windows 7 (x64)

Go to top  Forum index