What's new

Music replacement for OoT - Could it work this way?

mode7

New member
I've been thinking a lot about how cool it would be to replace the music tracks in Ocarina of Time with the great recreations from the Zelda Reorchestrated Project.

I'm not a coder and I have only limited knowledge about how N64 emulation works, so let me know if this is nonsense.

I know music replacement has been discussed before and declared theoretically possible at least on a game to game basis.
As I rememeber right the problem is that the N64 has no SPU so all sound is processed by the software (in the rom) through the CPU. So the sound plugin is just playing back a sound stream generated by the rom. Am I right up to this point?

Now there are these hackers, frauber and messiaen. Which have reverse engineered the sequenced music used in many N64 games like Mario 64, Mario Kart, Wave Race and Zelda.
There are tools to parse files from the rom and reinsert them as well as a doc explaining the format on their homepage.

Still replacing is of course only possible in the sequenced format.

But I think this could be a key to load hires music into the games to.
When a sequenced file is played back, it is loaded into the N64s RAM right?
A plugin could go there and check which song is played currently and get some other parameters by analysing the reverse engineered format right?
Then the parameters got be changed to mute the ingame song (or just dont play it)
The parsed song information could be used to load a song file from the HD which is played back by a player which is then mixed with the output from the sound plugin.

Would this, theoretically, be possible?
 

radorn

New member
Theoretically, it is completelly possible. there only needs to be someone to code it.
The most elegant way would be with an emu that had a good realtime debugger that accepted external scripts, then it would be a matter of having some hacker discern the music play control commands, and trigger some music playing routine outside.
As for muting the original game's music, it could be achieved by GS/AR codes, direct rom hacking, or the debugger if it would be that interactive.
 

ReplayTy

Super Mario RPG master
I concur, it is possible, but the level of difficulty is very high, and mainly impossible for the new members, but you might not have to worry.
 

messiaen

New member
I don't like these replacement hacks, but anyway you should check this Mario kart 64 hack by HyperHacker:


It uses a custom Mupen build to launch an external application that plays the background music.
 

ReplayTy

Super Mario RPG master
I would like to see if the Utility of Time ever gets completed, I really want to have thousands of things to create and for Link to go against...
Anyway, there are music hack devices for SNES games like SMW at smwcentral.net.
 

wolpelido

New member
Really cool idea. Just the thought of being able to play OoT with the incredible music from that site (without needing to exit the game and start it manually) makes me drool.
 

Azimer

Emulator Developer
Moderator
I looked into it way back when, but I wasn't sure how to do it without hooking the audio code functions running on the main CPU. Unlike graphics, the majority of the audio processing is done on the main CPU and the CPU intensive parts are pushed to the RSP in stream. I am not very good at rom hacking so I didn't look much further. Good luck :)
 

kyopaul

New member
Different game use different way to create music on N64. you can use lower n_audio libary or higher nusys libary, so the music data is undesirable unless you
crack the game code to do this.
So I think this work is game-depend, and if you have n_audio libary source and nusys source , the work may become easier.
 

jdsony

New member
It's a good idea in theory but the problem implementing it is a lot of N64 games have audio tracks change on the fly and mix together as you move around or the situation changes. This happens much more in the games by RARE but happens in Zelda too. I'd like to hear better quality audio but I think I'd rather retain the advantage of the midi-style tracks.

Another probably easier possibility from a coding point of view would be replacing the samples but that could involve a lot of trial & error trying to get the samples to match and loop as the originals did. I've messed around a bit with N64 samples & they are often quite short and make a lot of use of loop points to make instruments sound much longer.
 

Top