VOGONS

Common searches


Sound Blaster Emulator for Dos?

Topic actions

First post, by Malik

User metadata
Rank l33t
Rank
l33t

Is it even remotely possible, even theoritically, that a Sound Blaster/Pro/16 emulator be made for users of ANY sound card to be used in actual Dos?

For that matter, is it possible to create a Dosbox for Dos? A program which can emulate sound cards floppy drives emulation etc. for Dos? Does this sound crazy or is it possible?

Why?

1. Because Dos can be installed on any x86/amd64 architecture.

2. A fully functional FreeDOS is now available for those who don't have Dos software.

3. A Dosbox-in-Dos emulation can make use of current super fast and multi-core processors.

4. Ability to boot into Dos, at fast speeds with current processors (maybe the fastest booting OS in a modern system), forget about registry mess-ups and maintain multi-configs in dos and have the luxury of emulating of a Sound Blaster using any PCI Sound Cards or built-in audio codecs.

5. It'll be fun (maybe not for the developers, but for us users! 😁)

6. Ability to run resource -hungry dos games in modern systems at full speed. (In fact, these games might be crying asking to slow down the superfast speed! 😁)

Sometimes, on a free weekend, when you're tired and bored to even play some games, you might be thinking like what I have just written above. Please ignore this idea (read boredom blabbers or day dreaming ideas) if it sounds like plain nonsense! At least you guys can understand that I'm bored. Other sites may be offended that there's a crazy guy on the loose! 🤣

