Romhacking => ROM Hacking Discussion => Topic started by: SpykSaturn on December 31, 2014, 12:18:17 am

Title: humble musicians request
Post by: SpykSaturn on December 31, 2014, 12:18:17 am
 I have looked good and hard and have not been able to come up with any answers. Here is the dilemma:                   i am a musician who likes to do video game covers. I want to do videos where there is game play full with sound effects but my music playing with it. Now some games i can just turn the music off in the game and add my own with the video editor, but some games that would mean sacrificing the sound effects as well. This makes the organic feel i am going for off set a bit plus i think it would be cool for a possible fan base to be able to download and play as such. So my questions would be:

1: can you put music files on roms that are not midi (like a .wav or .mp3 or a similar sound format)?
2: can this be done with an .iso file?
3: if no to one, and yes to two, can i convert one to two and replace the music file from there?
4: how would i go about replacing these files so all the cues still sync up?
5: is this hopeless?

Anyone who checks this out, i really appreciate it. This has been a dream of mine sense the snes came out. This would be amazing if it's possible! Thanks again!!
Title: Re: humble musicians request
Post by: jonwvsu on December 31, 2014, 02:11:57 am
I think the easiest thing for you to do, would be to turn the game sound off completely, and add in prerecorded sound effects with you video editor.

Also, for most legacy systems, the games don't just access a MIDI. They usually have their own sound engines. Its pretty complicated, but generally the music has to be written for each particular game. Maybe you can alter the ROM so it doesn't load a song, or maybe you can replace the song information with silence.

Some Playstation games had CD audio tracks that would play in a standard CD player. You could conceivably replace those tracks with you own. Vigilante 8, for example, allowed you to pause the game, remove the game disc,  replace it with an audio CD, and listen to your music while you played.

An .iso file is simply a disc image. Think of it like a .zip, all the game information is stored within one file. You can even mount .iso files to virtual drives on you PC to allow you to play games that require their CD to be played without them.

I'm sure people will chime in with specifics, but I don't think you're going to be able to drag-and-drop songs into games. Your best shot is to isolate the music from the sound effects. Good luck.
Title: Re: humble musicians request
Post by: SpykSaturn on December 31, 2014, 02:32:59 am
That's actually super helpful. The bit with isolating the music and taking it out.

How would i go about this? Do they have roms floating out there with this already done?

Thanks a million!

December 31, 2014, 11:18:19 am - (Auto Merged - Double Posts are not allowed before 7 days.)
So I did a little research and have watched some youtube videos. The only theory I have developed (and please correct me if I am wrong as I am beyond newb status) is to delete the code related to the music in the game with a hex editor and it should get rid of the music on the rom.

Now I know this is probably easier said than done in trying to find the code that relates to the music, but I did some more research and found the games code mapped out online. The game I am talking about in particular is Megaman X, but I am also looking for Pokemon TCG seeing as how that is my first real music project going on.

Is this right, or is this much more complicated than how it looks on the surface?
Title: Re: humble musicians request
Post by: Kunio on January 01, 2015, 04:20:13 am
I don't have enough info about music stuff but maybe some music tutorials help you :
NSF ripper Guide Intro (
NES Programming (

Title: Re: humble musicians request
Post by: SpykSaturn on January 02, 2015, 02:20:29 am
Interesting reads for sure. Thank you.

I have developed a theory that i would like to test or proven right or wrong. This is just deduction from a newb trying to accomplish one specific task:-P So sorry if this sounds dumb, but try and humor me a little:-P .

1. You can't delete code because it shortens things and that makes the game glitch out.
2. At least in snes (and I'm hoping gameboy games) there is a group of digits in the hex editor assigned to silence when you get to the music area of things. Ex. Ff6 is 00 which is translated as silence.

So if i knew where the music was stored could I just rewrite them all as silence in the hex editor and it just loop endless silence in the game for that track?

If this sounds logical, are there any tips for finding specific bits of code? Is the music for gba games generally stored in the same area? If so, where can I get this info or does anyone have it? I have it for mega man x so i guess i could test it out for that game, but i would still be back at square one for pokemon tcg.

I'm willing to put the work in to decoding the music, i just need help locating it.
Title: Re: humble musicians request
Post by: henke37 on January 02, 2015, 04:32:14 am
GBA games did have some BIOS support. Most games used the Nintendo provided sound engine.
Title: Re: humble musicians request
Post by: SpykSaturn on January 02, 2015, 08:50:05 am
Good to know. I know with the NES games each one had a different engine almost. Do you know what this would look like in a hex editor or do you know where i could find such information? Thank you for the heads up!
Title: Re: humble musicians request
Post by: FAST6191 on January 02, 2015, 09:14:06 am
If you are not limiting yourself to the old consoles then yeah the GBA and DS each have a fairly extensive sound format that is shared by the vast majority of games on the respective systems.

The GBA sound format is commonly known as Sappy, some people know it by other names but if you wander into anywhere versed in GBA hacking and say I want to know about sappy then people will at least know what you are talking about.
Folks working in fire emblem, advance wars, some golden sun stuff (though they took things in a fairly different direction) and pokemon have some worked examples, however some of them have some very odd ideas about things at times (it was about the time I was watching someone explain fixing pointers using a tile editor that I wondered what had led me to that point). is good and has a bit as well.

I did have a bit in my GBA and DS hacking docs (linked for DS in a second) but I find sappy music hacking terribly boring so what is there is pretty minimal. On the other hand it should have links for the various downloads and tools used.
Some of the better hacks are probably the golden sun voice acting experiment and the Final Fantasy audio restorations for the GBA versions of 4, 5 and 6. The author is a regular around here as well so there is that.

With a bit of effort you can turn a midi or some other tracker format into something the engine will recognise and have it play in a game.

The DS sound format is called SDAT. Percentage wise it is probably even more popular than sappy is on the GBA. is my hacking docs for the GBA and DS, it covers quite a bit of stuff you can do with SDAT. and if you want some more low level stuff.

What you can do varies with the game or the level of hacking you want to go in for (there is a streaming audio format known as STRM that the compiler leaves out if the game does not use it, the DS does feature hardware decoding for (AD)PCM though so you can hack in something to pipe it to that instead). On the other hand if you are more concerned with tracker/sequenced audio then you can quite easily convert and insert midi into it and basically every game with SDAT will use SSEQ streaming, you may have to change the instrument bank but that is nothing too drastic either.
SDAT is then threefold
STRM streaming audio, not terribly commonly seen but very much part of it all.
SSEQ sequenced audio, flanked by SBNK sound banks
SWAR/SWAV. Technically this is wave but the sizes available are such that it is more samples and SFX type things, very occasional a short monologue (Castlevania portrait or ruin).

They various get packed together, have a header file that determines a lot and a bit more besides but if you are at all used to computer audio it should not pose much of a problem.

Equally when games do not use the above formats on the two systems it is usually a common format in general audio (everything from wave to tracker formats like XM), something very closely related to those (headerless wave files/raw PCM in some cases on the DS) or something common in game dev and likely well known/documented (cri middleware's ADX format is seen sometimes on the DS). I cover some of the alternatives seen on the DS in my docs and there might be more in