Author Topic: DTA (DTAudio) and DOS Sound Blaster audio  (Read 15110 times)

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5027
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
DTA (DTAudio) and DOS Sound Blaster audio
« on: February 17, 2020, 03:39:57 am »
Hi

We discussed sometime ago about using ArcaOS for DOS retro-gaming and we run into the difficulty that mostly all the DOS games uses sound blaster for audio support. DTA (DTAudio), even that provides audio on DOS VDM and Win-OS2, is missing some Sound Blaster kind of emulator driver that may allow to bridge the DOS sound blaster with DTAudio.

I asked around the DOS community to see if there is something that can be reused to possible help us, like a sound blaster open source driver.

I was pointed to this page and these two files:
- dos-virtual-sound-blaster--vsb-src.zip, dos-virtual-soundblaster--vsb202.zip
VSB is a Visual Sound Blaster tool which source code seems to be available.

I'm not sure if this asset can be useful for the goal to have DOS Sound blaster support on ArcaOS. Currently VSB as it is, is not working on DOS VDM sessions for me.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Mathias

  • Full Member
  • ***
  • Posts: 196
  • Karma: +2/-0
  • using ArcaOS
    • View Profile
    • IRC
Re: DTA (DTAudio) and DOS Sound Blaster audio
« Reply #1 on: February 17, 2020, 11:46:53 am »
I think the problem is the missing "bridge" on the OS/2 side.

Just an assumption:
On the (virtual) DOS side, VSB translates from SB16 to... what? This then needs to be forwarded to an existing OS/2 driver.. like uniaud or something native to communicate with the actual sound chip.
As long as there is no such "bridge" from VSB (in a virtual DOS session) to Uniaud (or the likes), there might not be any sound being delivered to the actual sound chip.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5027
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: DTA (DTAudio) and DOS Sound Blaster audio
« Reply #2 on: February 17, 2020, 01:05:46 pm »
Hi

My thoughts are that with DTA, there is already sound on DOS, you can play wav files in DOS VDM sessions with the .exe it provides. I'm guessing that DTA connects the DOS VDM session to OS/2 Uniaud to do that. The issue would be that VSB will need to be modified to translate the sound blaster to the DTA.

Here I found a git with VSB and TEMU (Tandy 1000 computer sound synthesizer  emulator ) and Assembly is required to understand it.

Sadly I'm only guessing since I'm not a developer. More opinions are welcome, maybe VSB is not the way to go.

Regards
« Last Edit: February 17, 2020, 01:09:34 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Roderick Klein

  • Hero Member
  • *****
  • Posts: 698
  • Karma: +14/-0
    • View Profile
Re: DTA (DTAudio) and DOS Sound Blaster audio
« Reply #3 on: February 17, 2020, 08:25:09 pm »
Hi

My thoughts are that with DTA, there is already sound on DOS, you can play wav files in DOS VDM sessions with the .exe it provides. I'm guessing that DTA connects the DOS VDM session to OS/2 Uniaud to do that. The issue would be that VSB will need to be modified to translate the sound blaster to the DTA.

Here I found a git with VSB and TEMU (Tandy 1000 computer sound synthesizer  emulator ) and Assembly is required to understand it.

Sadly I'm only guessing since I'm not a developer. More opinions are welcome, maybe VSB is not the way to go.

Regards

