Reply 780 of 1102, by S95Sedan
Maelgrum wrote on 2023-10-07, 20:15:If it works, look at single cycle dma
Works but still clicking.
Maelgrum wrote on 2023-10-07, 20:15:If it works, look at single cycle dma
Works but still clicking.
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
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.
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?
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
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
And... May be with fast 6 cycle '52 MCU can help
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.
https://github.com/raszpl/FIC-486-GAC-2-Cache-Module for AT&T Globalyst
https://github.com/raszpl/386RC-16 memory board
https://github.com/raszpl/440BX Reference Design adapted to Kicad
https://github.com/raszpl/Zenith_ZBIOS MFM-300 Monitor
Is Adpcm bug fixed?
If it is, we get 2 great improvements comparing to V4. 13 - hanging note bug and Adpcm bug fixes.
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?
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.
mattw wrote on 2023-10-07, 20:58:how those MCUs are put in such mode, because today in one datasheet I read: […]
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?
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?
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.
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
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)
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
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 ?
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:
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.
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 […]
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 modeyes, 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.