VOGONS


The Soundblaster DSP project

Topic actions

Reply 700 of 1053, by mattw

User metadata
Rank Oldbie
Rank
Oldbie
Error 0x7CF wrote on 2023-10-05, 21:50:

if it gets incompletely written while being changed (updated? rewritten on power-up?) it will render the card invisible.

yeah, that is what makes most sense, i.e. that there was (common) case when the EEPROM gets corrupted, and their technical support was forced to release the EEPROM tool in order to recover it.

Reply 702 of 1053, by Gmlb256

User metadata
Rank l33t
Rank
l33t
Maelgrum wrote on 2023-10-05, 22:00:

1.About Single cycle DMA bug - Which games show this effect most clearly?

Jill of the Jungle, which has a "Noise Maker" option that is useful for testing.

VIA C3 Nehemiah 1.2A @ 1.46 GHz | ASUS P2-99 | 256 MB PC133 SDRAM | GeForce3 Ti 200 64 MB | Voodoo2 12 MB | SBLive! | AWE64 | SBPro2 | GUS

Reply 703 of 1053, by mattw

User metadata
Rank Oldbie
Rank
Oldbie
Maelgrum wrote on 2023-10-05, 22:00:

2. Anybody knows - can DOSbox ouput all commands sent to SB in some log ?

don't know if any of those will be of help to you, but just to mentioned them:

* you can try '86box' (instead DOSbox), you can build your own version of it from source - it builds really easy even in Windows, using 'MSYS2' building environment, then you can use their 'pclog' function to add debug messages for what you're interested in, I used it to debug some problems (with XGA driver):

https://github.com/86Box/86Box/issues/2983#is … ment-1362778891

* I am attaching the source code of the old VSB (Virtual Sound Blaster) emulator written by the Russian Andrew Zabolotny like 30 years ago. I doubt it contains anything unknown at this point, but it's still fascinating piece of software - if nothing else - make a mirror and archive it here.

Attachments

Reply 705 of 1053, by Gmlb256

User metadata
Rank l33t
Rank
l33t

Wolfenstein 3-D, noticeable when opening and closing doors during the game.

VIA C3 Nehemiah 1.2A @ 1.46 GHz | ASUS P2-99 | 256 MB PC133 SDRAM | GeForce3 Ti 200 64 MB | Voodoo2 12 MB | SBLive! | AWE64 | SBPro2 | GUS

Reply 706 of 1053, by maxtherabbit

User metadata
Rank l33t
Rank
l33t

Personally I find it most noticable in games with speech like DOTT and the star trek judgement rites (not 25th anniversary as it does auto init)

Reply 708 of 1053, by Maelgrum

User metadata
Rank Member
Rank
Member

Found this:
https://www.gamedev.net/tutorials/programming … laster-16-r444/
The FIFO is used to eliminate inconsistencies in the sample period when the sound card is not able to get DMA when it needs it. With FIFO disabled, the card attempts DMA at precisely the instant that it needs a sample. If another device with a higher priority is accessing DMA, the sound card waits for the sample and the sampling rate may be decreased. The FIFO allows the DMA sample period to be more erratic without affecting the audio quality. The FIFO is cleared whenever a command is sent to the DSP. In Single-cycle mode, the DSP is constantly being reprogrammed. The FIFO may still contain data which has not been output when it cleared. To avoid this problem, the FIFO should be turned off for single-cycle mode. When in auto-initialized mode, the DSP is never reprogrammed. The FIFO can be left on and sound quality will be improved.

Reply 710 of 1053, by maxtherabbit

User metadata
Rank l33t
Rank
l33t
S95Sedan wrote on 2023-10-04, 16:32:

Cant get it to work on a ct3900, hangs on csp detection booting up, maybe it possibly needs the last 2kb?
Edit; On further look it seems shifted upwards, copyright at 413 starts at 175D and 416 is 162B

Were you able to get it working with the CSP driver disabled? I'm starting to wonder if the 4.16 doesn't work with the CT1747 bus interface.

Reply 711 of 1053, by Maelgrum

User metadata
Rank Member
Rank
Member
maxtherabbit wrote on 2023-10-06, 01:53:

