VOGONS

Common searches


Sound Blaster Emulator for Dos?

Topic actions

Reply 40 of 81, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

The advantage of something like DOSBox with a new native core is that you don't have to completely re-engineer it if you run into compatibility issues. VDMsound is great, but NTVDM is a black box if you run into a corner case which doesn't work.

All hail the Great Capacitor Brand Finder

Reply 41 of 81, by koverhbarc

User metadata
Rank Member
Rank
Member

I wasn't proposing actually using NTVDM, since we have no source for it (the leaked source is for the wrong version, as I understand, anyway) and it requires Windows at a basic level. I was only using it as a comparison - as I already have - that might be familiar. Obviously we could do at least as much as that, if people put the effort into it. But those few that are willing and interested seem to have gravitated to DOSBox.

Reply 42 of 81, by Jo22

User metadata
Rank l33t++
Rank
l33t++

@koverhbarc You're right, it would nolonger be DOS. It would be a modern OS compatible with the DOS ABI.
In the late 80s, such OSes existed. Namely PC-MOS, Wendin DOS, Real/32 and Multiuser DOS.
My point is, that there's little reason to create sound drivers which take up a significant amount of DOS memory.
I'd be more elegant to create an compatible system with the ability to run multiple copies of the command line interpreter.
Not serial, like DOS, but in parallel. Core devices, like VGA and audio could be emulated, while direct access to hardware would be retained.
An inferior example for this is the Win9x DOS window. This sure can be done better, if Windows is left out of the door.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 43 of 81, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

I'm curious if DOSBox would be precluded from operating like this? I'm not familiar enough with the internals to know one way or another, although I suspect it has enough modularity built in to do the job.

All hail the Great Capacitor Brand Finder

Reply 44 of 81, by mr_bigmouth_502

User metadata
Rank Oldbie
Rank
Oldbie
Stiletto wrote:
mr_bigmouth_502 wrote:

A Soundblaster emulation with inbuilt FM synthesis would be like a holy grail for DOS, or even Win9x. It would make it so much easier to get a retro rig up and going since you wouldn't have to worry about ISA compatibility. Merely running DosBox on DOS would be interesting, but I'd be more interested in a soundcard emulator that could be used to run games natively.

There was a Win9x port of VDMSound. It worked in many cases. That'd at least help you on Win9x/Me.
Win9x + VDMSound **ALPHA**

I'm guessing it doesn't do FM synthesis though, or does it?

Reply 46 of 81, by Jo22

User metadata
Rank l33t++
Rank
l33t++

FM synthesis doesn't require ISA DMA, just port writes. In theory, any bus should do.
Assumed that bus allows writing data to a given memory location ($388, for example).

But the idea is interesting. I wonder, since some people here already made AdLib and MPU clones,
would it be possible to create a new PCIe sound card ?

There are PCIe bridges (sample), and some of the other DOS sound standards were
less dependend on ISA DMA. WSS/GUS/PAS, maybe ?

The latter had an high-level API and could be implemented as a synthetic device.
Or somone people could create a new sound card type and write some DOS drivers for Miles Sound System, etc. ?

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 48 of 81, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Uhm, a bridge makes it easier to port normal DIY ISA circuits to PCIe.
I imagine it would be fun to build your own sound card. 😀
Besides, an OPLx PCIe card would be interesting and wouldn't require any drivers.

mrau wrote:

sorry, i dont get how that bridge matters, if one is ready to write specific drivers then any sound chip will do, no?

If he/she is willing to write them for two dozen models, then that's fine.
But they are moving targets, I think. There will always be one person, who has a recent on-board chip that's no supported.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 49 of 81, by mrau

User metadata
Rank Oldbie
Rank
Oldbie

so You would like to use an old sound chip with an isa interface with pcie? that sounds fun, there was this story that it was the direct interrupt line access that really makes think work like the old software expects.. how would You circumvent that? frankly i myself never understood why pci's way if informing of an interrupt was not good enough... imho having a dedicated well implemented bridge one could actually attach old isa cards to a new pc just like that?

