cd-w Posted March 3, 2010 Share Posted March 3, 2010 I have been doing some experiments recently with the Atari Display Processor Chip (DPC). This chip is used in Pitfall 2 to generate the display and music. It is now emulated by the Harmony/Melody, and so it can be used in homebrew games. I have only experimented with the audio side of things so far, but the results are quite impressive. It is possible to generate music that is significantly better-sounding than the normal TIA tunes. I have attached two examples below (these can be played with Stella or on a Harmony cart): danube.bin pop.bin The DPC works by generating square waves. Three different square waves can be generated, and the frequency of each can be modified. The waves are combined together into a single value, which is then fed to the AUDV0/1 register on the TIA to generate digital music. The downside of this technique is that the AUDV0/1 register must be modified on (almost) every scanline, which makes programming difficult. I have attached an example below (with source), which illustrates how to modify the frequency of a single square wave (use the joystick left/right to change the frequency). dpctuner.zip Certain frequencies correspond to musical notes. The value required by the DPC is approximately 20,000kHz/frequency. Unfortunately the DPC only accepts integer values, so it is not possible to match the notes exactly. The source code includes a file (dpc.h) which contains the note values used in the tunes above. I'm certainly no expert at music, so I'm sure others will be able to get much more out of the DPC. Let me know what you think? Chris 2 Quote Link to comment Share on other sites More sharing options...
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.