Updates:

Fans are welcome!

Moving one NES soundtrack into another NES game.

Started by optomon, May 24, 2010, 03:19:15 AM

Previous topic - Next topic

optomon

This isn't a Guardian Legend hack, but I figured that it's appropriate since I recall it was discussed at one point whether or not another game's soundtrack could be put into Guardian Legend. It is very possible to do this in theory, but not easy. I pretty much accomplished it here, but because of the differing ram values used by the engine compared to the original one, the game is not fully operational in it's present condition. If one is going to move the soundtrack of one game into another, you had most likely have to make a LOT of changes. I did this because I'm trying to make a Konami based framework to homebrew my own NES games.

CV2_CrisisForce.nes

This is the Crisis Force soundtrack in Simon's Quest. Use the B button on the title screen to toggle through songs before pushing start, and when you do press start a song will play on the following screen. You cannot actually play the game unfortunately, as the newly imported sound engine overwrites certain vital ram from the original game that I didn't bother to move around. The tough part was figuring out how to move the DPCM data, but I managed to crack its format, which seems pretty much universal across all NES games as far as I can tell.

arseniy

hm. why to insert sound engine? Can a music play on the original engine? like a Crisis Force on the Simin's Quest engine?

optomon

The way music is written inside the Crisis Force rom is different than that of Simon's Quest. There is no universal nsf format between games. If the format was similar enough, however, as they sometimes are from game to game, you could copy and paste a lot of the music data from one game into the other; you can port music from one Castlevania game to another for the most part, but there is always something different.

Kelesis

If you've ever played Romancia: Dragon Slayer Jr. you'll notice the sounds and music sound just like TGL. Compile was hired to port this game to the nes.
I think they used the game engine from TGL. I've never tried it but I bet the music format is the same and can be pasted into a TGL rom.
http://www.mobygames.com/game/romancia-dragon-slayer-jr

arseniy

First time hear bout it but I mostly aknowledged in NES games(shame on me) and not much about DOS.
That seems like have relation with Drasle Family Dragon Slayer on NES. Could not beat it without walkthrough BTW.

tummai

Quote from: optomon on May 24, 2010, 03:19:15 AM
This isn't a Guardian Legend hack, but I figured that it's appropriate since I recall it was discussed at one point whether or not another game's soundtrack could be put into Guardian Legend. It is very possible to do this in theory, but not easy. I pretty much accomplished it here, but because of the differing ram values used by the engine compared to the original one, the game is not fully operational in it's present condition. If one is going to move the soundtrack of one game into another, you had most likely have to make a LOT of changes. I did this because I'm trying to make a Konami based framework to homebrew my own NES games.

You cannot actually play the game unfortunately, as the newly imported sound engine overwrites certain vital ram from the original game that I didn't bother to move around. The tough part was figuring out how to move the DPCM data, but I managed to crack its format, which seems pretty much universal across all NES games as far as I can tell.

This is a tricky problem.  You could fix the RAM conflicts by finding which page of RAM each game uses for the sound engine and changing the $x00 accordingly for every read/write to RAM within the sound engine code.  This assumes that both games reserve an entire page for sound engine RAM, which may not be the case.  It's easy to find the sound RAM - just open the hex editor in FCEUX and see which values change in time to the music. 

The next step would be to find all JSR/JMPs to old sound engine subroutines and remap them to the new sound engine subroutines.  Once you do that it might work out.  Another thing to look out for would be any flag the sound engines set to communicate to the NMI when they are busy.  You'd have to find song lookup tables and remap them too.

Moving DPCM music into a game with no DPCM (like TGL) could cause a huge headache too, since IIRC the samples must be stored starting at $C000.  In non-DPCM games, $C000 would likely have program code.

Another approach would be to figure out the sound format for the target game and rewrite/port the songs you want into that game's sound format.  No less tedious but it'll be easier to test/debug.
My NesDev blog: http://tummaigames.com/blog

optomon

I have actually been able to accomplish this feat multiple times. I was able to port Contra's sound engine into 8 Eyes and various other Konami engines into Simon's Quest.

I have two game projects involving Simon's Quest as a template, one of which uses another sound engine from a different game, Snake's Revenge. Hopefully, when the game is further developed, I can show something of it.

AlastorSX

I would love to see Simon's Quest music along with TGL. Mostly bloody tears in say the organic area. That would be sweet! I compose castlevania music on little big planet, and Simon's quest is the main one I do.
"Nothing Is True... Everything Is Permitted..."