regarding drivers - it is my understanding that for quite some time now only 2 standards matter - ac97 and HDA, for these open drivers exist already

Reply 50 of 81, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Hi, I agree to what you said. Attaching an existing ISA/PCI sound chip to a bridge isn't trivial and interrupts are sure causing some headaches.
I was rather thinking in smaller scales, like using FPGA or an ATMega chip to create a fictional sound card (playback only, mono or maybe stereo).
The bridge was only mentioned, because it allows us to use traditional homebrew parts, like 74 series address decoders and such.
If there was something like a PCI or PCIe development kit, we could *perhaps* skip that and create a sound card (or rather a simple DAC)
without the help of ISA technology..

Now that I think of it, a PCIe card with both an OPL2/3 compatible chip and an IRQ-less parallel port would be interesting.
If the port was hard-wired to port $278 and had some sort of Covox-style DAC attached to it, perhaps stereo-on-1 compatible,
most of the existing demoscene stuff and mod players would work, too. Real-Mode games could be supported by old SB emulators or Temu then.
It's not ideal, but would work with a decent number of games. Also, it would work around the issue with PnP LPT cards.
I know, it's not on par with a 192KHz 24Bit sound chip, but it would at least kinda work with modern i7 and i9 machines.

Perfect compatibility is perhaps out of reach, anyway, since also pure VGA support in modern GPUs is nolonger a selling feature,
but rather an afterthought. I assume, todays VGA implementation is similar to the synthetic VGA device which VirtualBox has got.
IMHO the last Windows that required VGA for installation was Windows 2K/Me. Windows XP is using 800x600 resolution, an SVGA/VBE mode.
So VBE3 support is maybe be still beeing cared of, since it is still required for installing Windows and since it is also beeing used by Linux.

mrau wrote:

regarding drivers - it is my understanding that for quite some time now only 2 standards matter - ac97 and HDA, for these open drivers exist already

Hi, yes, I believe that's true. So far I thought these were specifications, though. Dunno if they (the chips) are compatible to each other.

Edit: Sorry for the bad wording. There are many typos, also. I really have to take some English lessons again.. 😊

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 51 of 81, by mrau

User metadata
Rank Oldbie
Rank
Oldbie

so quite frankly, because graphics is the probably most important part of this, the virtual machine approach is still better than making up hardware, which i'll admit would be far more interesting than emulation;
maybe the generic driver code in dos could be improved a bit so it would cooperate better with the vm?

Reply 52 of 81, by Jo22

User metadata
Rank l33t++
Rank
l33t++

I think so. From what I've seen, classic games like Commander Keen don't run that well on modern GPUs..
But I haven't checked FPS games! Some of them use VBE and may run OK or even benefit from VBE3 features.
In either case, it would be nice to have an emulated VGA as a fallback.

A VM -running on DOS or any other OS- could help with that. Maybe it is also possible to create some sort of
VM-Operating System (a hypervisor ?) for DOS. It would either boot before DOS, or could be launched afterwards.
Similar as to how EMM386 operates. With one or more V86 machines running a copy of DOS or Command.com.
Maybe also with its own drivers, so emulation of sound and graphics can be done transparently.
Whatever. The advantage would be, that normal DOS drivers and applications could still be used.
Sorry, that matter is not my special subject. But I know early multi-tasking DOSes had similar features,
so perhaps it can be done in such a fashion ?

Edit: Regarding the VGA thing.. I forgot to mention: My knowlegde about recent GPUs is quite behind the times.
It also has been several years (~08/09?) since I tried DOS games natively (which means in 16-Bit DOS) on a modern PC.
Unfortunately, I have no access to a modern PC at the moment (-> Athlon 64 user speaking).
So I can't re-check my former experience. But if there is some kind of "VGA compatibility test", please let me know.
Perhaps it would be a good idea to test modern graphics cards for bare metal VGA compatibility.
By modern, I'm thinking about something from this decade (2010 onwards).
I'm a proud err.. desperate user of a Geforce GF210, by the way. 🙁

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 53 of 81, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
Jo22 wrote:

