VOGONS


The Soundblaster DSP project

Topic actions

Reply 980 of 1051, by maxtherabbit

User metadata
Rank l33t
Rank
l33t
maxtherabbit wrote on 2023-10-16, 02:01:
Maelgrum wrote on 2023-10-16, 01:39:

From Duke Nukem 2:

Details
D1          - Enable Speaker
40 38 - Set Time Constant 5000 Hz
75 15 09 - DMA DAC, 4-bit ADPCM Reference
D0 - Halt DMA Operation, 8-bit
40 38 - Set Time Constant 5000 Hz
75 15 09 - DMA DAC, 4-bit ADPCM Reference
D0 - Halt DMA Operation, 8-bit
40 38 - Set Time Constant 5000 Hz
75 15 09 - DMA DAC, 4-bit ADPCM Reference
D0 - Halt DMA Operation, 8-bit
40 72 - Set Time Constant 7042 Hz
75 3E 05 - DMA DAC, 4-bit ADPCM Reference
D0 - Halt DMA Operation, 8-bit
40 39 - Set Time Constant 5025 Hz
77 25 05 - DMA DAC, 2.6-bit ADPCM Reference
D0 - Halt DMA Operation, 8-bit
40 72 - Set Time Constant 7042 Hz
75 3E 05 - DMA DAC, 4-bit ADPCM Reference
D0 - Halt DMA Operation, 8-bit
40 06 - Set Time Constant 4000 Hz
75 3A 03 - DMA DAC, 4-bit ADPCM Reference
D0 - Halt DMA Operation, 8-bit

Uses ADPCM 4 and 2.6 bit

So any "click build" testing we did with duke2 should be invalidated

This also means 4.16 should be retested with DOTT on a CT1740

Reply 982 of 1051, by Maelgrum

User metadata
Rank Member
Rank
Member

Log from Prince of Persia 1.4:

Details
E0 C6       - DSP Identification
E0 AA - DSP Identification
E1 - DSP Version
D1 - Enable Speaker
D1 - Enable Speaker
40 A6 - Set Time Constant 11111 Hz
14 9B 15 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 A6 - Set Time Constant 11111 Hz
14 77 10 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 A6 - Set Time Constant 11111 Hz
14 51 06 - DMA DAC, 8-bit
------------- IRQ8
40 A6 - Set Time Constant 11111 Hz
14 77 10 - DMA DAC, 8-bit
------------- IRQ8
40 A6 - Set Time Constant 11111 Hz
14 51 06 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 A6 - Set Time Constant 11111 Hz
14 77 10 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 A6 - Set Time Constant 11111 Hz
14 77 10 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
D0 - Halt DMA Operation, 8-bit
40 A2 - Set Time Constant 10638 Hz
Show last 78 lines
14 8F 04    - DMA DAC, 8-bit
D0 - Halt DMA Operation, 8-bit
40 A7 - Set Time Constant 11235 Hz
14 15 04 - DMA DAC, 8-bit
------------- IRQ8
40 A6 - Set Time Constant 11111 Hz
14 8F 04 - DMA DAC, 8-bit
------------- IRQ8
40 A8 - Set Time Constant 11363 Hz
14 15 04 - DMA DAC, 8-bit
------------- IRQ8
40 A6 - Set Time Constant 11111 Hz
14 51 06 - DMA DAC, 8-bit
------------- IRQ8
40 A6 - Set Time Constant 11111 Hz
14 37 18 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 A6 - Set Time Constant 11111 Hz
14 7F 12 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 A6 - Set Time Constant 11111 Hz
14 51 06 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
------------- IRQ8

This is interesting:

------------- IRQ8
40 87 - Set Time Constant 8264 Hz
14 E3 03 - DMA DAC, 8-bit
D0 - Halt DMA Operation, 8-bit
40 A2 - Set Time Constant 10638 Hz
14 8F 04 - DMA DAC, 8-bit
D0 - Halt DMA Operation, 8-bit
40 A7 - Set Time Constant 11235 Hz
14 15 04 - DMA DAC, 8-bit
------------- IRQ8

1. Game changes samplerate, and starts multiple buffer playings, interrupted by game events
2. All operations - Set Time Constant, DMA DAC 0x14, Halt DMA operation - is long in term of time on SB16, compared to SB Pro

Reply 984 of 1051, by Maelgrum

User metadata
Rank Member
Rank
Member
Kahenraz wrote on 2023-10-16, 05:31:

Out of curiosity, does the clicking happen for Sound Blaster 16 games or just those played in Sound Blaster Pro mode on a SB16?

