DOSBox-X branch

Here you can discuss the development of patches.

Re: DOSBox-X branch

Postby hail-to-the-ryzen » 2018-6-11 @ 00:09

There is some sound crackling when starting Windows 95 and where sbtype is not SB16. It is from the Windows Start Sound wave file and is reproducible by playing that file again in the guest OS. Tested various configuration switches without much effect.

Did note a difference in the frequency that it plays among the different devices.
sbpro1: SBLASTER:DMA Transfer:8-bits PCM Mono Auto-Init freq 22222 rate 22222 size 1376 gold 0
sb16: SBLASTER:DMA Transfer:8-bits PCM Mono Auto-Init freq 22050 rate 22050 size 1376 gold 0
hail-to-the-ryzen
Member
 
Posts: 198
Joined: 2017-3-09 @ 01:34

Re: DOSBox-X branch

Postby TheGreatCodeholio » 2018-6-11 @ 00:44

That is known, yes. It seems to me the driver expects to start the next buffer right away when the interrupt happens. The problem is that Sound Blaster emulation inherits DOSBox SVN's 1ms rendering code. It's not yet 100% precise enough.
DOSBox-X project: more emulation better accuracy.
DOSLIB and DOSLIB2: Learn how to tinker and hack hardware and software from DOS.
User avatar
TheGreatCodeholio
Oldbie
 
Posts: 509
Joined: 2011-8-18 @ 20:15
Location: Seattle, WA

Re: DOSBox-X branch

Postby hail-to-the-ryzen » 2018-6-11 @ 01:04

Thank you for the information. I assume that the sbpro/sb drivers are rendering the sound differently than the sb16, or the sb16 is polling more frequently. Is this an issue that just requires better timing and that a workaround is not possible?
hail-to-the-ryzen
Member
 
Posts: 198
Joined: 2017-3-09 @ 01:34

Re: DOSBox-X branch

Postby TheGreatCodeholio » 2018-6-11 @ 03:35

hail-to-the-ryzen wrote:Thank you for the information. I assume that the sbpro/sb drivers are rendering the sound differently than the sb16, or the sb16 is polling more frequently. Is this an issue that just requires better timing and that a workaround is not possible?

As far as I know, the workaround is to implement Sound Blaster timing in a more precise manner.
DOSBox-X project: more emulation better accuracy.
DOSLIB and DOSLIB2: Learn how to tinker and hack hardware and software from DOS.
User avatar
TheGreatCodeholio
Oldbie
 
Posts: 509
Joined: 2011-8-18 @ 20:15
Location: Seattle, WA

Re: DOSBox-X branch

Postby hail-to-the-ryzen » 2018-6-11 @ 06:38

Your version of the sdl waveout driver seems to sound better for the above case.
hail-to-the-ryzen
Member
 
Posts: 198
Joined: 2017-3-09 @ 01:34

Re: DOSBox-X branch

Postby hail-to-the-ryzen » 2018-6-14 @ 03:10

The sound crackling in Win95 and sbtype < SB16 is mainly heard with a sound file of long length, perhaps >3 ms. Also, these settings lessen the sound artifact: prebuffer=0; blocksize=256 (or possibly lower).
hail-to-the-ryzen
Member
 
Posts: 198
Joined: 2017-3-09 @ 01:34

Re: DOSBox-X branch

Postby hail-to-the-ryzen » 2018-6-17 @ 04:38

This change to correct a compiler warning should be reverted.
Code: Select all
--- dosbox-before//src/hardware/voodoo_data.h
+++ dosbox-after/src/hardware/voodoo_data.h
@@ -164,7 +164,7 @@ static const UINT8 dither_matrix_2x2[16]
    (c) = (int)((((unsigned int)(val) << 2u) & 0xf8u) | (((unsigned int)(val) >>  3u) & 0x07u));   \
 
 #define EXTRACT_1555_TO_8888(val, a, b, c, d)            \
-   (a) = (int)(((unsigned int)(val) >> 15u) & 0xffu);                  \
+   (a) = ((INT16)(val) >> 15) & 0xff;                  \
    EXTRACT_x555_TO_888(val, b, c, d)                  \
 
 #define EXTRACT_5551_TO_8888(val, a, b, c, d)            \
hail-to-the-ryzen
Member
 
Posts: 198
Joined: 2017-3-09 @ 01:34

Previous

Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 0 guests