Replacing DPCM samples in a NES ROM

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

calima
Posts: 1745
Joined: Tue Oct 06, 2015 10:16 am

Re: Replacing DPCM samples in a NES ROM

Post by calima »

Which seems to happen on every hoster eventually. Tinypic did that a couple years ago, and imgur about a year ago IIRC.
spookgoblin
Posts: 25
Joined: Thu Jul 20, 2017 9:01 am

Re: Replacing DPCM samples in a NES ROM

Post by spookgoblin »

Okay, so I think I've narrowed everything down, but I need some time and confirmation to be sure!

Essentially, now that I have found the address in the ROM file of the sample that needs to be replaced, I now have to use an external hex editor to open up my new sample and manually copy in all the byte data to overwrite the old sample, right?
I'm double-checking because, according to SoundDisplay, I've got 177 bytes to manually plug in (I'm starting to see why a script would be nice!)
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: Replacing DPCM samples in a NES ROM

Post by thefox »

spookgoblin wrote:Okay, so I think I've narrowed everything down, but I need some time and confirmation to be sure!

Essentially, now that I have found the address in the ROM file of the sample that needs to be replaced, I now have to use an external hex editor to open up my new sample and manually copy in all the byte data to overwrite the old sample, right?
I'm double-checking because, according to SoundDisplay, I've got 177 bytes to manually plug in (I'm starting to see why a script would be nice!)
No need for manual work, use Copy & Paste. If you're using Windows, try HxD. It's a very nice (and free) hex editor. The menu option you're looking for is Edit -> Paste write (use this instead of Paste insert to avoid changing the ROM size).
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
spookgoblin
Posts: 25
Joined: Thu Jul 20, 2017 9:01 am

Re: Replacing DPCM samples in a NES ROM

Post by spookgoblin »

Ahahaha!

You have all successfully guided me through this hurdle. The sample is ringing out loud and clear in my ROM and it has brought a massive smile to my face.
Thanks for your help, everyone. I can't thank you enough!

As a fun side note: the sound I ended up using was a tiny snippet of my fiance's laugh that I recorded while she wasn't paying attention :)
It will be extra fun to be able to tell her that the sound effect is her own voice!
User avatar
Bregalad
Posts: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: Replacing DPCM samples in a NES ROM

Post by Bregalad »

Honnestly if your goal it to have this noise sound more female, it should be simple to simply have the same sample playing at a faster speed. I'm fairly confident that's what CV3 does when playing with Sypha Benlades as a playable character. So basically only the value written to $4010 have to change.
spookgoblin
Posts: 25
Joined: Thu Jul 20, 2017 9:01 am

Re: Replacing DPCM samples in a NES ROM

Post by spookgoblin »

Honnestly if your goal it to have this noise sound more female, it should be simple to simply have the same sample playing at a faster speed. I'm fairly confident that's what CV3 does when playing with Sypha Benlades as a playable character. So basically only the value written to $4010 have to change.
Thanks for the suggestion!
Fortunately, I've already got my sound plugged in (even if it took a few extra steps) and I'm really, really happy with the results. Even if the difference is minuscule, I think it will be way cooler to be able to say that it's her own voice :)

That's a really neat trick, though. I'll have to keep it in mind for future SFX!
Post Reply