All games designed for Auto init DMA will have no problems on SB16. Auto init dma was supported in fw 2.xx and later, so even simple SB (not Pro) can support it, but may be for compatibility with first SB (1.0/1.5), or because of developers laziness, some games uses single cycle dma.

Reply 985 of 1051, by mattw

User metadata
Rank Oldbie
Rank
Oldbie

MAME runs the DSP code in their own 'I80C52'-emulator:

I80C52(config, m_cpu, XTAL(24'000'000));

https://github.com/mamedev/mame/blob/master/s … us/isa/sb16.cpp

isn't in that regard MAME better to collect logs from their 'I80C52'-emulator directly, i.e. logs that are coming from the execution of the DSP code itself via that 'I80C52'-emulator and what exact DSP code was executed?

With DOSbox aren't all you get as logs is what the game is doing, i.e. what it's sending to the DSP as requests? then I guess, based on those requests and the DSP code itself, you assume what actual DSP code was executed. I don't know, maybe, that assumption is equally good to what MAME logs will show...

Reply 986 of 1051, by rasz_pl

User metadata
Rank l33t
Rank
l33t

Afaik MAME isnt cycle accurate, I dont think MAME SB16 is clicking. Might be good for tracing 8052 firmware execution, but not for definitive verification of potential fixes.

Open Source AT&T Globalyst/NCR/FIC 486-GAC-2 proprietary Cache Module reproduction

Reply 987 of 1051, by georgel

User metadata
Rank Member
Rank
Member
rasz_pl wrote on 2023-10-16, 09:16:

Afaik MAME isnt cycle accurate, I dont think MAME SB16 is clicking. Might be good for tracing 8052 firmware execution, but not for definitive verification of potential fixes.

It is rather accurate. Which cycles do you mean? Those of x86 or those of other emulated CPUs?

Reply 988 of 1051, by georgel

User metadata
Rank Member
Rank
Member
mattw wrote on 2023-10-16, 08:40:
MAME runs the DSP code in their own 'I80C52'-emulator: […]
Show full quote

MAME runs the DSP code in their own 'I80C52'-emulator:

I80C52(config, m_cpu, XTAL(24'000'000));

https://github.com/mamedev/mame/blob/master/s … us/isa/sb16.cpp

isn't in that regard MAME better to collect logs from their 'I80C52'-emulator directly, i.e. logs that are coming from the execution of the DSP code itself via that 'I80C52'-emulator and what exact DSP code was executed?

With DOSbox aren't all you get as logs is what the game is doing, i.e. what it's sending to the DSP as requests? then I guess, based on those requests and the DSP code itself, you assume what actual DSP code was executed. I don't know, maybe, that assumption is equally good to what MAME logs will show...

Re: The Soundblaster DSP project
Re: The Soundblaster DSP project

Reply 989 of 1051, by Maelgrum

User metadata
Rank Member
Rank
Member
rasz_pl wrote on 2023-10-16, 09:16:

Afaik MAME isnt cycle accurate, I dont think MAME SB16 is clicking. Might be good for tracing 8052 firmware execution, but not for definitive verification of potential fixes.

This Mame SB emulator is based on dump research, not on real hardware.
Few hints from this source code was useful.
But it doesn't emulate Bus interface chip properly,
and no assumptions can be made on possible problems.
It's a toy. Very nice toy, but toy.
It's like using dosbox for solving hardware problems.

Reply 990 of 1051, by BloodyCactus

User metadata
Rank Oldbie
Rank
Oldbie

be interesting to see how it is with any demos using GoldPlay because it does single byte dma and does funky timing with the dsp.