I'd be more elegant to create an compatible system with the ability to run multiple copies of the command line interpreter.
Not serial, like DOS, but in parallel. Core devices, like VGA and audio could be emulated, while direct access to hardware would be retained.
An inferior example for this is the Win9x DOS window. This sure can be done better, if Windows is left out of the door.

Windows 95 went to exceptional lengths to accommodate DOS games written in all sorts of incorrect ways that did things to hardware and memory that they were not supposed to do. Any attempt to improve on this "inferior example" would encounter the same obstacles.

Jo22 wrote:

But the idea is interesting. I wonder, since some people here already made AdLib and MPU clones,
would it be possible to create a new PCIe sound card ?

Like I said before, wouldn't any machine with a PCIe slot likely be much, much too fast for any DOS game to function properly?

Reply 54 of 81, by koverhbarc

User metadata
Rank Member
Rank
Member

As far as I know, there is no upper limit to CPU speed for properly-written DOS games, any more than there is for Windows games. Speed-sensitive games have already been a problem for a long time.

But a PCIe sound card seems a bit of a stretch. PC hardware just isn't normal hobbyist territory, except for simple interfaces like the serial and parallel ports which have disappeared by now.

Reply 55 of 81, by keenmaster486

User metadata
Rank l33t
Rank
l33t

koverhbarc et al, I like where you're going.

I've wanted this damn "universal SB+FM emulator" since I was about 11 years old 🤣 🤣 🤣

World's foremost 486 enjoyer.

Reply 56 of 81, by Jo22

User metadata
Rank l33t++
Rank
l33t++
koverhbarc wrote:

But a PCIe sound card seems a bit of a stretch. PC hardware just isn't normal hobbyist territory,
except for simple interfaces like the serial and parallel ports which have disappeared by now.

Uhm, hasn't this been done before (well, sort of) ?

From the ModPlay Pro what.new file:
"User definable output port for Mono and/or Stereo mode (for people with D/A's on a PC bus card)."

Making a Covox "sound card" should be feasible, at least.
It's essentially a bunch of 74 series chips and a resistor ladder.
For a basic model, we won't even require the interrupt or status lines.

http://retired.beyondlogic.org/spp/parallel.htm

The more complicated part is to figure how to connect it to PCIe (1x is fine).
A cheap PCIe-ISA bridge may or may not suffice for that purpose.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 57 of 81, by 95DosBox

User metadata
Rank Member
Rank
Member
Jorpho wrote:
If it was easy to make the PC speaker do complicated things, then we probably would have heard of it being used more often. […]
Show full quote

If it was easy to make the PC speaker do complicated things, then we probably would have heard of it being used more often.

I think this is another one of those cases where there would have once been an enormous financial incentive for someone to write a program that would allow arbitrary Sound Blaster audio to play over the PC speaker. That no one ever wrote such a thing suggests it is equally enormously difficult to write.

Even the old Win 3.x PC speaker drivers had severe limitations.
https://remember.the-aero.org/speaker/index2.htm

95DosBox wrote:

Second phase would be focusing on the Sound Blaster PCI sound cards like the PCI64 or the Ensoniq PCI sound cards. These were the only ones that actually could work with older DOS games and emulate Sound Blaster without an ISA slot.

Except the only reason they worked was because of specific chipset features on the motherboard.

Now going forward stage three would be the Intel HD HDMI Audio out which from what I can tell came with the original Sandy Bridge CPUs and even the Kaby Lake still has this and it appears if a possible driver could be made for DOS to take advantage of this you could in theory get Sound Blaster or other sound card emulation outputted in high quality through the HDMI cable along with the HDMI video avoiding a need for a physical sound card and higher quality digital output.

Now it will take a crew to put it together to make it happen.

You don't say?

