grafixbmp, on Fri May 15, 2009 11:44 PM, said:
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, Sat May 16, 2009 12:55 AM.