Jump to content


Finding Sound with Hackomatic

3 replies to this topic

#1 Atari Charles OFFLINE  

Atari Charles

    River Patroller

  • 2,252 posts
  • Location:Edmonton, Canada

Posted Fri Oct 14, 2005 5:20 AM

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.


Edited by Atari Charles, Fri Oct 14, 2005 5:21 AM.

#2 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 28,982 posts
  • Controlled Randomness
    Replay Value
  • Location:North Carolina (USA)

Posted Fri Oct 14, 2005 5:26 AM

On a semi-related subject, have you tried Bit Hacker?


It's the newest hacking software. Now all you need is help on hacking sounds and you'll be all set.

#3 Atari Charles OFFLINE  

Atari Charles

    River Patroller

  • Topic Starter
  • 2,252 posts
  • Location:Edmonton, Canada

Posted Fri Oct 14, 2005 12:24 PM

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.

#4 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,924 posts
  • Location:The land of Gorch

Posted Fri Oct 14, 2005 1:54 PM

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.

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

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:
   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.
   TYA;give Y's value (zero) to A
   TAX;...and X
   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.

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users