27 September 2022, 15:25 | #161 | |
Registered User
Join Date: Aug 2014
Location: Netherlands
Posts: 695
|
Quote:
For example, in the case of an 8bit delta-sigma modulator fed with "+1" or 0x01, the carry output will output 1 every 256th clock pulse. At 3.57MHz clock this will generate a ~14Khz idle tone. If this carry is then fed into another adder to combine 2 channels this idle tone will further be divided down to 7KHz or lower which is definitely audible. If volume is also applied this tone could be further divided down in frequency. In effect you have 6bits volume + 8bits audio = 14bits of audio resolution. And a single order delta-sigma modulator cannot cleanly reproduce this resolution in the audio band @3.57MHz clock rate. A higher order modulator is needed to achieve that. I believe you when you say it doesn't sound of. Most of the time it will sound OK but there are edge cases (certain mod files / players) that leave a DC component on the DAC registers which will cause audible noise trails or idle tones. |
|
27 September 2022, 17:29 | #162 | |
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,741
|
Quote:
I don't understand how possible is to use PWM with PDM - my understanding of electronics lead me to conclusion if 6 bit PWM require clock 64 times (at least) higher than sample rate then based on this is PDM require (single bit, first order, 50dB SNR) at least 64 times oversampling. This means that clock should be at least 4096 times higher than maximum sample rate. Unless PWM control analog value (for example Vref) so it is no longer digital... Quite obvious is to use multiplier performing volume control by multiplying sample value (8 bit) by 6 bit volume as such producing 14 bit word length (seem this is common method dealing with Amiga audio emulation in SW and HW today)... |
|
27 September 2022, 18:14 | #163 | ||
Registered User
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,153
|
That's exactly the solution I settled on (though actually for different reasons - I know nonarkitten has seen my blog post on the subject).
Quote:
Quote:
My standard "test suite" when I was tinkering with this stuff was as follows: * Play "Stardust Memories" in a version of ProTracker with a master volume control, set one step above silence. Record on PC, amplify to normal listening levels, see how recognisable / noisy the result is. * Play the intro tune from Gauntlet III - the closing arpeggio fades out to nothing, and triggers some strangely modulated idle tones in its dying gasps. * Play the game "Gods", where the reverb tail on the footstep sounds can trigger some louder-than-expected noise with some DACs. * Also in "Gods" jumping sometimes causes the audio to be parked on values very close to but not quite zero, which again can result in audible idle tones. I believe that the symptoms these tests highlighted were at least in part due to FPGA pin switching and reconstruction filter characteristics rather than the DACs under test, per se - so the selfsame tests on different hardware might yield different results. |
||
27 September 2022, 19:00 | #164 | ||||
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,741
|
Quote:
Alternatively to single bit DSM a multi bit DSM can be used at a cost of all troubles common for multibit architectures. PWM is neat workaround as it is inherently linear (assumption is sufficient time accuracy but this is critical also for DSM) thus able to deliver multibit without common multibit issues - limitations is of course frequency - for 8 bit PWM a 256 times faster clock than samplerate and for 16 bit 65536 times faster clock. But putting together PDM (DSM) and PWM can create nice couple - you can use multibit, high order DSM and keep frequency and linearity within sane limits. Quote:
Quote:
Having perfect 14 bits (6*8 multiplication) is OK for me and remove necessity of calibration. Quote:
To use concept of PWM*PDM without 4096 clock, PWM may control voltage reference for DSM but before being feed to PDM (DSM) it need to be filtered to remove PWM so in other words it must be continuous, analog voltage. But this will create incompatible Paula replacement pinout (need to output separately PWM to be analog filtered externally then can be used to supply DSM). In Paula this is easier as sample value can be feed to buffer before DAC where buffer is controlled by PWM (or multiplexer switching between 0 and sample value). If DAC is sufficiently high speed (3.58MHz at least) then it is not important from his perspective if sample value occurs 1/64 sample time or 63/64 sample time. |
||||
27 September 2022, 19:09 | #165 |
Registered User
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,294
|
|
27 September 2022, 19:13 | #166 |
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,741
|
|
27 September 2022, 19:20 | #167 | |
Registered User
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,294
|
Quote:
See also following discussions: http://eab.abime.net/showthread.php?t=105744 "14.57731 bit audio" and http://eab.abime.net/showthread.php?t=105355 "Amiga '14-bit audio' refuted" |
|
27 September 2022, 19:24 | #168 | ||||||
Registered User
Join Date: Jun 2018
Location: Calgary/Canada
Posts: 247
|
Quote:
With 1/127th the energy. That should correspond to about a -42dB drop. But I'll comment more on this at the end. Quote:
Quote:
Quote:
Then, if we're talking effective number of bits, the Amiga really only gets about 10-11 bits. The whole 14-bit audio is a BIT of an exaggeration. But the whole 14-bit thing could be it's own essay.. Quote:
Code:
assign CLK7M = CCK ^ ~CCKQ; Quote:
[ Show youtube player ] For anyone who hasn't seen it, you should check out this video showing the volume PWM in action. At around 50% the PWM is almost a perfect sawtooth -- there is no flatness. Even near the 0 and 100% it's extremely round and this is with the filters turned off. And this is a 55kHz signal. Yes, with the filters "off" there's still some filtering, but if we've already lost half the signal at 55kHz, nothing should survive at 3.5MHz. It's not the 14kHz that matters here, its the 140ns wide pulse. This reminds me of to our old S08 driving a 22.5kHz PWM where about 97% to 100% were indistinguishable with even the best oscilloscope. Now all this speculation aside, we have a lot of evidence. Let's first look at the evidence AGAINST it being a "true" Analog DAC: - True 8-bit DACs were expensive back in the day - An 8-bit R2R ladder has non-linearity that's not observed on Amiga - Paula has been decapped; there are no resistors evident -- there is one solder pad for left and one solder pad for right - There is also no evidence for a package-in-package solution with a real 8-bit DAC; and it should be added that SoC and PiP was not a thing in 1984 - There are serpentine traces, but this was not a practice at this time to create resistors, nor effective at this process size (this would be a few ohms at best); resistors then were other FETs - The effective resistance of FETs and serpentine traces is too variable to construct an effective DAC; most chips pull-ups are anywhere between about 10K and 100K - More common back then would have been 8-pins per L/R and the resistors would have been external; since packages were more expensive than silicon, this would make no sense - Bax comments about the 3.58MHz speed of the DAC being evident in the FFT's in http://bax.comlab.uni-rostock.de/dl/...mTheoretic.pdf - Antti stating, "Paula does no interpolation of any kind. Paula's output is strictly a pulse wave, produced on 3546895 Hz frequency, which is the Paula clock rate for PAL systems." https://bel.fi/alankila/modguide/interpolate.txt - Most literature uses the term PCM a lot which would not describe a true analog DAC nor the volume PWM https://en.wikipedia.org/wiki/Original_Chip_Set#Audio - The OpAmps from Paula are constructed in a Del-Sig configuration. Something MiniMig completely ignored and just did a basic two-order RC filter; short of schematics or scope traces, this is as close to a "smoking gun" as I can see - The Amiga HRM talks about being able to emit a 1.79MHz square wave if you disable the filters Arugments for? - A naive 8-bit PDM & 6-bit PWM does NOT result in "more bits" With all this aside could you still see apparent analog levels on Paula directly even if it is "PCM"? Sure, because of the bypass on the OpAmp, the source signal is contaminated. To see the "pure" output from Paula on the 500, break JP10A (waaaaaay over on the right side of the board) and sample right off that pad. Disable DMA, set the sample rate to get a 1.79MHz square wave and try setting the values to different. Then we'll know for sure. On that last point and some above, I think I'll make some tweaks to the design to remedy this. Regardless of how Paula was architected, I do not have the ability to make a true DAC at all. |
||||||
27 September 2022, 19:37 | #169 | ||
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,741
|
Quote:
Quote:
We don't know (not aware of Paula schematic similar to Agnus and seem decapping then layout conversion is not done) physical Paula implementation for PWM and DAC as PWM control can be implemented in many ways and will work in Paula same/similarly. Issue with Paula is that internally it is hybrid system using digital and anlog circuitry where FPGA use plain digital and trying to mimic some analog with digital blocks - this is possible but you need decent DSP (large and expensive FPGA). |
||
27 September 2022, 19:48 | #170 |
Registered User
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,294
|
Life is not ... but Paula might be.
I don't think Glenn Keller cared to much about the reconstruction theory but made it somehow work with what he got ... He had no clue about chip design - after all Paula was his first! https://amitopia.com/glennkeller-paula-interview/ |
27 September 2022, 20:22 | #171 | |
Registered User
Join Date: Jun 2018
Location: Calgary/Canada
Posts: 247
|
Quote:
What we definitely DO know is that there's no way in hell Paula had an 8 * 6 bit multiplier on there. That's very clear. And like it or not, that 55kHz PWM noise is part of Amiga's sound; it gives it character that a PC doesn't have. Don't like it, get a PC. |
|
27 September 2022, 20:25 | #172 | ||||||||||
Registered User
Join Date: Aug 2014
Location: Netherlands
Posts: 695
|
Quote:
Quote:
Quote:
Quote:
- Quote:
Quote:
Quote:
Quote:
- Quote:
Quote:
Last edited by Mathesar; 27 September 2022 at 20:35. |
||||||||||
27 September 2022, 20:34 | #173 |
Registered User
Join Date: Jun 2018
Location: Calgary/Canada
Posts: 247
|
|
27 September 2022, 20:51 | #174 | |
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,741
|
Quote:
In those times 8 bit DAC was cheap - DAC08 cost probably around 1$ so at protoboard stage ( https://uber-leet.com/HistoryOfTheAmiga/ ) using 4 DAC's such as DAC08 ( https://www.richis-lab.de/DAC11.htm ) was quite simple and straightforward. Also when i observe silicone 8364 die pictures obviously there is repeated pattern of 4 identical blocks and this occupy large part of the 8364 die itself. https://siliconpr0n.org/map/csg/8364r4/mz_mit20x/ Real DAC's in IC's usually not use resistors but instead current sources/mirrors made from scaled (binary weighted) transistors (generally where is possible transistors are used in IC's to replace resistors) and such structures are visible on pictures - there are 4 regular, identical blocks where at each of them (first start at -52nm, -712nm end 3.228u, -120nm , then there are 3 copies bellow) "analog" structure is visible with variable area transistors (IMHO - of course i can be wrong but seem this is obvious, also some bits seem to be same - this could explain some lower linearity) - however strangely there is only 7 distinct "bits" there so or the Paula DAC is only 7 bit or LSB is so small that it use different approach (it may be not different than other transistors). Internal DAC topology/architecture can be very different - depends on DAC purpose. All above is based on limited resources available and my intention is not to disrespect anyone so if someone will feel offended please accept my apologies. |
|
27 September 2022, 20:58 | #175 | |
Registered User
Join Date: Aug 2014
Location: Netherlands
Posts: 695
|
Quote:
Paula can source or sink current depending on the sign of the input signal. So, then Paula would only need 7bits plus a current mirror for the sign. |
|
27 September 2022, 21:03 | #176 | |
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,741
|
Quote:
And PC has nothing about in this case as PWM can be disabled in Amiga (there is 65 states - PWM activity is controlled by bit 6 http://amiga-dev.wikidot.com/hardware:audxvol) . |
|
27 September 2022, 21:05 | #177 | |
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,741
|
Quote:
|
|
27 September 2022, 21:12 | #178 | |
Registered User
Join Date: Jun 2018
Location: Calgary/Canada
Posts: 247
|
Quote:
|
|
27 September 2022, 21:32 | #179 |
Registered User
Join Date: Aug 2014
Location: Netherlands
Posts: 695
|
Thinking about it, as you cannot support a full external DAC you could gain a few bits by having each channel drive a pin using 3 levels: 1,0 and tristate. A resistor would convert this into a simple current DAC with 3 levels. Four pins in total on the fpga going to 2 pins on Harmony by tying the resistors together. As you now have 3 levels to play with (that's a 1,5bit "DAC") you can make better modulation schemes to avoid idle tones and other problems. For example, you can have one bit less in the modulator. The modulator then controls the tristate enable input of the FPGA output buffer and the sign of the sample the output value of the buffer. One bit less in the modulator pushes your idle tones one octave higher up the band. Tying the resistors together also results in perfect addition of the output channels by the transimpedance amplifier.
|
27 September 2022, 21:49 | #180 | |
Registered User
Join Date: Jun 2018
Location: Calgary/Canada
Posts: 247
|
Quote:
So I'll conceded that Paula has a current DAC; 7-bits by the looks of it, that source or sink based on the sign. Which is neat. The PWM then "chops" that. So you're right, to drive this right we need a signal that can PDM between high and high-z for + signals and low and high-z for negative signals. That's pretty easy -- something like: Code:
if (sample[7]) out <= bitstream ? 1'b0 : 1'bz; else out <= bitstream ? 1'b1 : 1'bz; Last edited by nonarkitten; 27 September 2022 at 21:50. Reason: Reverse the polarity! |
|
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 |
|
|