I do say.

I would think the reason it hasn't been done is no one during that time when Sound Blaster was dominant would choose to create one when an actual hardware device was capable of doing it. Now that ISA slots are no longer around on modern motherboards and PCI sound cards do not work for SB emulation it is even more important that a Pure DOS one be created to get around this hardware issue. As modern computers now have the processing power and the necessary memory storage it might be possible to emulate a true Sound Blaster under DOS and piping the sound output to the PC internal speaker or redirect it to an actual sound card. In this case a superior choice would be using the Intel HD Graphics HDMI Audio output, AMD HDMI High Definition Audio Device, or the nVidia version. This would produce the cleanest digital sound output possible and not require an internal sound card in some cases if using the iGPU.

How long did it take DosBox to finish? I think it was about 5 years from version 0.50 to stable 0.72. I'm not sure how long it was worked on prior to 0.50 or what the initial beta version number was first released.

Let's say 5 years is how about how long it took them to make it functional. But since the PC internal speaker is a much simpler and prevalent sound device in every PC machine I think the time to do it might be much less than an NT version. Even a Tandy 3 Voice internal speaker emulator would be a huge upgrade over the PC tweeter.

The speech program for the Windows 3.1 version was inferior to what was done in DOS. In DOS the digitized music/sound effects does not freeze up the computer. If there is a way to do it I would say it is the team from Access Software that did it for a majority of their DOS titles.

I did some tests on some more modern motherboards starting with Z68/Z77. I was able to get the Ensoniq and even SB Live to load the TSR properly. However I was unable to get any sound output from any DOS games as it did not recognize any Sound Blaster card. This would indicate DOS games simply must have an ISA slot except for those early systems which may still work with the TSR SB emulation. But even on a P4 I tested there is a huge lag in loading the TSR and then on top of that the SB emulation is horrible with lots of stalls and hiccup stutters. I now consider these cards not suitable for DOS SB Emulation the traditional way. I was hoping due to the more powerful quad cores that the DOS SB Emulation of the Ensoniq or SB Live would have eliminated this stutter.

Jorpho wrote:

Have you ever tried running MS-DOS on a machine with a Sandy Bridge or Kaby Lake CPU? Even if you had sound support on such a machine, it would be orders of magnitude faster than what any DOS program was ever written for.

Yes DOS games still work even on Z170/Z270. I have been using DOS as part of my bootloader. Try Prince of Persia 1 for DOS. It uses a primitive digitized sound effects for the game but no music. Probably one of the only few games that did it aside from Access Software titles. 4D Sports Boxing does it as well. These programs run at normal speed as well as the sound effects.

Jorpho it doesn't sound like you played too many DOS games back in the day or you didn't grow up during that time from your questions?

Reply 58 of 81, by 95DosBox

User metadata
Rank Member
Rank
Member
Jo22 wrote:
This reminds me of DESQview somehow. It was a TUI, task switcher and an API - all in one. If it was run on an XT machine, it app […]
Show full quote
koverhbarc wrote:

If you integrated this into FreeDOS, it would no longer be plain DOS - it would be DOS plus an emulator,
which must run in V86 mode. With DOS, everything had low-level access, so there's no reason to integrate stuff into the kernel anyway.
Keep it separate; one could call it a DOS-to-DOS virtual machine (DDVM).

This reminds me of DESQview somehow. It was a TUI, task switcher and an API - all in one.
If it was run on an XT machine, it appeard as if everything was running in a separate DOS VM.
If there would have been a way to insert an SB emulator, it would have been acting pretty much like
the DDVM you described (in the means of VMs with direct hardware access, etc.). Well, at least for real-mode games.
For extender games, it would still be pretty darn hard to implement. A true multi-tasking DOS, like Concurrent DOS,
Multiuser DOS or PC-MOS/386 would have been *perhaps* better suited for the purpose of a DOS with a large variety of audio drivers.