--/\-[ Stu : Bloody Cactus :: [ https://bloodycactus.com :: http://kråketær.com ]-/\--

Reply 991 of 1051, by Maelgrum

User metadata
Rank Member
Rank
Member

To understand that happening on hardware side, you need:
1. Capture x-bus exchange
2. Capture raw DAC data
3. Capture DMA data
All of this - simultaneously, and on large data set.
32 bit logic analyzer with very large memory, or streaming real-time, with some additional dac-decoding circuit.

Reply 992 of 1051, by georgel

User metadata
Rank Member
Rank
Member
Maelgrum wrote on 2023-10-16, 12:13:

It's a toy. Very nice toy, but toy.

So are the sound blaster cards themselves 😉

Maelgrum wrote on 2023-10-16, 12:26:
To understand that happening on hardware side, you need: 1. Capture x-bus exchange 2. Capture raw DAC data 3. Capture DMA data […]
Show full quote

To understand that happening on hardware side, you need:
1. Capture x-bus exchange
2. Capture raw DAC data
3. Capture DMA data
All of this - simultaneously, and on large data set.
32 bit logic analyzer with very large memory, or streaming real-time, with some additional dac-decoding circuit.

Or use brain and/or be the original author of the device.

Reply 993 of 1051, by rasz_pl

User metadata
Rank l33t
Rank
l33t

$5 salea clone snooping on /DACK, DRQ, IRQ together with I2S stream and something to decode port 220 access will be plenty to start with. Might not even need I2S, just seeing how long the pauses are between DRQ and port 220 reads/writes would tell a lot.

Open Source AT&T Globalyst/NCR/FIC 486-GAC-2 proprietary Cache Module reproduction

Reply 994 of 1051, by S95Sedan

User metadata
Rank Member
Rank
Member
Maelgrum wrote on 2023-10-16, 02:48:

Is here any difference in clicking with this ? delay lowered from 100 to 10

Sounds the same as version 5.

Attachments

  • Filename
    duke2.mp3
    File size
    110.2 KiB
    Downloads
    35 downloads
    File license
    Public domain
  • Filename
    dott.mp3
    File size
    1.58 MiB
    Downloads
    34 downloads
    File license
    Public domain
  • Filename
    prince.mp3
    File size
    326.33 KiB
    Downloads
    30 downloads
    File license
    Public domain

Reply 995 of 1051, by georgel

User metadata
Rank Member
Rank
Member
S95Sedan wrote on 2023-10-16, 15:51:
Maelgrum wrote on 2023-10-16, 02:48:

Is here any difference in clicking with this ? delay lowered from 100 to 10

Sounds the same as version 5.

To my partially deaf from aviation ears and used from childhood to Apple2 sounds these examples are good enough and I hear no defective cracking, but you are the experts. Shall I attach quality headphones to my laptop to hear what is bothering you?

Reply 996 of 1051, by DerBaum

User metadata
Rank Oldbie
Rank
Oldbie
georgel wrote on 2023-10-16, 16:29:
S95Sedan wrote on 2023-10-16, 15:51:
Maelgrum wrote on 2023-10-16, 02:48:

Is here any difference in clicking with this ? delay lowered from 100 to 10

Sounds the same as version 5.

To my partially deaf from aviation ears and used from childhood to Apple2 sounds these examples are good enough and I hear no defective cracking, but you are the experts. Shall I attach quality headphones to my laptop to hear what is bothering you?

I can hear the clicks on my super tinny monitor speakers.
The best example is duke where it clicks after every sound. in the DOTT example i can just hear some major clicks (when he says "I dont think you should drink that.".and in a suction cup sound after he said "aggressive" The last example also clicks after every repeat of the soundeffect.
I am judging from my ears, but i am sure that you could see the spikes in the recording when opened in Audacity for example.

FCKGW-RHQQ2

Reply 997 of 1051, by maxtherabbit

User metadata
Rank l33t
Rank
l33t
S95Sedan wrote on 2023-10-16, 15:51:
Maelgrum wrote on 2023-10-16, 02:48:

Is here any difference in clicking with this ? delay lowered from 100 to 10

Sounds the same as version 5.

Yeah I definitely hear clicking in the DOTT sample

Reply 998 of 1051, by mattw

User metadata
Rank Oldbie
Rank
Oldbie
Maelgrum wrote on 2023-10-16, 12:13:

It's a toy. Very nice toy, but toy.

it might be so, but if it can be even of minimal help then building MAME from source and thus be able to add debug messages, etc. turned out to be ultra simple, I documented it here:

Re: MAME Roland MPU-401 Emulator

(I guess the command line will need to change to something like:

mame ct486 -hard1 msdos622 -isa2 sblaster_16

for SB16 support and files "ct1741_v413[80c52].bin" and "ct1741_v413_xor" need to be added to the roms directory)

So, if someone need it - then even spending the time to install 'Ubuntu 22.04.2 LTS' (I saved that time in my case, because I already had such installation) is probably less than 1 hour time and most of the time is just waiting - in my case relaxing and drinking several cups of green tea.

Also, I guess that is helpful if someone is interested to improve/fix MAME support for SB16 based on all and any new findings - I guess they did best based on their knowledge and information at the time.

Reply 999 of 1051, by maxtherabbit

User metadata
Rank l33t
Rank
l33t

Today I went back and retested all of maelgrum's test builds from source with DOTT. Unfortunately they are all still clicking. I can't really notice any difference between the clicks and stock either