While I am not a developer I used to work on John Gow on the DTA. I ran the website and tested the DTA.
In the DDK from IBM is something that LOOKS like the DDK. Do not use it it has horrible perfomance with playing audio in WIN/OS2 duo to the many ring switching it does (sending audio from ring3 to ring 0 and visa versa.

The WIN/OS2 audio support is pretty simple. Oke well its not. What makes it more simple is that you the Windows 3.1 MCI audio interface.
An application can tell Windows/WIN/OS2 "Play this audio sample". The audio driver then deels with this.
The whole interface is not hardware depended. The WIN/OS2 audio driver is effectively an undressed Windows 3.1 audio driver.
All data it receives is send the DTA.SYS. Now here is where it gets interesting.

The DTA.SYS driver is effectively an R0STUB.SYS driver. This MMOS2 driver R0STUB.SYS sends audio buffers to the audio card driver that is active. In most cases
UNIAUD16.SYS.

DTA.SYS does the same it sends its audio data directly to the audio driver. Now to prevent MMOS/2 from using the audio card while the DTA is playing audio from  WIN/OS2 an OS/2 deamon runs in the background that blocks the audio driver from WIN/OS2.

Now to the juicy part or more complex of portion. DOS support in a VDM is going to be slightly more complicated if you want to have GOOD SB emualtion.
I used to play a lot with Gravis Ultrasound cards and they provide soundblaster emulation with a DOS TSR.

In OS/2 we would have two issue's. The first is that DMA timing in the VDM needs to be very good. See this VDMA.SYS note from Martin Kiewitz:
https://svn.code.sf.net/p/air-boot/code/special/VDDs/vDMA/

"The original VDMA driver done by I.B.M. was fixed, patched and extended
         for about 10 years. Still the DMA port emulation is not quite complete
         or accurate and some things weren't done in a really efficient manner.

        DMA in VDMs is mostly used for sound output of games and due to limits
         of the original driver, games like Prince of Persia 2, Goblins 3 and
         Sam'n Max didn't work at all or not right.

        Additionally my VSOUND driver that emulates a Soundblaster card in 100%
         software needed a better API for virtualizing DMA transfers."


But then we have another small issue. The DTA supports MIDI playback so how do we deal with OPL 3 support ?
Effective the only way I could think of is if the wave audio AND the OPL3 music (which would be emulated) is mixed into the wave audio data send to the DTA.
You see all audio drivers only support only audio channel currently. I think UNIAUD can do more but we are stuck with some more items to get DOS games with audio support to work.

From what I can tell this is not just a matter compiling a TSR and hooking it on the DTA.

Roderick

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5027
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: DTA (DTAudio) and DOS Sound Blaster audio
« Reply #4 on: February 17, 2020, 11:43:36 pm »
Hi Roderick

I guess you know more of the subject than me.
It is the first time I hear the DOS TSR term (Terminate and stay resident program)

Roderick, do you see someone in the community with the skill to do this? (with the final goal to have Sound Blaster sound on DOS VDM). Or it has to be someone with more DOS development skill than OS/2 skill?

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5098
  • Karma: +117/-1
    • View Profile
Re: DTA (DTAudio) and DOS Sound Blaster audio
« Reply #5 on: February 18, 2020, 12:30:56 am »
Shame that Andrew Zabolotny, the author of VSb and TEMU moved on long ago. IBM did lure him back for the GCC 3.2.2 port but I assume that took money.

Roderick Klein

  • Hero Member
  • *****
  • Posts: 698
  • Karma: +14/-0
    • View Profile
Re: DTA (DTAudio) and DOS Sound Blaster audio
« Reply #6 on: February 20, 2020, 10:19:36 pm »
Hi Roderick

I guess you know more of the subject than me.
It is the first time I hear the DOS TSR term (Terminate and stay resident program)

Roderick, do you see someone in the community with the skill to do this? (with the final goal to have Sound Blaster sound on DOS VDM). Or it has to be someone with more DOS development skill than OS/2 skill?

Regards

You know I think my answer to people being able to write device diver and find them... VDD drivers are even goal to be a bigger speciality. Also the DTA has been modified.
Sadly its a pretty complex puzzle to get it done. I do know of somebody who is able to look at this.

Roderick

Tuure Linden

  • Jr. Member
  • **
  • Posts: 88
  • Karma: +0/-0
    • View Profile
Re: DTA (DTAudio) and DOS Sound Blaster audio
« Reply #7 on: November 11, 2020, 09:26:43 pm »
If I have understood it right the Sound Blaster emulation will be a feature in ArcaOS 5.1. So there's not much to do about this before 5.1 will be released? I'm really looking forward to it - the best games were made in DOS+SoundBlaster era and the experience is not the same without audio or using Dosbox instead of OS/2's built-in DOS emulation.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5098
  • Karma: +117/-1
    • View Profile
Re: DTA (DTAudio) and DOS Sound Blaster audio
« Reply #8 on: November 12, 2020, 02:10:08 am »
While I believe that's the goal, Arca Noae usually reserves the possibility that something such as DOS Sound Blaster audio might not be done in time. Lots of this stuff is done by volunteers or people working in their spare time and sometimes things are more dificult then expected.
There's a lot they're hoping to have ready for 5.1 and likely not all will be finished on time.
I'm not talking for Arca Noae, just my observations as a beta tester.

Tuure Linden

  • Jr. Member
  • **
  • Posts: 88
  • Karma: +0/-0
    • View Profile
Re: DTA (DTAudio) and DOS Sound Blaster audio
« Reply #9 on: November 12, 2020, 07:56:18 am »
That's true. From my point of view a better WLAN support, newer CUPS with support for my printer (it's available in CUPS for Linux and has been for a long while) and the new browser, of course, are more important things. And perhaps a way to print from WinOS/2 programs also.