I’ve been working on a bizarre little project which involves the very first computer that I ever owned: my trusty old Atari 400. I bought it when I was just 16 years old, and it is probably the artifact of my deep past which is responsible for my career and a heck of a lot of what I’ve enjoyed in the way of geeky hacking.
Without giving too much away, I decided that I wanted to write a simple simulator that would try to emulate the functioning of the sound hardware that is inside the Atari, which all centers around a 4 channel sound synthesizer chip known as POKEY. The details of writing this simulator will probably form the basis of another blog post later, but basically I began with this chapter from the old reference manual De Re Atari.
A quick perusal of the high level description of reveals that the hardware can generate four individual channels of sound, and by setting individual bits, you can change the clock rate at which the sound channels operate to be either 1.79Mhz, 64Khz or 15Khz.
But it doesn’t explain how these numbers are derived.
In fact, the numbers are really only valid for the NTSC version of the Atari 400 and are not specified precisely. This probably doesn’t matter much for most users, but it kind of irked me that I didn’t understand where they came from, and it actually complicated the writing of the simulator.
A bit of digging revealed the following information, which I am going to write down so I don’t have to dig further.
For NTSC systems (the video standard which was common in the United States in those days before HD) these numbers are derived from the NTSC color subcarrier frequency, which is 3.579545 Mhz. A little quick arithemetic will show you that this is 2x the highest 1.79Mhz that POKEY uses to clock sound.
The other two clocks are done by simple pulse division. The nominal 64Khz clock is done by dividing the base frequency by 28, and the nominal 15Khz clock is done by dividing by 114, or at least that’s what appears to be going on. I’m not great at reading the schematics, but this probably reveals some of the details. Assuming the nominal NTSC clock frequency, this makes the “actual” frequencies 63.920Khz and 15.7Khz, respectively.
But anyway, while digging around, I found out that Doug Neubauer, creator of both the POKEY chip and author of the classic Star Raiders game that I spent so much time playing in 1980 has a website where he talks about his days at Atari. Bookmarked here for later consumption. https://dougneubauer.com/starraiders/