diagnose doesn't find my CT2230 with the 8k 4.16 FW - should I have burned the 6k image instead?

8k 4.16 - is 6k 4.16 with some junk in upper 2k.
If 8k not working - then 6k will be not working.
4.16 is shorter then 4.13 - something is cutted.
4.13 patch 3/4 is superior to 4.16 - hanging note fixed and CSP/ASP is working.

Reply 712 of 1053, by maxtherabbit

User metadata
Rank l33t
Rank
l33t
Maelgrum wrote on 2023-10-06, 02:19:

4.13 patch 3/4 is superior to 4.16 - hanging note fixed and CSP/ASP is working.

yes, just having a bit of fun trying to get 4.16 working on older cards

Reply 713 of 1053, by Maelgrum

User metadata
Rank Member
Rank
Member

In Interrupt handler routine they dont push/pop psw, but should have do so.
But they do push dpl, push dph and pop dpl,pop dph - but dptr is not used at all (int1 handler)
Dont do what needed, but do what not needed.
Unconditional jump to RET, in time critical handler - why not ? ))
Load register by value #08. And few lines below lets load it again by value #08 - looks like protection against high energy cosmic rays.
Optimization of time critical pieces of code ... what is that ? Lets do a multiple calls to few lines long routines instead.
etc ... etc ... etc ...

Reply 714 of 1053, by Maelgrum

User metadata
Rank Member
Rank
Member

Thinking about Single cycle DMA bug ...
What happens inside SB after each command 0x14 (Single cycle DMA) ?
1. It must process Int 1 interrupt handler (end of block interrupt)
2. It must process new 0x14 command
But it is slow !
How much DSP cycles we have ? ( 1 cycle = minimum command execution time = 12 OSC clocks )
For 8000 sampling rate, we have 2000000/8000 = 250 cycles
For 11025 = 2000000/11025 = 180 cycles
But 180 cycles is not 180 DSP operations, as some operations can take 2 cycles
Current implementation of interrupt handlers and command processing is very inefficient.
Maybe if execution path of command 0x14 processing, and execution of its end of block interrupt is optimized for minimization of execution time,
Single cycle clicks will be minimized

Last edited by Maelgrum on 2023-10-06, 05:36. Edited 3 times in total.

Reply 715 of 1053, by S95Sedan

User metadata
Rank Member
Rank
Member
Maelgrum wrote on 2023-10-05, 21:19:
This merging is not reliable - it contains some invalid definitions , like: m 24 autoinit_16bit ; 24h.2 x this is not true ) […]
Show full quote

This merging is not reliable - it contains some invalid definitions , like:
m 24 autoinit_16bit ; 24h.2 x
this is not true ))
So it is better to analyze code, what was true in DSP 2.0, is not in DSP 4.xx

It definately needs some work but its surprising how many similairities it has to the 2.02 one though.

maxtherabbit wrote on 2023-10-06, 02:05:
S95Sedan wrote on 2023-10-04, 16:32:

Cant get it to work on a ct3900, hangs on csp detection booting up, maybe it possibly needs the last 2kb?
Edit; On further look it seems shifted upwards, copyright at 413 starts at 175D and 416 is 162B

Were you able to get it working with the CSP driver disabled? I'm starting to wonder if the 4.16 doesn't work with the CT1747 bus interface.

Yeah, i used a ct1740 as the ct3900 would hang on/after loading csp.sys.

This is what i used; (my config is a bit more complicated, as i have a selection menu for all my cards, but i think thats the important stuff)

Autoexec.bat;
SET BLASTER=A220 I5 D1 H5 P330
SET SOUND=C:\DRIVERS\CT1730
SET MIDI=SYNTH:1 MAP:E
C:\DRIVERS\CT1730\DIAGNOSE /S
C:\DRIVERS\CT1730\MIXERSET /P /Q

Config.sys;
SET MIDI=SYNTH:1 MAP:E MODE:0

Reply 716 of 1053, by Maelgrum

User metadata
Rank Member
Rank
Member

