+Random Terrain Posted March 30, 2011 Share Posted March 30, 2011 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.) 1 Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted March 30, 2011 Share Posted March 30, 2011 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. 1 Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted March 30, 2011 Share Posted March 30, 2011 I should mention that if a source code does exist and the platforms are similar, it's almost no effort at all. The music tables for Ms.Hack were imported straight from Atari's 7800 version of Ms.Pac-Man. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted March 30, 2011 Author Share Posted March 30, 2011 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? Quote Link to comment Share on other sites More sharing options...
RevEng Posted March 30, 2011 Share Posted March 30, 2011 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. 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 1 Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted March 30, 2011 Share Posted March 30, 2011 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. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted March 30, 2011 Author Share Posted March 30, 2011 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.