I have used Desqview-X back in the day on a 386 or 486. You could open multiple DOS windows and run a game in each window. It was somewhat laggy when you ran too many DOS programs simultaneously. But an interesting thing that I remember was even though you had one sound card each game that ran in its own DOS window was mixing the sound output on the single sound card. So each program was not hogging the sound card from being accessed in another DOS window. Test Drive 3 playing and Search for the King music intros mixing.

DVX was also good for using a single floppy disk and installing a program with multiple floppies and different volume labels. Very handy feature and saving on requiring having a bunch of floppy disks to install a program.

I think the DOS SB emulator must run in REAL DOS or 98SE DOS and possibly function in FreeDOS as well.
It would make use of the 1MB->4GB memory region which should be plenty of space for the program. I'm not sure how much actual code space would be required to emulate a true Sound Blaster card or have the ability to add other emulated sound cards like a GUS and maybe later MT-32 emulation might be possible. It must somehow be able to loadhigh the program so it should be stored above the 640KB region or better yet above the 1MB region so it it doesn't starve the DOS conventional memory needed by legacy DOS programs. If the SB DOS emulation program can be small enough to fit into the HMA region then even older computers like a 286 or 386 with limited memory could use it.

Stiletto wrote:
mr_bigmouth_502 wrote:

A Soundblaster emulation with inbuilt FM synthesis would be like a holy grail for DOS, or even Win9x. It would make it so much easier to get a retro rig up and going since you wouldn't have to worry about ISA compatibility. Merely running DosBox on DOS would be interesting, but I'd be more interested in a soundcard emulator that could be used to run games natively.

There was a Win9x port of VDMSound. It worked in many cases. That'd at least help you on Win9x/Me.
Win9x + VDMSound **ALPHA**

This might be useful Stiletto. I have been testing PCI sound cards and video cards on Z68/Z77. It appears these cards are not being detected in 98SE. So porting VDMSound to Win9X and piping it through the internal PC speaker would be another way to possibly run DOS games in 9X/ME without a Sound Blaster ISA sound card.

The recommended way to get superior Sound Blaster quality sound would be utilizing the Intel HD Graphics HDMI Audio output to emulate the Sound Blaster.

Anyone else here test 98SE with PCI sound cards and graphic cards on Z68/Z77 have issues detecting them?

koverhbarc wrote:
Jo22: […]
Show full quote

Jo22:

Such an OS would really no longer be DOS, and would not run real DOS programs any better than current solutions. The only really major problem in your list, disk size, is solved by FAT32 which is in several DOSes FreeDOS. The second most important problem is USB support, which isn't in your list. Beyond that if DOS is still to be a viable OS it's most needed to have DOS equivalents of modern applications, which has had some work done on it but far less than Linux (which I dislike for a number of reasons).

gdjacobs:

DOSBox does not run x86 code natively. I don't see it would be a useful codebase to build on if that's the goal. Of course legacy hardware calls can be caught and handles in software: that's what NTVDM does, and that's what the sound emulator discussed here would have to do. The performance penalty of doing so is there but not high (10-20% at most for any non-pathological application).

I concur we shouldn't need to rewrite a completely new DOS that is not what I would prefer or want because DOSBOX is already a better option. The original idea is to first emulate a true Sound Blaster card that would intercept all DOS calls to the SB and pipe it to PC internal speaker. This would allow every PC computer to use a simple DOS bootable USB flash drive or SSD to run a DOS program without having to install a complete OS like 9X/ME which requires space for the OS and ISA and PCI cards don't seem to detect properly anymore on Z68/Z77 from recent tests, or finding a way to make a bootable USB to install 2K/XP/W7 which would require a decent amount of storage space for those OS to accomplish the same with DOSBOX. Having a lean bootable 98SE DOS plus a DOS SB Emulator is more efficient use of space and CPU resources since it wouldn't be running on top of another OS or require drivers for the OS or an enormous amount of space and would allow anyone to play DOS games with Sound Blaster, GUS, and MT-32 emulation possibly using a common PC internal speaker or more accessible hardware such as the HDMI Audio output on the Intel HD Graphics, AMD, or nVidia video cards.