(No, this is NOT an (delayed) April Fool crap. It's just an ordinary crap! 😁)

7. And oh, also the ability to introduce an actual software based slowdown on fast systems, with more scalability than ICD.EXE alone would be nice, too!

In the end, just a Sound Blaster or Pro emulator with built-in good slow down utility and a VESA compatible driver is all that I need in a modern system.

5476332566_7480a12517_t.jpgSB Dos Drivers

Reply 1 of 81, by Sune Salminen

User metadata
Rank Member
Rank
Member

The main problem with your idea is that you'd still need a driver for the hardware that plays back the output from your emulated Sound Blaster.

...someone would have to write DOS drivers for every modern on-board sound or X-fi card in existence in order for your emulator to play any sound.

I don't see that happening.

Reply 2 of 81, by Malik

User metadata
Rank l33t
Rank
l33t

I don't know anything about hardware programming, but here's something which is more of science-fiction than facts :

1. How about just invoking the ports 388h, 330h, 300h, I/O 220-260, and the interrupts 2, 9, 5 and 7 to send signals to the sound cards that a program want the sound card to let out the sounds requested by the SB emulator? Or something like that. (Something like how Dosbox emulates all these ports and interupts in Windows, Linux and Mac?)

I guess the PCI architecture will prevent this? But if an ALS4000 or Vortex2 can boast of SB/Pro compatibility, hmmm....

2. I'm trying to see a sound card as nothing but a....say.. a MT32 or SC55; i.e. Send the signals via the "doorway" 330 (388 for fm requests) to let the sound cards serve back the requests by playing the required waveforms.

3. Something like the paper-fold example of explaining time travel or warping in space theory - bypass the driver requirement by directly communicating with the sound cards by "contacting directly" the sound cards, via the usual common audio hardware ports and interrupts on the pc.

Then, it'll be like the SB emulator itself is like a universal driver, where it'll be using the pc's ports as a bridge to access the sound cards' functions directly, rather than depending on a driver.

4. Maybe it'll be easier to emulate a wavetable sample - more like requesting the stored instruments in a SC-55 for eg., than emulating a FM synthesis? I dunno.

I think I'm REALLY free this weekend. 🤣

5476332566_7480a12517_t.jpgSB Dos Drivers

Reply 3 of 81, by Mau1wurf1977

User metadata
Rank l33t++
Rank
l33t++

Well, even Creative struggled doing that. They ended up buying Ensoniq, because they found a better solution.

It certainly doesn't appear to be a trivial matter...

My website with reviews, demos, drivers, tutorials and more...
My YouTube channel

Reply 4 of 81, by Zup

User metadata
Rank Oldbie
Rank
Oldbie

...and even a "better solution" was not a "good solution".

Also, you'll have the same limitations as SB DOS drivers (conflicts in protected mode and those things).

The good news is that (in Linux) most onboard audio cards are supported via AC97 and Intel HDA drivers, so it may be factible to create a "stack" of drivers for those cards.

I have traveled across the universe and through the years to find Her.
Sometimes going all the way is just a start...

I'm selling some stuff!

Reply 5 of 81, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

There was a.ready a discussion on this not too long ago (couple of months).
I doubt you manage to do this over the weekend. I wonder why people think it is so trivial to do this...

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 6 of 81, by tikbalang

User metadata
Rank Newbie
Rank
Newbie

there was "Virtual Sound Blaster" and "Tandy Emulator" by Andrew Zabolotny.

final versions and source code:
http://cs.ozerki.net/zap/pub/vsb/


Virtual Sound Blaster v2.02

This is a program written by Andrew Zabolotny a long time ago when few people owned Sound Blaster's but many had Covoxes and similar things. It will emulate a real Sound Blaster (1.x) on PC-Speaker or on a Covox. The emulation is relatively accurate, but FM synthesizer is not supported, thus it will play only digital sound. It was tested on a number of DOS games.

Tandy Emulator v3.03

TEMU stands for "Tandy Emulator". I wrote it even before I wrote VSB, and it will emulate a "Tandy 3-voice synthesizer" on a PC-Speaker or on a Covox and similar. There was once a IBM PC clone called "Tandy"; it had a built-in 3-voice synthesizer (similar to those found in early game consoles). It supports three melodic channels and one noise channel. I never heard how a real Tandy sounds (deduced how to program it by reverse-engineering some drivers for Tandy synthesizer :), but it sounds well to me.

download (deadlinks, use wayback):
http://zap.eltrast.ru/
http://zap.eltrast.ru/en/dldos.html
http://zap.eltrast.ru/data/vsb202.zip
http://zap.eltrast.ru/data/temu303.zip

homepage:
http://zap.eltrast.ru/en/frames.html

Andrew Zabolotny
anpaza@mail.ru


ESS PCI DOS Drivers
_________________

Reply 7 of 81, by Malik

User metadata
Rank l33t
Rank
l33t

Interesting, tikbalang! I guess they're more useful in a covox card. But the tandy implementation will come in handy in a pc speaker output, connected to a sb's pc speaker pins. 😀

5476332566_7480a12517_t.jpgSB Dos Drivers

Reply 8 of 81, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

The last time the subject came up not so long ago, I found this rather nifty thread at the MPXPlay Sourceforge forums:
http://sourceforge.net/projects/mpxplay/forum … 8/topic/3079341

Also, it is well-established that HX DOS Extender can indeed run DOSBox in DOS, but of course there is no sound support:
http://www.japheth.de/HX.html

Reply 11 of 81, by retro98

User metadata
Rank Newbie
Rank
Newbie

Well, I am looking for a sound blaster emulator for DOS which can make use of generic AC97 compliant hardware as the underlying sound card.

Is there still generic interest for such an item?

Assuming such drivers do not exist, I will seriously considering developing it, but there are questions regarding feasibility, and any development tips would be helpful. If feasible, I believe the effort is non trivial and requires at least a few months.

Here's what I have found so far on researching this subject.

The only true sound blaster hardware are the cards that plug into legacy ISA slots. The later sound blaster cards, and equivalents, for PCI bus all require DOS drivers to achieve legacy sound blaster compatibility.

As far as I can determine, the SB DOS drivers are really sound blaster emulators, but still require hardware support from the sound card. In particular, a SB PCI card has to intercept access to legacy sound blaster I/O ports (eg 0x220) and produce interrupts. The interrupt handler is code in the DOS emulator, which then determines what I/O port operation the game has requested, and then controls the actual sound hardware accordingly.

BIOS settings for legacy sound enable/disable the hardware trapping of legacy sound blaster I/O ports; where the hardware trap produces interrupts. In modern processors, I think interrupt latency could be a issue. The processor may execute too many instructions after I/O port operation, before interrupt processing occurs. Maybe that's why this BIOS setting no longer seems to exist with modern PCs. Does legacy sound blaster emulation in DOS with sound blaster PCI cards still work reliably?

DOS driver files I have seen for Sound Blaster card have names such as SBINIT.COM, SBEINIT.COM, SBLOAD.EXE, SBPCI.BIN. These files are a mix of 16-bit real mode, and 32-bit protected mode code. So they require EMM386, or equilvalent, to load and run in DOS environment. The driver makes use of VCPI for protected mode operations.

These DOS drivers apparently manipulate the GDT and IDT tables of the virtual 8086 environment of EMM386. They also setup interception of numerous interrupt vectors in both real and protected mode context. In particular, int 67h intercept of VCPI calls get set up too.

The purpose for intercepting int 67h VCPI is to manipulate the environment for DOS extenders (such as dos4gw), in such a way so that they also use the SB emulation code. Manipulating the EMM386's v86 environment is apparently for SB emulation support with 16-bit real mode applications.

Some issues for making SB emulation work with generic AC97 sound:

The will be no sound card suppport for the trapping of SB I/O ports. However, the processor can do the trapping instead using TSS (task state segments). I believe these traps produce protection fault exceptions, which a handler can then perform I/O port emulation.

In v86 mode, there are int xxh calls that can arrange I/O port trapping and emulation which should help with 16-bit real mode games and applications. Unclear on my part is how to make this work with DOS extenders. Using TSS I/O maps requires code to run unprivileged, but VCPI runs protected mode code in ring-0. Maybe modify VCPI to launch protected mode apps in ring-3? Has anyone achieved this with examples?

Also unclear on my part is the relationship between DMA with PCI, and legacy DMA.

Thanks for listening ...retro98

Reply 12 of 81, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

Looks like you've done some intriguing work so far.

retro98 wrote:

BIOS settings for legacy sound enable/disable the hardware trapping of legacy sound blaster I/O ports; where the hardware trap produces interrupts. In modern processors, I think interrupt latency could be a issue. The processor may execute too many instructions after I/O port operation, before interrupt processing occurs. Maybe that's why this BIOS setting no longer seems to exist with modern PCs. Does legacy sound blaster emulation in DOS with sound blaster PCI cards still work reliably?

PCI sound cards and Chipsets from various manufacturers... includes discussion regarding the necessary chipset support for the PCI sound blaster cards to work. Perhaps speed does not yet become an issue with the fastest boards that still have such support.

Reply 13 of 81, by retro98

User metadata
Rank Newbie
Rank
Newbie

Here's some additional information to add to my previous posting.

The sound blaster PCI cards produce PCI SERR or IRQ to support legacy SB emulation with DOS drivers. In the case of SERR, it routes to processor NMI, but modern motherboards no longer route PCI SERR to processor NMI. There will be no way for SB DOS drivers to function properly in configurations requiring SERR/NMI, even with working sound card hardware. If card uses IRQ for legacy support instead, then emulation should still work in theory. Interrupt latency may not be a problem after all, assuming the processor recognizes interrupts before the hardware completes (fake SB) I/O port accesses.

But my information on I/O port traps with hardware interrupts doesn't matter with SB emulation on generic AC97 sound chip. That's because there will be no hardware support to do I/O port traps. I/O port emulation will need to be done with the processor's help instead.

In v86 mode, int 2fh with AX=4A15h is the "INSTALL I/O VIRTUALIZATION HANDLER" API. I believe this should work for real mode games and apps. The more significant issue would be how to get this to also work with DOS extenders.

On sound blasters or equivalent, I think some cards use the ES1371 chip. According to the datasheet circulating on the internet, the chip has an AC97 codec. That implies the SB DOS drivers for cards with ES1371 already emulate SB using an underlying AC97 codec. So the solution may be to find a way to get this emulation to work by substituting with software, the hardware I/O port trapping feature of the card.

Reply 14 of 81, by Cyberdyne

User metadata
Rank Oldbie
Rank
Oldbie

But there is DOSBOX in DOS possible, with HXDOS.

I am aroused about any X86 motherboard that has full functional ISA slot. I think i have problem. Not really into that original (Turbo) XT,286,386 and CGA/EGA stuff. So just a DOS nut.

Reply 15 of 81, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

And? Dosbox relies on existing and working sound drivers of the host. The host being Dos and no sound drivers for Dos means no sound in Dosbox. Dosbox can't produce sound out of thin air 😉

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 16 of 81, by laxdragon

User metadata
Rank Member
Rank
Member

You would be better served taking a minimal Linux install and running DOSbox on that. Let the Linux kernel handle your modern hardware, and DOSbox for your DOS needs.

It is pretty simple to configure Linux to boot straight into a fullscreen DOSbox session.

laxDRAGON.com | My Game Collection | My Computers | YouTube

Reply 17 of 81, by alic3woodstock

User metadata
Rank Newbie
Rank
Newbie

I have found this thread searching for a SB emulator for generic onboard cards. Imagining if it's possible to make somthing like this with already existing linux sound drivers (ALSA for DOS maybe?).

I have tested DosBobx on a laptop, not too old to have compatibility on dos but not as new to run dosbox flawless. Only runs linux since the O.S. on it was not a legal version of windows. Dosbox was slower than my old 486 I had to turn on frameskip and try to optimize, but the game have more slowdowns than my android phone runing dosbox (well I will try to run only X and dosbox to see if there is any improvement). Dosemu only shows segmentation fault when I try to run any game.

I tried FreeDos two things didn't work, so the game in quetion (Pro Pinbal - Timeshock!) wont run:
First: sound - not even a possibility to install a PCI card since it's a laptop, SB emulation would be the only solution for the sound
Second: cd image emulation - The game version from GOG was packed with a cd image that I only could mount properly with imgmount (dosbox) I have the original CD but it was too damaged to even try to play the games music.

Working properly with DOS would be great to play games on such machines that aren't old enough to run DOS or Windows 9x but not new enough to run dosbox or even windows 7 properly.

Reply 18 of 81, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

Since the last post in this thread, builds of HX DOS Extender with sound support have emerged.
Re: HX DOS extender?

I for one have no idea if they are a reasonable alternative to a Linux install on a low-powered machine, but I doubt it. Do other applications run adequately on your Linux install? Perhaps you are lacking proper drivers, or have swap disabled or something.

machines that aren't old enough to run DOS or Windows 9x but not new enough to run dosbox or even windows 7 properly.

It seems to me that must be a very narrow range of machines.

Reply 19 of 81, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

Hmm... that only works for Win32 calls, no? Maybe something could be done via port trapping, but I understand there are limitations on that.
http://www.bttr-software.de/forum/mix_entry.php?id=11947

Three immediate options I see:
1) Build a native DOS machine with ISA or compatible PCI sound capability
2) See if any other virtual platforms deliver better performance
3) Use a faster computer running DOSBox

Anybody have any other options?

All hail the Great Capacitor Brand Finder