+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Muting Music?
Pages: [1]
Author Topic: Muting Music?  (Read 566 times)
fargo
Guest
« on: January 18, 2007, 04:42:39 pm »

Hi,

I'd like to know if it is possible to hack SNES/NES/GENS ROMs in order to mute music and keep sound. If that is impossible or difficult, then can it be achieved through modifying emus?

Thank you.

Smiley
Disch
Guest
« Reply #1 on: January 18, 2007, 04:52:14 pm »

Quote from: fargo on January 18, 2007, 04:42:39 pm
I'd like to know if it is possible to hack SNES/NES/GENS ROMs in order to mute music and keep sound.

Quite a strange request....

There generally isn't a switch you can flick -- it would be a fair amount of work.  I would imagine the easiest way to go about this would be to do a run of the mill music hack, but instead of replacing the song with a new one, replace it with a bunch of rests (silence).

How hard a music hack is depends on the game.  A few games have their music format discovered already so killing their music shouldn't be too hard.  If you have to find the music yourself, though, it might take a bit of legwork.

Quote
If that is impossible or difficult, then can it be achieved through modifying emus?

Modifying the emu would be even harder.  Emus don't know whether they're playing music, sound, or god-awful, earpiercing noise.  They simply play the tones the ROM is telling them to.
JCE3000GT
Guest
« Reply #2 on: January 18, 2007, 05:48:56 pm »

For NES and SNES it might not be so hard *IF* you know some ASM for each system.  You could just simply write a blank NSF for NES games and replace the exsisting one.  For SFC/SNES it is probably easier, locate the SPC song pointer bank and find the silence SPC index/offset and replace all of the song pointers to the silence SPC and your set.  Unless you are fairly fluent in ASM don't even bother until you learn it. 
Suzaku
Guest
« Reply #3 on: January 18, 2007, 05:49:41 pm »

Does music usually have its own sound channel that could be turned off/disabled? Or do NES/SNES/etc games not work that way?
Disch
Guest
« Reply #4 on: January 18, 2007, 06:12:16 pm »

Quote from: JCE3000GT on January 18, 2007, 05:48:56 pm
For NES and SNES it might not be so hard *IF* you know some ASM for each system.  You could just simply write a blank NSF for NES games and replace the exsisting one.

That may only work sometimes.  A lot of games use the music engine for sound effects (the sound effects can often be found in the NSFs, even).  Replacing the in-game music driver with a blank NSF will more than likely just mute all the sound completely.

Quote
Does music usually have its own sound channel that could be turned off/disabled? Or do NES/SNES/etc games not work that way?

Some very very old NES games dedicate individual sound channels to soundeffects.  But they can do this because they pretty much lack any sort of respectable BGM.  See Ice Climber:  the "music" is a simple "do do do do   dooooo" played by the Triangle (only 1 sound channel), leaving both squares and the noise available for sound effect use.

Most games make use of all 4 of the NES's primary sound channels (there are actually 5, but the 5th requires a lot of PRG space, so many games don't use it at all) for BGM and have to "borrow" those channels for sound effects, muting that channel in the music just as long as the sound effect is playing -- then resuming the channel in the BGM.

SNES has more channels (8, I believe), but I believe the concept is the same.  Games might have reserved maybe 1... or maybe even 2 channels for sound effects -- however I find it much more likely that they used all 8 in the music and did the same "sharing" thing that NES era games did.

Ditto for Genesis -- although I don't know how many channels the Genesis had (8 melodic + 3 rhythmic?  something like that?)
Nightcrawler
Guest
« Reply #5 on: January 18, 2007, 07:45:27 pm »

Quite a few SNES games actually use one or two channels for the sound effects. Sometimes these channels are shared with the music, but sometimes they are isolated. For those games, you can easily achieve what you want by turning the music sound channels off and leaving the sound effects channels on.

Beyond that, in the case of the SNES, you're going to have to hack the SPC700 program in the ROM. That's probably the best way. That program WILL distinguish between music and sound effects. You could disable the part that plays music and only allow sound effects to play. That seems like the best approach.

