VOGONS


The Soundblaster DSP project

Topic actions

Reply 781 of 1053, by maxtherabbit

User metadata
Rank l33t
Rank
l33t
Maelgrum wrote on 2023-10-07, 20:25:

Clicking is same as before, or something changed ?

hard to tell, but it seems like it might be reduced slightly? could be placebo though

Reply 782 of 1053, by Maelgrum

User metadata
Rank Member
Rank
Member
maxtherabbit wrote on 2023-10-07, 20:26:
Maelgrum wrote on 2023-10-07, 20:25:

Clicking is same as before, or something changed ?

hard to tell, but it seems like it might be reduced slightly? could be placebo though

If it is reduced, then optimization of execution time is way to remove this bug.
If nothing changed - problem in something else.
All 'easy' optimizations are done in this version.

Reply 783 of 1053, by maxtherabbit

User metadata
Rank l33t
Rank
l33t
S95Sedan wrote on 2023-10-07, 20:25:
Maelgrum wrote on 2023-10-07, 20:15:

If it works, look at single cycle dma

Works but still clicking.

What do you think, improvement or the same?

Reply 784 of 1053, by Maelgrum

User metadata
Rank Member
Rank
Member

Question - is Single dma clicking bug present on playing Adpcm?
Currently, command 0x14 play sound in hardware assisted way. DSP programs Bus interface chip, and then this chip loads by dma samples and sends them to dac.
But Adpcm is done 'software ' - DSP gets byte by byte, decodes it, and send output value to DAC.
May be same method can be used and for cmd 0x14

Last edited by Maelgrum on 2023-10-07, 20:49. Edited 1 time in total.

Reply 785 of 1053, by maxtherabbit

User metadata
Rank l33t
Rank
l33t
Maelgrum wrote on 2023-10-07, 20:43:

Question - is Single dma clicking bug present on playing Adpcm?

I heard it in Duke nukem 2 when firing the gun, so I think yes

Reply 787 of 1053, by rasz_pl

User metadata
Rank l33t
Rank
l33t

Would be good to establish a controlled test for clicking. Might be confusing if peoples definition of clicking is different and they use different programs/games to derive conclusions.

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

Reply 789 of 1053, by mattw

User metadata
Rank Oldbie
Rank
Oldbie
Maelgrum wrote on 2023-10-07, 20:53:

And... May be with fast 6 cycle '52 MCU can help

how those MCUs are put in such mode, because today in one datasheet I read:

12-clock operation with selectable 6-clock operation (via parallel programmer)

do universal programmers on USB support to do such selection?

Reply 790 of 1053, by maxtherabbit

User metadata
Rank l33t
Rank
l33t
Maelgrum wrote on 2023-10-07, 20:56:

Is Adpcm bug fixed?
If it is, we get 2 great improvements comparing to V4. 13 - hanging note bug and Adpcm bug fixes.

What was the bug? ADPCM in duke2 was working with stock 4.13.

Reply 791 of 1053, by Maelgrum

User metadata
Rank Member
Rank
Member
mattw wrote on 2023-10-07, 20:58:
how those MCUs are put in such mode, because today in one datasheet I read: […]
Show full quote
Maelgrum wrote on 2023-10-07, 20:53:

And... May be with fast 6 cycle '52 MCU can help

how those MCUs are put in such mode, because today in one datasheet I read:

12-clock operation with selectable 6-clock operation (via parallel programmer)

do universal programmers on USB support to do such selection?

Can you tell model name of this MCU?

Reply 792 of 1053, by Maelgrum

User metadata
Rank Member
Rank
Member
maxtherabbit wrote on 2023-10-07, 20:59:
Maelgrum wrote on 2023-10-07, 20:56:

Is Adpcm bug fixed?
If it is, we get 2 great improvements comparing to V4. 13 - hanging note bug and Adpcm bug fixes.

What was the bug? ADPCM in duke2 was working with stock 4.13.

Adpcm has 3 modes - 2 bit, 3 bit and 4 bit.
May be duke2 used non bugged mode?

Reply 793 of 1053, by mattw

User metadata
Rank Oldbie
Rank
Oldbie
Maelgrum wrote on 2023-10-07, 21:02:

Can you tell model name of this MCU?

it was either 'Philips P87C52X2' or 'Temic TS87C52X2' - one of those 2, because I remember they have "X2" in the marking to indicate option for 6 clocks. I need to check, because today I read a lot of those chips datasheets.

[EDIT] It seems I took the above in my notes from the 'Philips P87C52X2' datasheet, but I suspect some special programmer is needed to put their chip permanently in 6 clocks mode. 'Temic TS87C52X2' datasheet says in their case clock-divider register is used, which I guess - you need to have code in the firmware to activate it.

Last edited by mattw on 2023-10-07, 21:14. Edited 2 times in total.

Reply 794 of 1053, by Maelgrum

