Linards Ticmanis wrote:
sicklittlemonkey wrote:What improvements are you playing with? I'm very interested in sound improvement for emulation. Catakig's author, Colin Klipsch had some help from a DSP engineer, and the results are amazing. But he had to change the clock speed of his emulator slightly to make it work.I've done the same. 23 * 44100 Hz = 1014300 Hz; at that clock speed, there are exactly 23 Apple cycles per sample. The real speed is of course about 1020484 Hz. I add together the number of apple cycles during one sample that the speaker was "on" (which gives a number of 0-23), multiply by 10 and send that value to the sound card. At least Ghostbusters and Legend of Blacksilver (two relatively hard cases) sound relatively well that way.But of course for better emulation you'd need to implement a decent filtering of the signal.
Actually, as long as the Apple output doesn't contain frequencies above 22kHz--and that's a pretty good bet, your scheme should produce very good results. Making the sample rate high and synchronous with the Apple clock has the effect of "decimating" the virtual 1MHz bi-level sample stream, and your value assignment algorithm is perfect. By a happy coincidence, the period of the PWM pulses created by DAC522 is 46 Apple cycles, and your sampling scheme should reproduce its output perfectly! -michael Music synthesis for 8-bit Apple II's! Home page: http://members.aol.com/MJMahon/ "The wastebasket is our most important design tool--and it is seriously underused."