So i did a execution trace of interrupt handler = its ~94 cycle
execution trace of command 0x14 execution path is ~174 cycle
In total it is 268 cycles - even in most optimistic case - we out of bounds (> 250)

Attachments

  • Filename
    2.txt
    File size
    2.76 KiB
    Downloads
    27 downloads
    File license
    Public domain
  • Filename
    1.txt
    File size
    1.33 KiB
    Downloads
    25 downloads
    File license
    Public domain

Reply 717 of 1053, by maxtherabbit

User metadata
Rank l33t
Rank
l33t
S95Sedan wrote on 2023-10-06, 05:29:
It definately needs some work but its surprising how many similairities it has to the 2.02 one though. […]
Show full quote
Maelgrum wrote on 2023-10-05, 21:19:
This merging is not reliable - it contains some invalid definitions , like: m 24 autoinit_16bit ; 24h.2 x this is not true ) […]
Show full quote

This merging is not reliable - it contains some invalid definitions , like:
m 24 autoinit_16bit ; 24h.2 x
this is not true ))
So it is better to analyze code, what was true in DSP 2.0, is not in DSP 4.xx

It definately needs some work but its surprising how many similairities it has to the 2.02 one though.

maxtherabbit wrote on 2023-10-06, 02:05:
S95Sedan wrote on 2023-10-04, 16:32:

Cant get it to work on a ct3900, hangs on csp detection booting up, maybe it possibly needs the last 2kb?
Edit; On further look it seems shifted upwards, copyright at 413 starts at 175D and 416 is 162B

Were you able to get it working with the CSP driver disabled? I'm starting to wonder if the 4.16 doesn't work with the CT1747 bus interface.

Yeah, i used a ct1740 as the ct3900 would hang on/after loading csp.sys.

This is what i used; (my config is a bit more complicated, as i have a selection menu for all my cards, but i think thats the important stuff)

Autoexec.bat;
SET BLASTER=A220 I5 D1 H5 P330
SET SOUND=C:\DRIVERS\CT1730
SET MIDI=SYNTH:1 MAP:E
C:\DRIVERS\CT1730\DIAGNOSE /S
C:\DRIVERS\CT1730\MIXERSET /P /Q

Config.sys;
SET MIDI=SYNTH:1 MAP:E MODE:0

I meant were you able to get the CT3900 specifically to work with 4.16 if you simply don't load CSP.SYS

Reply 718 of 1053, by mattw

User metadata
Rank Oldbie
Rank
Oldbie
Maelgrum wrote on 2023-10-06, 02:19:

4.16 is shorter then 4.13 - something is cutted.

based on the reports here that CSP.SYS fails to load on AWE32 when the MCU is flashed with V4.16, I think best guess is the ASP code is removed from the V4.16 DSP - looking at 86box AWE32/ASP emulation code:

https://github.com/86Box/86Box/blob/master/sr … nd/snd_sb_dsp.c

those are the following DSP commands:

case 0x01: /* asp_data_len???? */
case 0x03: /* ASP status */
case 0x04: /* ASP set mode register */
case 0x05: /* ASP set codec parameter */
case 0x08: /* ASP get version */
case 0x0E: /* ASP set register */
case 0x0F: /* ASP get register */

also, in "Reverse engineering the SB16 ASP/CSP" thread here:

Tests/Info welcome: Reverse engineering the SB16 ASP/CSP

it was figured out that Creative used Signaled Processor ST18933 from SGS-Thomson (STMicroelectronics).

Maybe, they removed/improved something regarding EMU8000 support in AWE64 as well, but in EMU8000 emulation code from 86Box:

https://github.com/86Box/86Box/blob/master/sr … und/snd_emu8k.c

at first glance I don't see any clues - maybe it's totally independent from the DSP code.

Reply 719 of 1053, by S95Sedan

User metadata
Rank Member
Rank
Member
maxtherabbit wrote on 2023-10-06, 07:57:

I meant were you able to get the CT3900 specifically to work with 4.16 if you simply don't load CSP.SYS

Not sure, dont know if i did as i mostly wanted to confirm if the firmware was actually good. So switched to a ct1740 quite fast, also to see if the dma stuff was still there.