The most compatible DOS partition for games is the FAT16 2GB partition and while you are under 98SE DOS you can still access your other FAT32 partitions which can be as large as 64GB safely and if certain DOS programs are picky about needing to run on a FAT16 partition you can copy the game folder over to the 2GB partition to run instead.

Once it is possible to emulate the SB and pipe the sound output to the PC internal speaker which every PC computer already has and it is successfully done, then stage 2 be outputting it to the HDMI audio output on the Intel HD Graphics, AMD, and nVidia.

Stage 3 could be adding GUS emulation and MT-32 emulation.

Stage 4 could be adding support to output to your physical sound cards like - Ensoniq / SB Live PCI and for more modern motherboards the PCIe sound cards from Asus.

Stage 5 might be adding support to output to a Creative Labs USB sound card such as the
Sound Blaster X-Fi HD
and
Sound Blaster X-Fi Surround 5.1 Pro

These USB 2.0 varieties will be more useful when PCIe slots may become discontinue one day and I don't foresee USB 4.0 and later to not be backward compatible with earlier USB devices. So all you would then need are USB 3.0 DOS drivers if necessary to detect these on more modern motherboards.

Last edited by 95DosBox on 2017-07-25, 15:09. Edited 7 times in total.

Reply 59 of 81, by 95DosBox

User metadata
Rank Member
Rank
Member
Jo22 wrote:
Uhm, hasn't this been done before (well, sort of) ? […]
Show full quote
koverhbarc wrote:

But a PCIe sound card seems a bit of a stretch. PC hardware just isn't normal hobbyist territory,
except for simple interfaces like the serial and parallel ports which have disappeared by now.

Uhm, hasn't this been done before (well, sort of) ?

From the ModPlay Pro what.new file:
"User definable output port for Mono and/or Stereo mode (for people with D/A's on a PC bus card)."

Making a Covox "sound card" should be feasible, at least.
It's essentially a bunch of 74 series chips and a resistor ladder.
For a basic model, we won't even require the interrupt or status lines.

http://retired.beyondlogic.org/spp/parallel.htm

The more complicated part is to figure how to connect it to PCIe (1x is fine).
A cheap PCIe-ISA bridge may or may not suffice for that purpose.

I appreciate your enthusiasm here but this is getting way off on a tangent. If you were to create a customized PCIe sound card it would be a lot more work and eventually PCIe will become obsolete to a newer slot architecture which will repeat the ISA debacle. The best long term possibility against first is to use the PC internal speaker which will never go away or die.

Second if you insist on using a hardware device then use a USB sound card instead that you create from scratch or a better idea is to support these two.

Sound Blaster X-Fi HD
or
Sound Blaster X-Fi Surround 5.1 Pro

I recommend these two since they also support XP/W7/W10 so having actual DOS SB Emulation support would be a nice addon for a true Creative Labs product and USB itself I don't see dying off any time soon and will most likely even USB 4.0 will continue to have legacy support.

But from testing the Intel HD Graphic it is working in 98SE. The problem is can a proper video and audio HDMI driver be created for 98SE? If so then you can use a DOSBOX for 98SE and run the DOS game and not require to do it in pure DOS.

But if a pure DOS SB emulator can be created it wouldn't have the need to use 98SE in order to work. Also there are some issues with USB mouse and USB keyboard in 98SE so having a pure DOS SB emulator would have less issues once PS/2 ports are fully discontinued on modern motherboards.

Having it based in Pure DOS will have more longevity as all you would need is 98SE DOS and the DOS SB emulator program which would load into the above 1MB region to preserve as much conventional memory as possible and at the minimum use the internal PC speaker found in all PC computers as the primary sound output device.

In DOS there isn't a need for a DOS video driver so that may reduce the complexity of it. A DOS Mouse driver might still be needed which already exists but other than that you can pretty much run any DOS game.