Sound Blaster 16 Emulation Failure

Discussions about using non Windows and Linux guests such as FreeBSD, DOS, OS/2, OpenBSD, etc.

Re: Sound Blaster 16 Emulation Failure

Postby mpack » 30. Aug 2015, 10:01

Unless you can demonstrate a problem with a supported guest OS - or just explicitly point out the bug - then I'm afraid that any bug report is likely to end up in the recycle bin.

In any case, I doubt that an issue from 2008 is relevant now.
mpack
Site Moderator
 
Posts: 25501
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Sound Blaster 16 Emulation Failure

Postby vbguyny » 3. Sep 2015, 18:16

I was able to duplicate the issues under guest OS Windows XP SP3. Is that still considered a supported OS?
vbguyny
 
Posts: 6
Joined: 10. Apr 2012, 05:43

Re: Sound Blaster 16 Emulation Failure

Postby mpack » 3. Sep 2015, 18:38

Yes, XP is a supported guest. If you can demonstrate a bug in VirtualBox that affects XP then you should certainly report it on the BugTracker or the dev mailing list. Links to both are available in this site's community page.

Note however that SB16 is not the suggested sound card emulation for an XP guest (that is 'AC97), so I wouldn't necessarily expect the devs to jump into this.
mpack
Site Moderator
 
Posts: 25501
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Sound Blaster 16 Emulation Failure

Postby litwr » 5. Sep 2015, 20:34

Nobody mentioned that Virtualbox never supported direct mode of Sound Blaster. :( It is odd because this mode is the easiest. It is very useful as the illustration of the way of any digitizing process work. It uses the CPU only so it makes possible to skip unrelated hardware details required for DMA. Does anybody know the easier way to teach the principles of working with the digital sound? IMHO the direct mode is the best for the 1st lesson.
It looks like that this mode maybe easy to realize. It requires support of only one command (10h) for DSP_WRITE register... It is very easy. Just write 10h and then a sound level byte.
I'm not sure should I make the ticket at Bugtracker for this bug? Is there any hope to fix this?
litwr
 
Posts: 8
Joined: 28. Aug 2015, 09:33

Re: Sound Blaster 16 Emulation Failure

Postby mpack » 5. Sep 2015, 21:59

It's only a bug if a documented feature doesn't work. Is that the case? Lacking a feature that you want does not make it a bug.

In any case I'm sorry, this is a user self help forum, we do not speak for the devs. You can raise a bug ticket, you can indicate how easy a fix would be, then you have to wait and see. You could also develop the fix yourself, and donate the result.
mpack
Site Moderator
 
Posts: 25501
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Sound Blaster 16 Emulation Failure

Postby litwr » 6. Sep 2015, 11:31

mpack wrote:It's only a bug if a documented feature doesn't work. Is that the case? Lacking a feature that you want does not make it a bug.

The Virtualbox documentation claims that it supports Soundblaster but the direct mode is the natural feature of any Soundblaster. So we have an obvious bug. BTW Dosbox works with direct mode quite fine.
I start to prepare the ticket...
litwr
 
Posts: 8
Joined: 28. Aug 2015, 09:33

Re: Sound Blaster 16 Emulation Failure

Postby vbguyny » 7. Sep 2015, 03:29

I will not be submitting a ticket because the issue was really with my hubby OS and I just fixed it by enabled the A20 line.
vbguyny
 
Posts: 6
Joined: 10. Apr 2012, 05:43

Re: Sound Blaster 16 Emulation Failure

Postby mpack » 7. Sep 2015, 10:29

Didn't you say that you had verified the same problem with XP?
mpack
Site Moderator
 
Posts: 25501
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Sound Blaster 16 Emulation Failure

Postby vbguyny » 7. Sep 2015, 22:03

Yes, that is correct, but I am only interested in trying to get my OS to work. The only reason I posted here is because the symptoms where the same as the original post to this thread.
vbguyny
 
Posts: 6
Joined: 10. Apr 2012, 05:43

Re: Sound Blaster 16 Emulation Failure

Postby over_clox » 1. Dec 2015, 13:59

Hmmm... It's been about 6 YEARS since I originally posted this issue, am I reading correctly that this is STILL an issue? Honestly I haven't really tested or done much debugging since then because I started a massive programming project of my own since then in another field altogether. I had hoped my work in trying to get down to the bottom of this issue would at least have clued the developers off into the actual problem, but I see people are STILL posting in this thread 6 years later so I assume it must still be an issue. I have glanced over the source code files in the repository recently, but to be honest I am not well oriented in the overall structure of the emulation code of the low level hardware to be of much assistance except pointing out my findings regarding the incorrect DMA memory address values returned as stated in my original post from within the emulated DOS and hardware side.

I do still use VirtualBox and still think it is a fantastic product of many coders even more experienced than myself, but as with any programming project, still has bugs to iron out.

My findings were discovered while coding my own simplified SB16 driver sample for DOS/DOSBox and any other properly functioning emulators, and referred to Creative Labs specs too.
My code for this was written in QuickBASIC 4.5 and is still available at qb45.com for anyone possibly looking to get into it to resolve this issue sooner or later.

You can download my source at QB45 from here: SB16Wave.bas
over_clox
Volunteer
 
Posts: 167
Joined: 5. Apr 2008, 22:43
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP, Ubuntu 10.04, Legacy Testing

Re: Sound Blaster 16 Emulation Failure

Postby mpack » 1. Dec 2015, 15:23

over_clox wrote:Hmmm... It's been about 6 YEARS since I originally posted this issue, am I reading correctly that this is STILL an issue?

You phrase that like it should have been a priority, when the truth is that the SB16 had been dead for at least 15 years when you first posted, and I doubt it's relevance has increased in the intervening six years. When resources are tight, things like this take a back seat, quite possibly permanently.
mpack
Site Moderator
 
Posts: 25501
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Sound Blaster 16 Emulation Failure

Postby over_clox » 1. Dec 2015, 15:36

over_clox wrote:My code for this was written in QuickBASIC 4.5 and is still available at qb45.com for anyone possibly looking to get into it to resolve this issue sooner or later.


I DID say sooner or later, I DO understand that. I've read some of your former posts and it seems like you're TRYING to discourage people from looking into it anyways, why? This problem lies somewhere within the emulation of the DMA system itself and probably affects a hell of a lot more than just this or any one particular guest, though it is possible that assumption could be mistaken as well. I just kinda figured that within 6 years, someone might have gotten down to the heart of this issue and may have simultaneously fixed dozens of other miscellaneous issues at once too.

I've just reloaded everything and retested it all, and have confirmed this bug still exists. I bet if nothing else there are a lot of people that might still like to play old DOS games or something too, but hardly any of them work without freezing up, because of this issue.

Something did seem to slightly change about the bug though, because the value it settles on may no longer be random. I've only tested with one wave file so far, but now the value seems to consistently settle on 0x1fff, instead of the expected 0xffff. Maybe it's now within some internal buffer size or something, I don't know.

I know nobody's in a serious rush to fix this, but by the nature of your posting, you may as well be posting this same sort of thing throughout all legacy guest OS threads. I'm just here to try to help, don't shoot the messenger.
over_clox
Volunteer
 
Posts: 167
Joined: 5. Apr 2008, 22:43
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP, Ubuntu 10.04, Legacy Testing

Re: Sound Blaster 16 Emulation Failure

Postby mpack » 1. Dec 2015, 17:29

I'm not trying to discourage anything except the expectation that this needs looking at, when it obviously doesn't, because nobody except you few guys has noticed it in all this time, which means that 0 paying customers care about it.
mpack
Site Moderator
 
Posts: 25501
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Sound Blaster 16 Emulation Failure

Postby over_clox » 1. Dec 2015, 20:02

mpack wrote:Quotes from your previous posts:

Unless you can demonstrate a problem with a supported guest OS ...
If you can demonstrate a bug in VirtualBox that affects XP then you should certainly report it on the BugTracker or the dev mailing list.
Note however that SB16 is not the suggested sound card emulation for an XP guest (that is 'AC97), so I wouldn't necessarily expect the devs to jump into this.
Didn't you say that you had verified the same problem with XP?

We're not here talking about AC'97, XP, or even commercially supported guest operating systems for that matter.
This is posted under "Other Guests" which in large part covers unsupported guest operating systems too, including DOS.
You're a little out of place referring to Windows operating systems at all here, that's in another forum section altogether.

mpack wrote:In any case, I doubt that an issue from 2008 is relevant now.

If the bug has not been fixed, and I have confirmed it has not, then it didn't just magically disappear with time.

mpack wrote:It's (SB Direct Mode) only a bug if a documented feature doesn't work. Is that the case? Lacking a feature that you want does not make it a bug.

Direct Mode is fully documented in the official Creative Labs Sound Blaster Series Hardware Programming Guide, Chapter 3 Section 4.

mpack wrote:I'm not trying to discourage anything except the expectation that this needs looking at, when it obviously doesn't ...

Again, this issue may affect much more than just SB16 emulation, it may affect DMA access in general which could be causing a great many other issues as well.
DMA means Direct Memory Access and is one of the critical components which much of the higher end legacy hardware emulation is built on.
This issue may be as simple as locating and fixing one line of code, and could possibly fix critical issues with thousands of older games and programs!

mpack wrote:... because nobody except you few guys has noticed it in all this time, which means that 0 paying customers care about it.

At present, this thread has received almost 15,000 views. It may not be relevant to you or paying users, but it's apparently relevant to quite a few users at least.

I do realize this is not on everyone's high priorities list, but it is open source software. I haven't even bothered the devs with a bug ticket.
It's been 7 years really since my original post, and obviously it hasn't even been on my OWN high priorities list, so nobody needs to state the obvious.
Also, it seems that these things are NOT being totally neglected. DevDMA.cpp was last updated 2 months ago. DevSB16.cpp was last updated a month ago.

So PLEASE stop discouraging productive work towards development and bugfixes. My next post will completely reorganize this entire thread for everyone.
over_clox
Volunteer
 
Posts: 167
Joined: 5. Apr 2008, 22:43
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP, Ubuntu 10.04, Legacy Testing

Re: Sound Blaster 16 Emulation Failure

Postby over_clox » 1. Dec 2015, 20:03

Since this thread has been starting to get slightly messy and a little off topic at times, I'll regroup and organize everything here:

Many people still seem to be having issues with Sound Blaster 16 emulation in VirtualBox, where they might get stuttering sound or freezups. Years ago I wrote a simple ~15KB QuickBASIC 4.5 DOS playback utility for the SB16 based on simplified sources from my own prior works and works of others, and also including double and triple checking everything against Creative Labs official documentation. I even over-coded the reset routine in my playback program to account for occasional timing hiccups in DOSBox and other emulators to make sure it'll always initialize on real hardware or functioning emulators.

At some point I tested my working program in VirtualBox, only to find it causes the VirtualBox DOS guest to freeze. I tested dumping internal variables of my program to screen to see what was going on, and it seems there's a problem of some sort regarding the internal handling of the DMA Counter not resetting properly to 0xffff like it's supposed to according to specifications, which would allow the program to continue on to the next segment of audio. My original tests were quite some time ago and would originally settle on somewhat random values. Now the bug still exists, but the value now seems to consistently settle on 0x1fff for whatever reason.

In my SB16Wave.bas program, you can combine CountLo% and CountHi% at lines 110 and 111 together into a single variable to see this DMA counter value.

Glancing over the VBox DevSB16.cpp source code file, there seem to be a lot of comments along the line of "todo" and bugs and other miscellaneous incomplete sections.
I specifically refer to lines 150, 169, 409, 475, 545, 769, 895, 1084, 1089, 1158, 1303, 1522*, 1602*, 1716, 1752, 1806, 2216 as areas of interest in the current build.
Most importantly I would suggest looking around the area around lines 1522-1602 to see how VBox handles this counter value internally. It's a mess to me but I'd start there.

My experiments with this included testing SB16 driver installation and sound playback under MS-DOS 6.22, and Windows 95 guests.
Sound emulation does manage to work in 95 somehow with built-in drivers, but freezes while installing official Creative Labs drivers.

The configuration for the SB16 is completely undocumented in the VirtualBox Documentation, Chapter 3 Section 7, and not configurable from the GUI either.
I don't know what mode the original 95 driver puts the SB16 in for playback, but Device Manager reveals the configuration to be: BLASTER=A220 I5 D1 H5


Organized Resources and Documentation:
VirtualBox Community
VirtualBox Bug Tracker

VirtualBox DMA Emulation Source Code
VirtualBox Sound Blaster 16 Emulation Source Code

Intel 8237A High Performance Programmable DMA Controller Datasheet
Creative Labs Sound Blaster Series Hardware Programming Guide

Rain 2x 2.0 for Windows 95/98 High Idle CPU Usage Issues
Creative Labs Sound Blaster 16 Driver CD for DOS and Windows 95/98
SB16Wave.bas for QuickBASIC 4.5
over_clox
Volunteer
 
Posts: 167
Joined: 5. Apr 2008, 22:43
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP, Ubuntu 10.04, Legacy Testing

PreviousNext

Return to Other Guests

Who is online

Users browsing this forum: No registered users and 3 guests