Replacing A Game's Soundtrack

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Replacing A Game's Soundtrack
by on (#24350)
This has been on my mind for quite a while now; where do I begin? Does it help if there's an NSF file for the game?
Re: Replacing A Game's Soundtrack
by on (#24351)
Jedi QuestMaster wrote:
This has been on my mind for quite a while now; where do I begin? Does it help if there's an NSF file for the game?


Yeah, an NSF would help you see what areas of RAM it uses. It could be difficult to put another sound engine in, just depends on the free memory. For some games, figuring out the format and changing the sound data might be a better option.

Either way, it's a an appreciable amount of hacking required.

One time when I was messing around I swapped the soundtracks of a couple of Megaman games. I think it was 2 and 3. It worked, but I didn't change the song # table so it played an odd selection of sounds.

Sometime I'd like to do a cover of the Peter Gunn theme with my Squeedo sound expansion (so it'll sound like the arcade version) and hack it into the NES ROM. That'd be cool.

by on (#24352)
Are the hex values the same for every game when it comes to note values and such? Or does that vary between each game? It seems someone figured out a standard for some of Capcom's games:

http://www.romhacking.net/docs/capmusfrm.txt

by on (#24353)
The music data formats vary from game engine to game engine, just as the map formats do. But in many games, it appears that increasing a value by 1 increases the pitch by one semitone.

by on (#24354)
This was already discussed somewhere in the Acmlm's, but with Mario64... :D

by on (#24366)
Alright, what about inserting a PCM sample in there? I take it it's bad if the game itself doesn't have any of its own? :?

by on (#24367)
I remember sucessfully changing data in Dragon Warrior soundtrack (the NSF file), and I don't remember much from it. I've also attempted DW2, but I got very bad results. The hard part is to find where the song data is actually stocked (tracing code) and then the rest is to try to change the values and see what happens.
Capcom's game definitely have a standard setting or something. Memblers hacked most of them to throw them together in a sinlge NES rom.

by on (#24438)
What's the best tracing program? I use FCEUXD.

by on (#24440)
Yes, FCEUXD is the best I know.
You may also want to use a disasembler to reverse engineer the basics of the sound code.

by on (#24451)
Ooh, how do I do that? :D

I know, wussy question.

by on (#24453)
Go to NESDev main page and search for a NES disassembler.