Jump to content
IGNORED

POKEY sound question


vdub_bobby

Recommended Posts

What's the base frequency for the POKEY sound registers? Every reference I've found has said 64 KHz; is that accurate?

 

I mean, I know it is essentially accurate, but is it completely accurate - is the base frequency exactly 64 KHz or is it really something like 62.88 KHz?

 

Thanks. ;)

Link to comment
Share on other sites

The entire thing is based on the system clock, which is different for PAL and NTSC.

 

Therefore, PAL sounds are slightly lower pitched at any given AUDF values.

 

The system clocks are exactly 1,792,080 Hz for NTSC and 1,778,400 for PAL.

 

POKEY uses dividers to get the base clocks dependant on which mode you're using.

 

64 KHz uses a divide by 28 method, so you get a base freq of 63514 for PAL and 64002 for NTSC (both approximate Hz).

 

The 16 KHz mode uses a divide by 114 method, which (coincidentally or not) is exactly the same as the scanline frequency of the system - 15,600 PAL and 15,720 for NTSC.

 

The reason you divide by 2 to get the resultant frequency is that the AUDF counters control the transition change of the waveform (0 to 1, 1 to 0, repeating) - as you know "frequency" is the number of times the full waveform is produced in one second.

 

 

So, bottom line: 64 KHz is an accurate description of the mode if you're dealing with NTSC but not so much for PAL.

 

But, for actual "music" there is an extra "error factor" to consider - 8 bit control of the AUDF registers means that exact notes aren't always possible anyway. And the nature of the beast means that things get worse for higher frequencies since for example dividing a number by 255 gives almost the same result as 254, but 3 gives a vastly different result than 2.

Edited by Rybags
Link to comment
Share on other sites

The entire thing is based on the system clock, which is different for PAL and NTSC.

 

Therefore, PAL sounds are slightly lower pitched at any given AUDF values.

 

The system clocks are exactly 1,792,080 Hz for NTSC and 1,778,400 for PAL.

 

POKEY uses dividers to get the base clocks dependant on which mode you're using.

 

64 KHz uses a divide by 28 method, so you get a base freq of 63514 for PAL and 64002 for NTSC (both approximate Hz).

 

The 16 KHz mode uses a divide by 114 method, which (coincidentally or not) is exactly the same as the scanline frequency of the system - 15,600 PAL and 15,720 for NTSC.

Thanks! The reason I ask is since I am trying to translate the music/SFX from Squish 'Em to the 2600, which has a base frequency of 31.44 KHz - *almost* exactly half (but not quite) - it uses pixelclock/114 so it matches the scanline frequency as well.

 

And, of course, the 2600 only has 5 bits of control of its AUDFx registers, which makes things all the trickier...:twisted:

Edited by vdub_bobby
Link to comment
Share on other sites

Weird that the 2600 would use divide by 114, since it's system clock isn't really directly relative to the "standard" 3.6 MHz or so of NTSC.

 

Also strange that POKEY uses 114 since it takes no part in the video generation.

 

Probably a good chance that it was developed before Antic was finished and they didn't necessarily know about DLIs coming into existence.

 

In 16 KHz mode, the timers of Pokey can be used to generate "raster" IRQs, much the same way the ST uses Timer B.

Link to comment
Share on other sites

Weird that the 2600 would use divide by 114, since it's system clock isn't really directly relative to the "standard" 3.6 MHz or so of NTSC.

 

Also strange that POKEY uses 114 since it takes no part in the video generation.

 

Probably a good chance that it was developed before Antic was finished and they didn't necessarily know about DLIs coming into existence.

 

In 16 KHz mode, the timers of Pokey can be used to generate "raster" IRQs, much the same way the ST uses Timer B.

The Atari 800 hardware appears to be an extension of 2600 hardware in many respects, both in the graphics and sound. As well as some other things, too. So I wouldn't be surprised if the reason that POKEY uses 114 is the same reason that the TIA uses 114.

 

The underlying reason for the TIA using 114 is beyond my knowledge. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...