Jump to content
IGNORED

Technique for Pitfall style music/effects coding?


Recommended Posts

Hey folks, I'm almost completely new to coding at this point (at least for the past 30 years approximately!) but I decided to dip my toe into the 2600 scene with a Pitfall hack.  I wanted to add some music to the quasi-intro (before you move/while the copyright is scrolling) but haven't cracked the method they use in that game.  I'm using Thomas Jentzsch's disassembly as the basis for the hack.

 

http://www.qotile.net/minidig/disassembly/pitfall.asm

 

 I've picked out the eight notes that I'd like to use (and hopefully repeat) and using online guides like random terrain, various text guides, and the atari riff machine I've gotten the code for the volume, control, frequency, and duration.

 

Spoiler

e6 b6 c6 a6 b6 g6 a6 g6 on AUD4 pure (or alternately AUD12 pure lower)

 

Volume Control Frequency
Duration

 

   8,4,11      
   8
   8,4,7    
   8
   8,4,14 
   8
   8,4,8   
   8
   8,4,7  
   8
   8,4,9   
   8
   8,4,8   
   8
   8,4,9   
   8

 

 

I've used the conversion from this youtube video (the only one I've found that mentioned it specifically...starts at 14:30) to translate the data into the single number hexadecimal format the game uses for the sound table (example for the Pitfall vine tarzan yell) but it doesn't work at all.  Obviously, it's only using the volume and control and not the frequency but I've tried alternate combinations into the hexadecimal code with no luck.  I'm not a knowledgeable programmer in general (and obviously not specifically in 6502/assembly) so I'm not sure where to go from here.  Most of the rest of the guides I've found deal specifically with bB sound which apparently don't apply in this case as Pitfall is doing its own thing with sound.  Any ideas?  Thanks in advance.

 

Spoiler

 

 

Edited by LatchKeyKid
Link to comment
Share on other sites

Thanks and I'll take a look.  I saw that Pitfall 2 had greatly improved sound due to the special chip the post mentioned compared with the original that I'm trying to hack.  Maybe they used a similar, earlier version of the algorithm (without the hardware) for the original?

 

Also, I forgot to include the example of the sound table from the original as the example.

 

Spoiler
SoundTab:;  YYYYYY sound table
    .byte $13, $13, $13, $13, $13, $13, $13, $09, $0b, $0b, $0b, $0b, $0b, $0b, $0b, $0b  ;16   Tarzan
    .byte   $0b, $0b, $0b, $0b, $09, $0b, $09, $0b, $0b, $0b, $0b, $0b, $0b, $0b, $8b, $06  ;16(32)  Tarzan
    .byte   $04, $03, $02, $84  ;4(36)  Jump  
    .byte $13, $13, $0e, $0b, $09, $09, $09, $0b, $09, $09, $09, $89 ;12(48)   Treasure
    .byte $1d, $1d, $1d, $1d, $1d, $1d, $1d, $1d, $1d, $1a, $1a, $19, $19, $19, $19, $19   ;16(64)  Killed
    .byte   $19, $1d, $1d, $1d, $1d, $1d, $14, $15, $14, $15, $14, $15, $14, $15, $14, $15  ;16(80)
    .byte   $14, $95  ;2(82)  
    .byte $18, $19, $1a, $1b, $1c, $1d, $1e, $9f  ;8(90)  Falling hole

 

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