Jump to content
IGNORED

How exactly does the Pitfall 2 DPC work?


Recommended Posts

I recently acquired a Pitfall 2 cartridge, and having remembered that it uses a proprietary chip for the sound, I became curious as to how exactly it works.

 

From looking through the Stella archives, I gather that it generates sound waveforms by changing the sound register volume every scanline. I guess I'm wondering how exactly that's done though. Is the chip, like, intercepting dummy instructions on the fly and replacing them with real instructions to load/store the next value in the sound register?

Link to comment
Share on other sites

I've rather been curious as to the features the pitfall 2 chip had as well. I knew about it's sound features but not how they worked. And someone told me that it also had a truer RND but it was only used for the eel flicker. Other than this, I have no clue. Has there ever been a comprehensive breakdown of the chip? If so, is there a link?

Link to comment
Share on other sites

I've rather been curious as to the features the pitfall 2 chip had as well. I knew about it's sound features but not how they worked. And someone told me that it also had a truer RND but it was only used for the eel flicker. Other than this, I have no clue. Has there ever been a comprehensive breakdown of the chip? If so, is there a link?
You can search for the patent on the chip (#4644495) which I think gives a high-level description of the various functions. I didn't find the patent quite as useful as emulator source code when trying to figure out how the DPC worked so I could simulate it in hardware (the Harmony cart is the only cart that can simulate the DPC chip, or at least the only one that has.)

 

The DPC has some features that are not used by Pitfall II. I'm not certain what all of those are. My own breakdown of the various functions is as follows, at least as used in Pitfall II:

 

Read registers:

$1000-$1004: Random number generator. Reads return an 8-bit random number.

$1005-$1007: Music fetcher. Reads return the current amplitude of the multiple-voice music waveform that will be written into the 2600's sound volume register. Typically this will be read at least once every scanline.

$1008-$100F: Display data reads. Reads from one of 8 data streams containing graphics, and increments the graphics pointer.

$1010-$1017: Display data reads ANDed with flag. Reads from one of 8 data streams containing graphics, ANDs the data with a flag, and increments the graphics pointer. Flag is $FF if the low byte of the graphics pointer is between "top" and "bottom" register (see below) or $00 otherwise (this isn't the whole truth - if the low byte of the pointer is stored to a value between "top" and "bottom" then the flag will be $00.)

$1018-$101F: Same as $1010-$1017, but nybbles are swapped. Not used by Pitfall II.

$1020-$101F: Same as $1010-$1017, but bits in the byte are reversed. Not used by Pitfall II.

$1018-$101F: Same as $1010-$1017, but byte is shifted one bit right. Not used by Pitfall II.

$1018-$101F: Same as $1010-$1017, but byte is shifted one bit left. Not used by Pitfall II.

$1038-$103F: Return the current value of the flag. Apparently not used by Pitfall II.

 

Write registers:

$1040-$1044: Write to "top" register.

$1045-$1047: Write music frequency of channel 1-3. Frequency is 20 kHz/value

$1048-$104F: Write to "bottom" register.

$1050-$1057: Write to low byte of graphics pointer (pointer is an address in a 2k graphics ROM)

$1058-$105C: Write to high byte of graphics pointer (appears to only store the lower 3 bits)

$105D-$105F: Control byte for music channel (on/off)

$1060-$106F: Apparently not used by Pitfall II, but may have another function.

$1070-$1077: Random number reset. Apparently not used by Pitfall II.

$1078-$107F: Apparently not used by Pitfall II, but may have another function.

 

There is also a "draw line" function that is not used by Pitfall II. It apparently calculates a value to store in HMOVE to help with drawing lines. I think it may have been originally designed for a vine but that never made it to the game.

Edited by batari
  • Like 1
Link to comment
Share on other sites

I'd be interested to see new games using this chip.

 

I don't think that's 100% possible. From what I remember, there's 2K of ROM data in there that's specific graphic information for Pitfall 2.

However, a derivative of the chip-- possible, but probably expensive.

 

-John

Link to comment
Share on other sites

I'd be interested to see new games using this chip.

 

I don't think that's 100% possible. From what I remember, there's 2K of ROM data in there that's specific graphic information for Pitfall 2.

However, a derivative of the chip-- possible, but probably expensive.

 

-John

You should learn about the standalone Harmony (do not confuse this with the Harmony developer's cart.)

 

The stanalone Harmony already supports the DPC chip, including its 8k game data and 2k graphics, and should eventually house single homebrews, so you could make new homebrews based on this chip, and it shouldn't be any more expensive.

Edited by batari
Link to comment
Share on other sites

  • 2 years later...

The background music sounds somewhat scratchy in Stella in both NTSC and PAL versions. You can clearly hear interruptions in the tune (not presented in the C-64 version for instance...). Is that a limitation of the actual DPC hardware or just a bad emulation?

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