![]() |
|
|||||||
| Register | >> Amiga FAQ/Wiki << | Rules & Help | Members List / Moderators List | Search | Today's Posts | Mark Forums Read |
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Registered User
Join Date: Mar 2009
Location: moon
Posts: 264
|
Low-level workings of Paula
Interesting bit about the volume implementation: http://blog.kebby.org/?p=11
|
|
|
|
|
|
#2 |
|
Registered User
Join Date: Aug 2008
Location: Salisbury
Posts: 349
|
No idea, however make your samples as load of they can go and turn them down with the Paula instead of making them quieter, you wont loose detail then
|
|
|
|
|
|
#3 | |
|
Registered User
Join Date: Jan 2012
Location: USA
Posts: 84
|
Quote:
I wonder if there's any way to control the phases of the counters or if they simply run continuously. If a pair of volume counters can be made to run 180 degrees out of phase with one another, then samples can be made to interleave and samples with frequencies above 14KHz could be produced. Perhaps turning a channel on and off also starts and stops the channel's respective counter. Maybe Toni knows. |
|
|
|
|
|
|
#4 |
|
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,938
|
Interesting..
I'd assume there is only one counter shared by all channels and it is always counting. (Why waste gates for 4 counters when only one is enough and why bother with enable/disable input?) It probably is as simple as: "unmute" all channels when counter wraps around (becomes zero) and "mute" it when channel's volume matches counter value (I'd assume equal comparison is much simpler than equal or larger than) (Perhaps I am totally wrong but assuming and then finding test cases to either prove it wrong or right has worked for me so far..) |
|
|
|
|
|
#5 | |
|
Registered User
Join Date: Mar 2009
Location: moon
Posts: 264
|
Quote:
Is it possible to figure out if the assumption is right with that setup? |
|
|
|
|
|
|
#6 | ||||||
|
Registered User
Join Date: Mar 2009
Location: moon
Posts: 264
|
Quote:
Regarding the images, Toni measured from U14 (A500) and U15 (A1200) pin 14 due to difficulties with SMD. The LED filter was disabled, so only the fixed 6 dB/oct filter was active (U15, C321/331, R321/331 for left/right on the A1200, same circuit with different component numbers and values on the A500).Quote:
Quote:
Quote:
Quote:
Quote:
Later I found another hint - modulated carriers only work at max volume: http://amigadev.elowar.com/read/ADCD.../node00F2.html Finally, Toni saw the volcntrld in the audio state diagram: http://amigadev.elowar.com/read/ADCD.../node02DC.html I'm not sure what those impulses during switching are. Possibly the scope probe is picking up noise from the components. I don't think they can be part of the audio signal, because the lowpass filter would eat them. If anything is unclear or I have forgotten to include important details (quotes), feel free to ask. ![]() Last edited by absence; 21 June 2012 at 21:22. |
||||||
|
|
|
|
|
#7 |
|
Registered User
Join Date: Jan 2012
Location: USA
Posts: 84
|
Toni's comment about the counters being out of phase is interesting.
I bet the 45 degree phase difference is a result of the timing between writes to the DAT registers. By setting the volume to 31 on two voices and by using the copper to start those voices 180 degrees out of phase relative to each other, it should be possible to produce an output with a sample rate twice the expected maximum via DMA methods by using one buffer to hold the even samples and a second buffer to hold the odd samples. It might be worth losing a voice to get a nice crystal clear cymbal or snare drum sound at a 56KHz sample rate. It's too bad this wasn't understood when Octamed was written. |
|
|
|
|
|
#8 | ||
|
Registered User
Join Date: Mar 2009
Location: moon
Posts: 264
|
Quote:
Quote:
|
||
|
|
|
|
|
#9 |
|
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,938
|
Mostly useless information: AUDxVOL register appears to be 7-bit. 64-127 = max volume, 128 = volume 0, 129 = volume 1 and so on..
EDIT: Volume range is also 0-64, 63 = output off one cycle (tiny pulse visible on scope), 64 = full volume, output enabled all the time (straight line on scope) Last edited by Toni Wilen; 10 August 2012 at 13:00. |
|
|
|
|
|
#10 | |
|
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 44
Posts: 592
|
Quote:
|
|
|
|
|
|
|
#11 | |
|
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,938
|
Quote:
EDIT: I meant only 7 lowest bits are in use in AUDxVOL. Not that register itself is 7-bit. |
|
|
|
|
|
|
#12 | |
|
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 4,542
|
Quote:
Edit: too slow again. ![]()
__________________
Makes me sick when I hear all the shit that you say So much crap coming out, it must take you all day There's a space kept in hell with your name on the seat With a spike in the chair just to make it complete |
|
|
|
|
|
|
#13 |
|
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 44
Posts: 592
|
Sorry you are wrong, if you use move.b #64,$DFF0A8, you have $4040 in $dff0a8 register for 68000 to 68030, but for 68040/68060 you have $4000 only (if $dff0A8 was null before), and yes only 7 bits are used.
|
|
|
|
|
|
#14 |
|
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 4,542
|
Which is because of the byte write to the volume register as I said before!
__________________
Makes me sick when I hear all the shit that you say So much crap coming out, it must take you all day There's a space kept in hell with your name on the seat With a spike in the chair just to make it complete |
|
|
|
|
|
#15 |
|
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 44
Posts: 592
|
|
|
|
|
|
|
#16 |
|
Registered User
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 214
|
If you use a byte write, I guess you have to write to $dff0a9 to set bits 6-0, but you're saying that on a 68000, performing "move.b #$40, $dff0a8" will actually be the same as performing "move.w #$4040, $dff0a8" ???
|
|
|
|
|
|
#17 | |
|
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 36
Posts: 1,588
|
From the link in the original post:
Quote:
__________________
Random number generation is the art of producing pure gibberish as quickly as possible. - Bob Jenkins |
|
|
|
|
|
|
#18 | |
|
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,938
|
Quote:
- Pulses (Frequency = CCK/64) even when sample value does not change, except when volume is 64. - Pulse width = AUDxVOL value. I think 4x14-bit DACs would have been too expensive in early 1980s. |
|
|
|
|
|
|
#19 | |
|
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 36
Posts: 1,588
|
Quote:
Perhaps I'll write a program to test this just for fun ![]() Seems odd considering Paula can handle sample rates of over a megabyte per second (or is that also untrue?).
__________________
Random number generation is the art of producing pure gibberish as quickly as possible. - Bob Jenkins |
|
|
|
|
|
|
#20 |
|
Registered User
Join Date: Jan 2012
Location: USA
Posts: 84
|
The PWM frequency is 56KHz. This would seem to imply an upper limit of 56K samples per second. The volume counters are reset whenever a new sample is loaded for output, however, so as the output rate increases above 56K, the number of available volume levels effectively goes down but the output rate can continue to increase.
|
|
|
|
|
|
#21 | ||
|
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,938
|
Quote:
Quote:
|
||
|
|
|
|
|
#22 |
|
Registered User
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 214
|
under normal circumstances, the highest number of samples per second possible is 28867. This means (according to Nyquist criteria) that the highest frequency sound you can play correctly is 28867/2 = 14434.
If the volume pwm counters run at a frequency of 56KHz and you want to use volume levels other than 64, this also limits the samplerate to ~28KHz (56/2) or you would get aliasing. Considering this volume implementation, the hardware designers would be stupid to use anything but 8-bit DACs.. Last edited by hooverphonique; 16 August 2012 at 16:35. |
|
|
|
|
|
#23 | |||
|
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 36
Posts: 1,588
|
Quote:
Quote:
Quote:
)?
__________________
Random number generation is the art of producing pure gibberish as quickly as possible. - Bob Jenkins |
|||
|
|
|
|
|
#24 | |
|
Registered User
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 214
|
Quote:
When running in double scan, paula is able to play back higher samplerates using dma. If this also affects frequency of the volume counters, I don't know. |
|
|
|
|
|
|
#25 | |
|
Registered User
Join Date: Jan 2012
Location: USA
Posts: 84
|
Quote:
The Amiga outputs samples. That is subtly different from sampling. One isn't necessarily trying to reconstruct a waveform. One instead tries to synthesize a waveform from a table of values (the Amiga hardware even supports wavetable synthesis by allowing one channel to modulate another's pitch or volume). A two sample square wave output at 1000 samples per second, for example, will generate an infinite number of odd integer harmonics above 1000Hz -- 3000Hz, 5000Hz, or 17000Hz, or 19000Hz, etc. Whether or not those frequencies are output depends on the details of the Amiga's output filter and not the sample rate. |
|
|
|
|
|
|
#26 |
|
Registered User
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 214
|
Yes and no.. It might be misapplication of Nyquist, I don't remember anymore, but it still holds true. How would you play back a wave of frequency 20KHz, for instance, if your max sample rate is 28KHz? By playing a lower frequency wave and then rely on harmonics? The smallest wave you can do contains 2 samples, so you cannot really create a direct wave of higher frequency than half the max sample rate..
|
|
|
|
|
|
#27 | |
|
Registered User
Join Date: Jan 2012
Location: USA
Posts: 84
|
Quote:
Okay. But I have to disagree with your suggestion that somehow harmonics aren't real frequencies that are output along with the fundamental. The question was whether or not the Amiga can produce frequencies above 14KHz using DMA and no tricks. The answer is "yes". The confusion comes from seeing the Amiga's audio strictly as a kind of sampler. It isn't just a sampler. It outputs arbitrary waveforms at variable rates up to 14K values per second per voice. It's a synthesizer. And synthesizers have a long history of relying on the higher-order harmonics of basic waveforms to develop sounds with a complex timbre. A single pure sinusoid of 20KHz is mostly useless. A lower frequency square wave and all it's harmonics, on the other hand, is very useful. Where the Amiga's audio suffers is in the control of high frequency random noise above 14KHz. |
|
|
|
|
|
|
#28 |
|
Registered User
Join Date: Mar 2009
Location: moon
Posts: 264
|
Wow, this thread went out of hand rather quickly and prooves audio is a little understood topic in the community...
|
|
|
|
|
|
#29 | |
|
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 44
Posts: 592
|
Quote:
If you have A500 and Action Replay 3, you can trace Amiga registers, easy enough. |
|
|
|
|
|
|
#30 | |
|
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 44
Posts: 592
|
Quote:
|
|
|
|
|
|
|
#31 |
|
Registered User
Join Date: Jan 2012
Location: USA
Posts: 84
|
|
|
|
|
|
|
#32 | |
|
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,938
|
Quote:
|
|
|
|
|
|
|
#33 |
|
Registered User
Join Date: Dec 2011
Location: Gummersbach
Posts: 2
|
What happens if a Protracker module uses a lower period than 124? I'm currently working on a Protracker replayer for the c64 and I found a lot Amiga modules using lower periods.
|
|
|
|
|
|
#34 |
|
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,938
|
|
|
|
|
|
|
#35 | ||
|
Oldskool Demo Coder
|
Quote:
Quote:
It will sound shrill and rasping, for high-frequency instruments rather like the whistle of a referee. In other words, like crap. You can test this by starting Protracker, load a melody instrument, and then press U (or 0, depending on how high that version goes).
__________________
Henrik. Programs Amiga demos, iPhone apps, websites, etc. A1000/512k - A500 2.0/040@28/4M/.5M slowmem/8M/SCSI/CF - A600 portable II 3.1/ACA630/WiFi/CF - 'A1700' 3.1/68060@80/64M/IDE-Fix Express/CF - etc."The difference between PC and Amiga is that 10yo PCs are worth $0. 20yo Amigas are worth a lot, and Amigas that are only 15yo cost a fortune!" If you like Portal 2, try my >> single player and cooperation maps << |
||
|
|
|
|
|
#36 | |
|
Registered User
Join Date: Jun 2010
Location: NL/PL
Posts: 498
|
Quote:
This should be quite easy to check - set two samples identical value (AUDxDAT) then modulate PWM (AUDxVOL) even square wave (but fast - maybe with Copper help), scope connected to audio output before integrator (directly to Paula pin) should show real frequency for PWM - 56kHz seems to be very low clock and IMHO will create lot intermodulation distortions. Limit 56kHz is related only to DMA not software driven audio (even HRM mention about 1.79MHz PWM audio) |
|
|
|
|
|
|
#37 |
|
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,938
|
|
|
|
|
|
|
#38 | |
|
Registered User
Join Date: Jun 2010
Location: NL/PL
Posts: 498
|
Quote:
So sampling frequency for PWM is 3.58MHz/64 samples per second - ie if someone decide instead using 8 bit DAC to produce audio, 6 bit PWM as DAC can't expect sampling frequency higher than this (Nyquist criteria). To avoid problems with higher DMA audio sampling frequencies - value 65 (ie bypas PWM ) for AUDxVOL must be used - perhaps someone can verify this on ECS or AGA (create video mode when H frequency will be much faster than VGA ie something like 60kHz - this probably imply video mode with 80 pixels for lowres) Last edited by prowler; 18 October 2012 at 22:41. Reason: Back-to-back posts merged. |
|
|
|
|
|
|
#39 | |||
|
Registered User
Join Date: Mar 2009
Location: moon
Posts: 264
|
Quote:
Quote:
![]() Quote:
Last edited by prowler; 18 October 2012 at 22:43. Reason: Fixed quotes. |
|||
|
|
|
|
|
#40 | |
|
Registered User
Join Date: Jun 2010
Location: NL/PL
Posts: 498
|
Yep - never claimed anything else.
Quote:
This is circuit with two DAC's in series and one of them can be bypassed. To add more details - max frequency that can be reproduced by PWM DAC in Amiga is half 3.58MHz/64. Yes, and i never claimed that there is ECS or AGA Paula - verification in ECS or AGA system can be easier due fact that video sequencer is programmable and H line can be shorter thus H frequency higher and DMA data can be feed to Paula faster than 56ksps - then verification for internal architecture should be easier (however i think that at least in theory H line can be shortened also on OCS by access cycle to correct STR* strobe registers). And faster DMA can affect modulation when modulation one channel to another is active - (however only one byte from word is used) - limitations for internal Paula architecture can be easily exposed when H line will be really short. Last edited by pandy71; 18 October 2012 at 20:49. |
|
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| USB Flash Disk Low-Level Format | prowler | support.Hardware | 53 | 03 August 2012 21:39 |
| Low level format utility for the A1200 | Fabie | support.Hardware | 20 | 11 January 2010 19:13 |
| I'm stuck on the final level (level 3) of Ghostbusters II. | Ironclaw | support.Games | 34 | 24 October 2007 07:19 |
| When to low level format | Galaxy | support.Hardware | 6 | 30 January 2007 12:39 |
| Low Level Format??? | Djay | support.Hardware | 4 | 01 March 2003 20:58 |