Jump to content
IGNORED

DPC Music


cd-w

Recommended Posts

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

  • Like 2
Link to comment
Share on other sites

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.

While this is true for the actual DPC, it's not necessarily true for Harmony. Harmony uses a table of frequencies for the DPC and this could be customized. There's no reason why we couldn't use a table of frequencies that correspond to actual music notes.

 

Or, maybe we could just modify the existing table. I would expect that Pitfall II doesn't need the entire range from 1-255. If its lowest note is 166, for instance, we could fit in the entire range of piano key frequencies in 167-255.

Link to comment
Share on other sites

  • 7 years later...

mmm.... no sound with this bin files on z26 3.02.01 linux Ubuntu 17.04 this emulator just shows DPC VERSION 1 AND 2.... this files are version 3?

 

i`m able to run them on linux stella emulator

 

Linux 4.10.0-32-generic #36-Ubuntu SMP Tue Aug 8 12:10:06 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

 

cheers.

Link to comment
Share on other sites

  • 3 weeks later...

mmm.... no sound with this bin files on z26 3.02.01 linux Ubuntu 17.04 this emulator just shows DPC VERSION 1 AND 2.... this files are version 3?

i`m able to run them on linux stella emulator

Linux 4.10.0-32-generic #36-Ubuntu SMP Tue Aug 8 12:10:06 UTC 2017 x86_64 x86_64 x86_64 GNU/Linu

cheers.

I don't think z26 ever had working digital audio support and it hasn't been updated in years.

 

I suggest you just use Stella.

 

Chris

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...