Determine Paula's max. replay rate
- Size
- 11K (11,025 bytes)
- Added
- 2026-11-20 03:04
- Downloads
- 2
- Long Description
- New V1.0: the hardware volume of the test tone can be set Contents: --------- 1) Background 2) Setting up the replay rate 3) What is the minimum period? 4) How do I use MaxReplayTest?! 5) Hardware Volume 6) MaxReplayTest is "Feedbackware" 7) History 8) Disclaimer 1) Background ------------- In the good old OCS times Paula and Audio was quite simple as there were only NTSC and PAL Amigas. On both systems the maximum replay rate for audio was something around 28.6 kHz.(*) With the upcoming of ECS and AGA the maximum replay rate also increased and Amiga magazines and other sources talked about a doubled maximum rate when using the new screen modes i.e. something around 57.2 kHz. But what is the real maximum replay rate using a specific screen mode? I could not figure it out for over 20 years! :-( But now, everything is different! :-D (*) there seems to be a second difference i.e. audio playback using the audio.device vs. "direct DMA". As I only use the audio.device and do not really understand the direct DMA playback, I am only talking about Paula in combination with the audio.device. 2) Setting up the replay rate ----------------------------- If you play sounds using the audio.device you have to create an AudioIO Request. In this structure you enter information about the memory location of the audio data to be played, the volume and some more, but there is no entry for a replay rate, only mysterious "period" !? This period is calculated using the colorclock and the replay rate i.e. period = colorclock / replay rate whereas colorclock is 3579545 Hz for NTSC systems (the hardware, not the screen mode!) and 3546895 Hz for PAL systems. (*) Altogether this means: the lower the period, the higher is the resulting replay rate. In order to get to know the maximum replay rate you need to know the minimum period. Regarding to the Autodocs the minimum period is 124. Obviously this part of the Autodocs was never updated when ECS and AGA were introduced. (*) for sure you recognized the resulting limitations!? i.e. if you want to replay with 22050 Hz (= 1/2 CD), on a PAL system the period is 160.8 which has to be rounded to 161 or 160. So the real resulting replay rate is 22030 Hz or 22168 Hz but not 22050 Hz!! => the lower the period gets, the bigger are the steps from a replay rate to the next one. For 44100 Hz (= CD) this means you have to choose between 44336 Hz or 43788 Hz! 3) What is the minimum period? ------------------------------ By a few simple tests I could figure out, that the DBLNTSC, DBLPAL and Productivity as well as Euro72 were capable to replay at least 44100 Hz. On the other side Super72 does not manage the 44100 Hz. => there is a connection between the screen mode and the max. replay rate => to replay with ~44100 Hz a period of 80 is required, therefore the 124 mentioned in the Autodocs is for sure no more true To learn more about Graphics and Chip-Ram and how they affect Paula I opened the thread "Grafik, Chip-Ram und Paula" in the A1K.org forum. There I got lots of feedback and explanations as well as the correct key-words to search for. => the final answer I found in the EAB forum in a posting from Toni Wilen (the WinUAE developer!) in the "15 bit 44 khz audio idea." thread: min period = (color clocks in horizontal line + 13) / 2 + channel Unfortunately Toni's formula does not match the findings on my A1200. So I adapted his formula a little bit: min period = (color clocks in horizontal line + 13 +1) / 2 + channel +1 this fomula can be written a bit differently: min period = (color clocks in horizontal line + 16) / 2 + channel That's the same formula the user "ross" compiled in the "Minimum safe Paula periods for PAL Amigas" thread also in the EAB forum: min period = (HTOTAL + 16) / 2 + channel Explanation: +1: HTOTAL to totalCCK per line +8: Paula to Agnus DMAL delay +6: floppy DMA setup bits +1: align for successive shift /2