Sound Blaster Emulator for Dos?

Announcements, advice, random banter, unrelated discussion, et cetera.

Re: Sound Blaster Emulator for Dos?

Postby DosFreak » 2017-4-28 @ 20:45

HXRT can run DOSBox.

Assuming the modified HXRT build supports your soundcard then theoretically you should get sound.

The last time I loaded DOSBox 0.74 in HXRT in DOS I was just using the official HXRT so no sound but the performance seemed about the same as the host.
User avatar
DosFreak
l33t++
 
Posts: 9824
Joined: 2002-6-30 @ 16:35
Location: Your Head

Re: Sound Blaster Emulator for Dos?

Postby gdjacobs » 2017-4-29 @ 05:36

That's still a virtualised instance of DOS in DOS. Ideally, we'd have something which both intercepts real mode and p-mode hardware access to typical Soundblaster resources and redirects to an Intel HDA driver.
User avatar
gdjacobs
l33t++
 
Posts: 5537
Joined: 2015-11-03 @ 05:51
Location: The Great White North

Re: Sound Blaster Emulator for Dos?

Postby Dominus » 2017-4-29 @ 07:03

Again, this is not trivial and probably nothing anyone wants to dig in.
When there is no audio hardware access by the host how should the emulation work? You'd spend all your time writing essentially the SB Live! like driver for all other audio hardware...
User avatar
Dominus
DOSBox Moderator
 
Posts: 7644
Joined: 2002-10-03 @ 09:54
Location: Ludwigsburg

Re: Sound Blaster Emulator for Dos?

Postby 95DosBox » 2017-7-07 @ 00:22

Malik wrote: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! :happyhappy:)
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! :happyhappy:)

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! :lol:
(No, this is NOT an (delayed) April Fool crap. It's just an ordinary crap! :happyhappy:)
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.


It's not a bad idea Malik as I thought about this way before DOSBOX existed. The idea is feasible since back then Access Software released two games Mean Streets and Crime Wave that really took advantage of the PC Internal Speaker and generated digitized sound effects through it for those who did not have a Sound Blaster or Adlib sound card. For awhile this kept DOS gaming interesting before I was able to purchase a Sound Blaster. I remember watching the Mean Streets demo and being blown away that there was no sound card in the machine. A 386 was plenty of power to make a clean sound signal.

One user here stated it would be a nightmare to make DOS drivers for each modern day sound card. I agree that most newer sound cards will be PCIe based since PCI slots are getting killed off.

I propose the first such Sound card emulation be focused on what everyone already has the PC internal speaker. It may not sound pretty but it would work on all computers and easiest to test for everyone.

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.

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.

Later stage four to add HDMI Audio out support for DOS on the nVidia HDMI Audio out and then finally the AMD HDMI Audio out.


These are the only hardware devices that should be supported to minimize workload.
1) Internal Speaker

2) Ensoniq PCI and Creative Labs PCI 64/128

3) SB Live 5.1 PCI
4) Audigy 1 PCI
5) Audigy 2 PCI

6) Intel HD Graphics HDMI Audio Out
7) nVidia HDMI Audio Out
8 ) AMD HDMI Audio Out

9) Other sound cards that should get support since they are easy to find today
ASUS Xonar Essence ST 7.1 Channel PCI Sound Card
ASUS Xonar Essence ST 7.1 Channel PCIe Sound Card
ASUS Xonar DG PCI
ASUS Xonar DGX PCIe


This would cover all the easiest possibilities for hardware to emulate a sound card and create less work overall.

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

If it were possible to port DOSBOX to pure DOS and tap into the PC internal speaker as the sound output that would be easiest way to start testing or a way to port that RealSound technology for PC internal speaker audio output.
User avatar
95DosBox
Member
 
Posts: 309
Joined: 2017-5-23 @ 09:34

Re: Sound Blaster Emulator for Dos?

Postby koverhbarc » 2017-7-07 @ 03:07

This is an idea I've had as well - because it's basically an improved NTVDM, which we'll never get in Windows because we don't have the source. I too would recommend starting with the PC speaker - by the way, you should be able to upgrade your speaker on a desktop if it's lousy because it's just a 2-wire connection to the motherboard, and a high-sensitivity, full-range 3-inch speaker is readily available from any electronics source - and using an interrupt frequency of 22050 hz as it's compatible with almost all DOS sound (11 or 22 khz mixing). It is trivial then to add an infinitely variable slowdown for speed sensitive games.

PC speaker sound can actually be very good - if you need to hear it yourself, download Ken's Labyrinth (now freeware) and play under pure DOS so that the real PC Speaker can be used. It's hardly inferior (with a good speaker) to 8-bit mono SB sound.

