27 September 2022, 21:56 | #181 | |
Registered User
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,426
|
Quote:
you are probably right |
|
27 September 2022, 22:15 | #182 |
Registered User
Join Date: Jun 2018
Location: Calgary/Canada
Posts: 247
|
Let it be said here and forever more that Paula has a 7-bit "real" DAC that can source or sink (giving it sort-of 8-bits) but that has not-so-great linearity and an asymmetrical shape on the positive and negative side. This is then "chopped" with a 55kHz PWM based on a 6-bit volume before being mixed.
I'm going to go out on a limb and say based on this supposed layout of Paula that the volume PWM drives the OpAmp mode into high-z when the volume is off. I guess the channel-mix is the only "undiscovered country" here. |
27 September 2022, 22:25 | #183 | |
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,885
|
Quote:
I use two 8 bit PWM as example that PDM need some time (or particular number of samples) to represent unique quantization step PCM as pulse density modulation need many samples averaged over time. PWM or PDM are similar in such fashion - both need some time i.e. multiple samples where PCM need single sample. And from this perspective PDM is form of temporal dithering. |
|
27 September 2022, 22:27 | #184 |
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,885
|
|
27 September 2022, 22:33 | #185 |
Registered User
Join Date: Jun 2018
Location: Calgary/Canada
Posts: 247
|
|
27 September 2022, 22:34 | #186 | |
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,885
|
Quote:
But in digital domain you are free from all this and you can create pure signal as desired by Amiga designers. |
|
27 September 2022, 22:36 | #187 |
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,885
|
|
27 September 2022, 23:17 | #188 | |
Registered User
Join Date: Jun 2018
Location: Calgary/Canada
Posts: 247
|
Quote:
|
|
27 September 2022, 23:20 | #189 | |
Registered User
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,426
|
Quote:
You could also use this to implement 64 volume levels: clone the channel 64 times and then set one or many of them to "zero"(101010101 ....) and mix them all together. This would result in a 1.7*64MHz PDM signal ... |
|
27 September 2022, 23:21 | #190 | |
Registered User
Join Date: Jun 2018
Location: Calgary/Canada
Posts: 247
|
Quote:
|
|
27 September 2022, 23:49 | #191 | ||
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,885
|
Quote:
And of course PDM works different than PCM - for single multilevel PCM sample, PDM need many samples (they can be single or multilevel - more levels means lower quantization noise and stable higher order DSM). If you design for example 4-th order DSM with 4 bit then for sure 14 bit audio should be reachable within sane frequency range. 4 bit PWM can be fed from DSM so linearity will be provided by design (for 4 bit PWM you need clock 16 times higher than for DSM). multiplication 8 bit by 6 can be done in multiplier (parallel or serial). biggest issue is sample rate - 3.58MHz may be to high and unnecessary from practical perspective - original I/V converter in Amiga use OPAMP like LF347/TL084 - IMHO they are to slow to deal with Paula signal, probably modern, fast OPAMP could remove some visible waveform distortions. Quote:
Drop-in replacement should be possible. |
||
28 September 2022, 00:08 | #192 | |
Registered User
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,426
|
Quote:
8 PDM streams, either signal or "zero", are mixed in the end ... that gives you 8 volume levels and a PDM frequency of 14 or 28 MHz ... the initial 8bit sample could be right-shifted up to 8 times, which gives you another 8 levels of volume ... Together we get 64 levels ... and a lot of silence and missing signal at very low volume, just as with original Paula |
|
28 September 2022, 00:09 | #193 | |
Registered User
Join Date: Jun 2018
Location: Calgary/Canada
Posts: 247
|
Quote:
|
|
28 September 2022, 00:26 | #194 | |
Registered User
Join Date: Jun 2018
Location: Calgary/Canada
Posts: 247
|
Quote:
We'd have four PWM streams. - These are 55kHz volume PWMs. - If these are LOW then the output is high-Z - If these are HIGH then they pass the PDM We'd have four PDM streams. - These are signed binary streams (base-3-ish) - We take the 7-bits + LSB of an LFSR into an 8-bit adder - We use the carry out + original sample sign-bit - L/R channel pairs are then summed into an accumulator - If the sum carriers, we set the output high (source) - If the sum borrows, we set the output low (sink) - Otherwise we make the output high-Z I think this is the most "electrically compatible" with Amiga's OpAmps. Obviously, the faster we can make the PDM go, the closer to "real analog" it can get. Right now it's too hot for me to think through the logic on a signed-binary adder. |
|
28 September 2022, 00:35 | #195 |
Registered User
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,426
|
Sure.
But you could easily clone each channel 8 times ... just 8 taps on the line. And you could make a switch on each tap - either real signal or "zero" (10101010...) Then you mix all these taps together again, which means for PDM signals just alternating between them resulting in a 8x frequency ... (we can convert this down again if needed..) Now, depending how many taps carry the real signal and how many are "zero", you get 8 levels of volume! Without any signal degradation. The magic of 1-bit signal processing. |
28 September 2022, 02:17 | #196 | |
Registered User
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,426
|
Quote:
This will not only introduce a high frequency signal, that can easily be filtered, but also change lower frequencies, as soon as an analog signal will be formed. Sure: this is also the case in the original Paula, but if you look at the measurements, that were done: the shape of the original wave is continued very good after the "break" ... that is something, that will not work the same way for PDM. Example: Code:
two perfect sine waves in PDM: 0101101111111111111101101010010000000000000100010011011101111111111111011010100100000000000000100101 with "half volume": 0101101110101010111101101010101000000000101010100011011110101010111111011010101000000000101010100101 (with 10101010 replacing every other block) The result is anything but two sine waves .... But if you mix it like I suggested, the simplest result (real signal + zero = half volume) would look like: 011001110011011101110111011101110111011001110011001100100110001000010001000100010001001100010010110010011011001110110011101110111011101110111011001110011001100100110001000100010001001000100010011000110011 same two sine waves, but at half the volume and encoded with double frequency... Hence my suggestion to mix the PDM channel with zero-channels the "right way" in terms of 1-bit signal processing... Last edited by Gorf; 28 September 2022 at 02:44. |
|
28 September 2022, 03:01 | #197 | |
Registered User
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,426
|
Quote:
Compare it to the Super Audio CD: The PDM Stream is 2.8224 MHz on a SACD ... that is only 64 times 44.1 kHz! And still it sounds better than normal CDs. |
|
28 September 2022, 06:16 | #198 |
Registered User
Join Date: Jun 2018
Location: Calgary/Canada
Posts: 247
|
Umm, no. First, that sine wave is 35kHz and I'm not sure the Amiga hardware would emit something like this even if you drove it at 56kHz. That aside, your bit stream is wrong.
Code:
PDM 0101101111111111111101101010010000000000000100010011011101111111111111011010100100000000000000100101 PCM 1111111111111111111111111111111100000000000000000000000000000000111111111111111111111111111111110000 OUT 0101101111111111111101101010010000000000000000000000000000000000111111011010100100000000000000100000 |
28 September 2022, 08:50 | #199 | |
Registered User
Join Date: Aug 2014
Location: Netherlands
Posts: 701
|
Quote:
Another thought, besides sigma-delta modulators there also exist MASH modulators. MASH modulators are inherently stable and thus easier to implement than higher order sigma-delta modulators. MASH needs a multibit final converter though but that can be implemented via PWM. A second order MASH modulator will already make a big difference and output (-1,0,+1,+2) which can be easily constructed using the tristate trick. This link explains it very clearly: http://www.aholme.co.uk/Frac2/Mash.htm Many moons ago I used it to construct a fractional PLL that had sub-Hz resolution and very low phase-noise for a telemetry receiver. That was using a MAX-II CPLD. |
|
28 September 2022, 09:58 | #200 | ||
Registered User
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,426
|
Quote:
Quote:
On PDM "zero" or "no output" is a clock signal, that averages to 0.5, that is why I inserted 10101010… You cannot simply set the signal to 00000000… , since this is a maximum/minimum value in PDM. Last edited by Gorf; 28 September 2022 at 10:10. |
||
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Amiga 500 and Agnus cleaning without removing Agnus? | turrican9 | support.Hardware | 16 | 26 January 2016 16:05 |
Universal Translator | mritter0 | request.Apps | 2 | 14 June 2014 19:28 |
Universal Warrior | Asle | HOL data problems | 4 | 10 September 2011 22:14 |
swap fat agnus with agnus | extralife | support.Hardware | 12 | 23 July 2008 15:35 |
|
|