Atari Charles Posted October 14, 2005 Share Posted October 14, 2005 (edited) I know, an almost impossible request but I have heard of people changing the sound and intro song on Atari 2600 games by changing the blocks of code in Hackomatic. So is there anything to look out for visually? Where is the sound usually located(beginning, middle or end) in the code? I am trying to change the intro song in Sea Hunt to something a little darker. Thanks! Edited October 14, 2005 by Atari Charles Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted October 14, 2005 Share Posted October 14, 2005 On a semi-related subject, have you tried Bit Hacker? http://www.atariage.com/forums/index.php?showtopic=64943 It's the newest hacking software. Now all you need is help on hacking sounds and you'll be all set. Quote Link to comment Share on other sites More sharing options...
Atari Charles Posted October 14, 2005 Author Share Posted October 14, 2005 The version I tried of bithacker(I use to use it before hackomatic) I uploaded recently wouldn't save the bin file as a bin file but as an unknown file and thus it would not open in any emulator or even in bithacker itself. I may try it again on Cyplix just to see what I can do. Still any help on editing the sounds would be greatly appreciated as I really have to finish this NTSC version of Cyplix within a couple days. Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted October 14, 2005 Share Posted October 14, 2005 Answer: You can't. In a program, writes to the audio registers (AUDxx) can be located anywhere. That's something that HOM was not designed to display. Solution: Use distella. Even a disassembly that isn't using a configuration file should pick them out (unless the area that they are at was called via an indirect jump...which is unlikely). Commandline: distella -pafs {game}.bin > {game}.asm Substitute {game} for the name of the file. Altering the code: Unless you have the program reverse-engineered enough so that routines can be moved about, the replacement code you make will need to occupy the same amount of space as the original code did (jumping to an unused area if the replacement code is too large or using NOP's to fill up space if the replacement is smaller). Search the disassembly for AUD to locate them. Creating sounds: Keep in mind that the 2600 requires games to be built around the display kernal (which NEEDS to execute every 60th of a second). So subsequently, any sounds that you want to make would also be happening only once every 60th of a second. You can't just make a full sound effect and then continue with the program, because the display would not be able to execute when it needs to. So programs keep track of the current sound effect being played by using a ram location (or locations). Something like this: soundroutine: LDY $A9;here is where the sound pointer is in this example BEQ end;branch if the pointer ran down (play no sound) DEY;otherwise, bump the pointer to the next (60th of a second) note STY;...and save the pointer again LDA SoundTable,y;get the note to be played this frame LDX #$05;give a volume level to X LDY #$0A;give a distortion value to Y BNE playsound;...and skip ahead to play it. end: TYA;give Y's value (zero) to A TAX;...and X playsound: STA AUDF0;save A to the frequency for the first voice STX AUDV0;...and the volume STY AUDC0;...and the distortion So in this example, sounds could easily be altered by locating the SoundTable data and changing the values. Stuff like that is just too complex for a graphic hacker to pick out. 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.