I'm not sure if it's worth it writing drivers for specific PCI sound cards. Systems too new for ISA slots generally have on-board audio (admittedly that's often no longer functioning) and AC'97 might be a better target, and maybe even USB audio? Additionally most PCI cards already have DOS drivers working on a similar principle - even though they're proprietary, they can probably be loaded as 'binary blobs'.
koverhbarc
Member
 
Posts: 119
Joined: 2017-6-05 @ 02:02

Re: Sound Blaster Emulator for Dos?

Postby Jorpho » 2017-7-07 @ 03:32

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.
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.

Now it will take a crew to put it together to make it happen.
You don't say?
User avatar
Jorpho
l33t++
 
Posts: 7043
Joined: 2003-2-14 @ 19:50
Location: Canada

Re: Sound Blaster Emulator for Dos?

Postby xjas » 2017-7-07 @ 05:58

I was wondering a while ago if it would work to roll an emulator into FreeDOS at a very low level. Basically a Soundblaster -> Intel HDA or AC'97 wrapper that runs as close to the metal as can be and intercepts all system calls to IRQ5 or 7 and DMA1. No TSRs, drivers, or high-level programs needed. Would that even be possible?
selected (probably unfinished) megathreads { Like a Hipster | Only One 'T' | In a Lunchbox | World's Ugliest Keyboard | IT IS THE NINETIES }
User avatar
xjas
Oldbie
 
Posts: 1552
Joined: 2015-9-07 @ 02:29

Re: Sound Blaster Emulator for Dos?

Postby Jorpho » 2017-7-07 @ 12:26

I suspect anything of that nature would probably end up acting pretty much like DOSBox in HX DOS Extender.

xjas wrote:No TSRs, drivers, or high-level programs needed.
Adding something inextricably to the FreeDOS kernel would hardly be much different. Isn't much of FreeDOS already very low level?
User avatar
Jorpho
l33t++
 
Posts: 7043
Joined: 2003-2-14 @ 19:50
Location: Canada

Re: Sound Blaster Emulator for Dos?

Postby koverhbarc » 2017-7-07 @ 12:42

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).

Again, if you don't believe the PC speaker can play arbitrary (digital) SB sound, play Ken's Labyrinth which does just that. It certainly impressed me!
koverhbarc
Member
 
Posts: 119
Joined: 2017-6-05 @ 02:02

Re: Sound Blaster Emulator for Dos?

Postby Jo22 » 2017-7-07 @ 17:51

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.
Attachments
dv.png
dv.png (9.49 KiB) Viewed 717 times
"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//
User avatar
Jo22
l33t
 
Posts: 2909
Joined: 2009-12-13 @ 07:06
Location: Europe

Re: Sound Blaster Emulator for Dos?

Postby Jorpho » 2017-7-08 @ 03:45

koverhbarc wrote:Again, if you don't believe the PC speaker can play arbitrary (digital) SB sound, play Ken's Labyrinth which does just that.
I do not doubt it is possible. Of course the aforementioned Win 3.x driver can (sort of) play whatever you want as well. Ken's Labyrinth was likely written with an unusual amount of care in order to include that feature.

But I very much doubt that it is feasible to write something that will run in DOS and will cause a program explicitly written to use a Sound Blaster card to magically output something approximately the same through the PC speaker, which is what Mr. 95DosBox was proposing (I think?).
User avatar
Jorpho
l33t++
 
Posts: 7043
Joined: 2003-2-14 @ 19:50
Location: Canada

Re: Sound Blaster Emulator for Dos?

Postby mr_bigmouth_502 » 2017-7-08 @ 23:35

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.
My NEW(ish) desktop:
Image
User avatar
mr_bigmouth_502
Oldbie
 
Posts: 1942
Joined: 2009-5-16 @ 19:43
Location: Canada

Re: Sound Blaster Emulator for Dos?

Postby Stiletto » 2017-7-09 @ 15:27

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.
viewtopic.php?f=17&t=900
"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto
User avatar
Stiletto
l33t
 
Posts: 4106
Joined: 2002-7-01 @ 21:57

Re: Sound Blaster Emulator for Dos?

Postby koverhbarc » 2017-7-14 @ 02:31

And the work needed to port it to Win9x would share a large part with that needed to port it to DOS, which is essentially what's asked for here. Again I need to emphasise for anyone that doesn't know the technicals that virtualisation really is needed because DOS games accessed the sound card directly - that is how PCI sound card DOS drivers worked, when they worked.
koverhbarc
Member
 
Posts: 119
Joined: 2017-6-05 @ 02:02

Re: Sound Blaster Emulator for Dos?

Postby gdjacobs » 2017-7-14 @ 03:13

That version of VDMSound is already ported (if a little raw). As you would likely require EMM386 for port trapping anyway, I think this is the best option available for translating native DOS audio to AC97/HDA/whatever. You have a good base for the required system level functions. Along with Nuked FM and perhaps some feature additions to support PAS, it might be a good option for any games you can start directly from a PIF.

Considering Win98 already requires being picky about hardware, and we're talking about virtualizing the hell out of DOS anyway, the better option might still be DOSBox on a fast, modern system.
User avatar
gdjacobs
l33t++
 
Posts: 5537
Joined: 2015-11-03 @ 05:51
Location: The Great White North

Re: Sound Blaster Emulator for Dos?

Postby Cyberdyne » 2017-7-14 @ 06:28

Raspberry PI with a optimized Dosbox image, that boots straight to dosbox... maybe someone has already done that.
And you can get that retro feeling, use your old TV as a monitor, because that thing has HDMI and Composite video and audio output.
I am aroused about any X86 stuff that has full functional ISA stuff. I think i have problem.
User avatar
Cyberdyne
Member
 
Posts: 292
Joined: 2011-9-18 @ 18:45
Location: Estonia, Tallinn

Re: Sound Blaster Emulator for Dos?

Postby Malik » 2017-7-15 @ 16:06

I once created a TinyCore Linux USB stick, using only the bare minimum needed to run Dosbox, and compiled Timidity and MUNT myself to have a complete sound system. I also edited the startup so that it runs Dosbox directly on boot. I made sure to install VESA graphics and ALSA as the drivers, so that I can plug in this stick in any machine, (well, most), and boot the stick into DOS(box). Sort of a booting a dos machine. The only caveat is that you are not using an actual DOS system. You are not booting a DOS. But you can "pretend" you're running DOS. Another better option would be a minimal distro that can run 86Box (PCem, if you prefer) on boot directly. This would feel more authentic.

Still, a SoundBlaster emulator will be really helpful. In the world of software, nothing is impossible. Something in the line of the SB emulators used by other cards - like the ALS cards, like the ALS120, ALS4000, etc, which were able to provide SB emulation compatibility via loader files. All we need is similar software to tap in the functions from any sound board or IC chip.
User avatar
Malik
l33t
 
Posts: 2483
Joined: 2004-4-10 @ 14:37
Location: Malaysia

Re: Sound Blaster Emulator for Dos?

Postby Jo22 » 2017-7-15 @ 18:14

As much as I love DOS, there are certain aspects we should consider :

DOS..
- makes use of the BIOS
- is using text-mode or VGA
- supports just one processor
- is limited to 2GiB FAT partitions on FAT16
- uses 16bit real-mode
- requires MBR-style paritioning
- uses TSR style drivers
- is limited to 1MiB / 4GiB of RAM
- has no native API for graphics and sound

This is in stark contrast to modern, or rather current systems.

At this point, "DOS compatibility" is only beeing hold together by the equivalent of a chewing gum and an elastic band.
(x86 ISA and PC-BIOS, essentially).

The foundation it once was based on, namely ISA Bus, 8284 clock generator, 8288 bus controller,
8254 PIT, 8255 PIO, 8259 PIC, 8237 DMA controller, MC146818 RTC is long gone.
What is left is a poor imitation of what once was.

So if we are going to add sound support to DOS,
we would perhaps be better off creating a new, natively running DOS.

A modern DOS, which supports..
- UEFI
- emulated text-mode (via UGA or GOP)
- multi-tasking / threading
- multiple CPU cores (one for each VM, maybe ?)
- Long-Mode for well-behaved 16Bit DOS programs (optional)
- Compatibility-Mode for extender games or badly coded DOS apps
- loadable driver modules
- audio emulation core (SB/AdLib), one for each VM
- global audio mixer
- some sort of control "panel" to configure modern DOS
- FAT32 or exFat
- a 64bit or 36bit addressing scheme for about 64GiB of RAM
- GPD partitions
- direct access to hardware (similar to Win9x)

Anyway, that's just my idea. Sophisticated, Unix-style DOSes already existed since the mid-80s.

Maybe we/someone can take apart FreeDOS and assemble it to something actually useful ? ;)

Edit: Typos fixed, some left.
"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//
User avatar
Jo22
l33t
 
Posts: 2909
Joined: 2009-12-13 @ 07:06
Location: Europe

Re: Sound Blaster Emulator for Dos?

Postby gdjacobs » 2017-7-15 @ 21:35

Maybe DOSBox using virtualization extensions to handle x86 code at near native speeds? Could this be done with legacy hardware calls caught and handled in software?
User avatar
gdjacobs
l33t++
 
Posts: 5537
Joined: 2015-11-03 @ 05:51
Location: The Great White North

Re: Sound Blaster Emulator for Dos?

Postby koverhbarc » 2017-7-16 @ 00:52

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).
koverhbarc
Member
 
Posts: 119
Joined: 2017-6-05 @ 02:02

PreviousNext

Return to Milliways

Who is online

Users browsing this forum: MMaximus and 4 guests