User metadata
Rank Member
Rank
Member

And one more thing - in this Adpcm code, instead of loading value 0xff to accumulator, they loaded non existing SFR register 0xFF to accumulator.
If this SFR read gives 0xFF - all be ok, but it is very MCU manufacturer depending, what you get by reading non existing register

Reply 795 of 1053, by S95Sedan

User metadata
Rank Member
Rank
Member
maxtherabbit wrote on 2023-10-07, 20:59:
Maelgrum wrote on 2023-10-07, 20:56:

Is Adpcm bug fixed?
If it is, we get 2 great improvements comparing to V4. 13 - hanging note bug and Adpcm bug fixes.

What was the bug? ADPCM in duke2 was working with stock 4.13.

I suppose this would be able to test everything? Looked into it before but never gotten to it.
Sound Blaster 16 Audio Compression Comparison (DOS)

Reply 796 of 1053, by Maelgrum

User metadata
Rank Member
Rank
Member
mattw wrote on 2023-10-07, 21:08:
Maelgrum wrote on 2023-10-07, 21:02:

Can you tell model name of this MCU?

it was either 'Philips P87C52X2' or 'Temic TS87C52X2' - one of those 2, because I remember they have "X2" in the marking to indicate option for 6 clocks. I need to check, because today I read a lot of those chips datasheets.

Philips P87C52X2 - 12-clock operation with selectable 6-clock operation (via software or via parallel programmer)
So it is possible from fw turn on 6-clock mode

Reply 797 of 1053, by Maelgrum

User metadata
Rank Member
Rank
Member
mattw wrote on 2023-10-07, 21:08:
Maelgrum wrote on 2023-10-07, 21:02:

Can you tell model name of this MCU?

it was either 'Philips P87C52X2' or 'Temic TS87C52X2' - one of those 2, because I remember they have "X2" in the marking to indicate option for 6 clocks. I need to check, because today I read a lot of those chips datasheets.

[EDIT] It seems I took the above in my notes from the 'Philips P87C52X2' datasheet, but I suspect some special programmer is needed to put their chip permanently in 6 clocks mode. 'Temic TS87C52X2' datasheet says in their case clock-divider register is used, which I guess - you need to have code in the firmware to activate it.

Hmmmm ... Philips P87C52X2 has no flash. not best idea if you want reprogamming.
[EDIT] Same is Temic.
Why not modern flash based '52 ?

Last edited by Maelgrum on 2023-10-07, 21:20. Edited 1 time in total.

Reply 798 of 1053, by mattw

User metadata
Rank Oldbie
Rank
Oldbie
Maelgrum wrote on 2023-10-07, 21:14:

Philips P87C52X2 - 12-clock operation with selectable 6-clock operation (via software or via parallel programmer)
So it is possible from fw turn on 6-clock mode

yes, I further found table in the datasheet - by programmer is in hardware and so no firmware modification, otherwise is via a register:

x2_mode.jpg
Filename
x2_mode.jpg
File size
17.68 KiB
Views
923 views
File license
Public domain
Maelgrum wrote on 2023-10-07, 21:19:

Hmmmm ... Philips P87C52X2 has no flash. not best idea if you want reprogamming.

yeah, it's really hard to find the perfect chip for the task - that's why today I read so many datasheets and I still have no best candidate.

Maelgrum wrote on 2023-10-07, 21:19:

[EDIT] Same is Temic.
Why not modern flash based '52 ?

I don't mind any modern one, but which modern one has 6 clocks - maybe all of them, I don't remember reading anything about 6 clocks in AT89S52 datasheet, which is maybe the most modern one.

Reply 799 of 1053, by Maelgrum

User metadata
Rank Member
Rank
Member
mattw wrote on 2023-10-07, 21:20:
yes, I further found table in the datasheet - by programmer is in hardware and so no firmware modification, otherwise is via a r […]
Show full quote
Maelgrum wrote on 2023-10-07, 21:14:

Philips P87C52X2 - 12-clock operation with selectable 6-clock operation (via software or via parallel programmer)
So it is possible from fw turn on 6-clock mode

yes, I further found table in the datasheet - by programmer is in hardware and so no firmware modification, otherwise is via a register:

x2_mode.jpg

Maelgrum wrote on 2023-10-07, 21:19:

Hmmmm ... Philips P87C52X2 has no flash. not best idea if you want reprogamming.

yeah, it's really hard to find the perfect chip for the task - that's why today I read so many datasheets and I still have no best candidate.

Maelgrum wrote on 2023-10-07, 21:19:

[EDIT] Same is Temic.
Why not modern flash based '52 ?

I don't mind any modern one, but which modern one has 6 clocks - maybe all of them, I don't remember reading anything about 6 clocks in AT89S52 datasheet, which is maybe the most modern one.

Something like AT89C51ID2-SLSUM or AT89C51ED2-SLSUM, but pins compatibility shold be checked.