However, you're going to have to learn a heck of alot to do it. You're going to have to find out where the SPC700 program is loaded in the ROM. Then you'll have to disassemble it and try to figure out what it's doing. You'll have to find what needs to be modified to disable music and allow sound effects. Then you're going to have reassemble the modified code and then adjust the loading routine to account for additional bytes or any change in size of the SPC700 program. In fact, there probably will not be room for a larger program. You'll have to change it to load from another free space in the ROM.

It's alot of work.
JCE3000GT
Guest
« Reply #6 on: January 19, 2007, 02:48:55 pm »

Quote from: Disch on January 18, 2007, 06:12:16 pm
Quote from: JCE3000GT on January 18, 2007, 05:48:56 pm
For NES and SNES it might not be so hard *IF* you know some ASM for each system.  You could just simply write a blank NSF for NES games and replace the exsisting one.

That may only work sometimes.  A lot of games use the music engine for sound effects (the sound effects can often be found in the NSFs, even).  Replacing the in-game music driver with a blank NSF will more than likely just mute all the sound completely.

Quote
Does music usually have its own sound channel that could be turned off/disabled? Or do NES/SNES/etc games not work that way?

Some very very old NES games dedicate individual sound channels to soundeffects.  But they can do this because they pretty much lack any sort of respectable BGM.  See Ice Climber:  the "music" is a simple "do do do do   dooooo" played by the Triangle (only 1 sound channel), leaving both squares and the noise available for sound effect use.

Most games make use of all 4 of the NES's primary sound channels (there are actually 5, but the 5th requires a lot of PRG space, so many games don't use it at all) for BGM and have to "borrow" those channels for sound effects, muting that channel in the music just as long as the sound effect is playing -- then resuming the channel in the BGM.

SNES has more channels (8, I believe), but I believe the concept is the same.  Games might have reserved maybe 1... or maybe even 2 channels for sound effects -- however I find it much more likely that they used all 8 in the music and did the same "sharing" thing that NES era games did.

Ditto for Genesis -- although I don't know how many channels the Genesis had (8 melodic + 3 rhythmic?  something like that?)

I didn't know much how the NES works, but I do understand a bit about SNES and I can tell you that I've already learned enough to have the music in several games (over Cool play silence.  Because every SNES/SFC game that I've looked at has a dedicated "silence" song track.  Just repoint all of the spc songs to that byte (usually 00) and you're done. 

Quote from: Nightcrawler on January 18, 2007, 07:45:27 pm
Quite a few SNES games actually use one or two channels for the sound effects. Sometimes these channels are shared with the music, but sometimes they are isolated. For those games, you can easily achieve what you want by turning the music sound channels off and leaving the sound effects channels on.

This is true, take Romancing SaGa 3 for instance, and the "Magical Tank Battle" 2 of the channels are dedicated for playing the machine noise--nute those two channels or reduce its volume to 0 and you'll get the song without that annoying noise.  Take the wind from Final Fantasy 6, in a couple of songs its also dedicated on 2 channels. 

If he's wanting to record the sound effects for some reason he could just find the spc song pointers and repoint them to the silence track--however if the game he's wanting to do that do doesn't have a silence track then he's going to need to disassemble the spc core.  Either way, its not easy for someone who doesn't know ASM.  The first thing I'd do is see if there is a GG or PAR code fo the game in question to silence the music. 
Jedi QuestMaster
Guest
« Reply #7 on: January 19, 2007, 07:54:48 pm »

Are you talking about muting a track or all the music in the game entirely?  It can be done. Or how about a channel? I think I found where to adjust the volume in Double Dragon 3. Tongue
fargo
Guest
« Reply #8 on: January 20, 2007, 12:17:55 am »

Thank you all for the info Smiley

Quote from: JCE3000GT on January 19, 2007, 02:48:55 pm
I didn't know much how the NES works, but I do understand a bit about SNES and I can tell you that I've already learned enough to have the music in several games (over Cool play silence.  Because every SNES/SFC game that I've looked at has a dedicated "silence" song track.  Just repoint all of the spc songs to that byte (usually 00) and you're done.
This is really great Cheesy Could you please write a small tutorial on how to do this for at least one game?
Jedi QuestMaster
Guest
« Reply #9 on: January 21, 2007, 06:11:14 pm »

I've found some NES games with silence tracks that are just that & others that seem to be used to stop the music currently playing - or something like that.
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC