Jump to content
IGNORED

How do you extract sound effect data from classic games?


Recommended Posts

I'm a batari Basic user, but that really doesn't matter that much for this question. When I can't create a sound I need on my own, it would be nice to extract sound effect data that almost meets my requirements from a classic game and play with it until it sounds the way I want. Some sound effects can be recreated by ear, but other sound effects are hard for me to figure out.

 

So is it possible to extract sound effect data from classic games? If so, how? (I know very little about assembly language.)

  • Like 1
Link to comment
Share on other sites

Pretty much the only way is via disassembly and/or tracing to see how the values for sound registers are gathered (when a source code does not exist). Sometimes this is very easy (if values are gathered from lookup tables), sometimes more difficult (if values are generated by using a formula)...or very difficult (if said formula utilizes specific bitpatterns in certian memory locations).

 

That is if you want the sounds to be 100% true to the original. Of course, you could always play it by ear.

  • Like 1
Link to comment
Share on other sites

Thanks for the replies. I created this thread, then took a shower and a faint memory surfaced while I was in there that I could use Stella's debug mode. I can do something in a game to start the sound I want, bring up debug mode, then step through frame by fame and write down the numbers. Did I mention that I'm not too bright? :D

Link to comment
Share on other sites

I was posting this, and I see now in the preview window that you figured it out... oh well. Since it's already written I figured I'd still post it for others.

 

For most sounds the method I post will be good enough, though if the game changes the sound registers faster than each frame then your copy of the sound won't be accurate.

 

  • Open up the rom in stella. Get close to the point where the sound will trigger and enter the debugger by pressing the ~ key. Choose the AUDIO tab and hit the FRAME +1 button until you see the volume registers change.
     
    post-23476-0-68997200-1301509388_thumb.png
     
     
  • record the sound registers and press the FRAME+1 button. Repeat until the volume registers are zero again or the sound is otherwise done.
     
  • put all of your data into your game as data statements for bB or BYTE data for asm. (See the bB example program.) In my sample I used the dragon roar in Adventure, which only changes the audio registers every 3 frames.

 

rippedsound.bas

rippedsound.bas.bin

  • Like 1
Link to comment
Share on other sites

Also, the upper 3 bits of frequency (AUDFx) and upper 4 bits of volume (AUDVx) and distortion (AUDCx) make no difference to the hardware...so those can be shared with other data. PF0 data is a good candidate, since it ignores the lower nybble. Once you know the values, you can either reuse the formula that the original game uses...or just make frame-by-frame lookup tables.

Link to comment
Share on other sites

I was posting this, and I see now in the preview window that you figured it out... oh well. Since it's already written I figured I'd still post it for others.

Like you said, it's good to have it posted for others. And if I forget how to do it in the future, I can look back at this thread and refresh my memory.

 

While you were in the middle of creating your post, I wrote down the numbers for a classic game sound effect, put it in the VbB Music and Sound Editor and it sounds exactly like it does in the game!

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