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

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 450
  • -Receive: 91
  • Posts: 2572
  • 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
  • ***
  • Thank You
  • -Given: 25
  • -Receive: 9
  • Posts: 148
  • 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
  • *****
  • Thank You
  • -Given: 450
  • -Receive: 91
  • Posts: 2572
  • 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

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 21
  • Posts: 336
    • 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
  • *****
  • Thank You
  • -Given: 450
  • -Receive: 91
  • Posts: 2572
  • 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
  • *****
  • Thank You
  • -Given: 11
  • -Receive: 167
  • Posts: 2342
    • 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

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 21
  • Posts: 336
    • 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