Replace music .spc with .mp3 music (load mp3 files)
Moderator: ZSNES Mods
-
- New Member
- Posts: 5
- Joined: Fri Jan 15, 2010 11:54 am
- Location: germany
Replace music .spc with .mp3 music (load mp3 files)
Would it be possible to use own mp3 music to replace a games music which is spc files? For example to have a game Game.snes which consists of:
gamecomponent1.xy
.
.
.
gamecomponentX.xy
music1.spc
music2.spc
.
.
musicX.spc
soundeffect1.spc
.
.
.
soundeffectX.spc
It would be great to have a folder with music in mp3.
Then zsnes checks if there is an replacement for spc file and
plays the mp3 track instead.
For example in Actraiser, to use the Orchestrated Versions instead
of the original .spc. The game and soundeffects itself should be the
same as before... Something like load high resolution textures in other
emulators (N64), sound-wise.....
Would be absolutely great....
Possible?
gamecomponent1.xy
.
.
.
gamecomponentX.xy
music1.spc
music2.spc
.
.
musicX.spc
soundeffect1.spc
.
.
.
soundeffectX.spc
It would be great to have a folder with music in mp3.
Then zsnes checks if there is an replacement for spc file and
plays the mp3 track instead.
For example in Actraiser, to use the Orchestrated Versions instead
of the original .spc. The game and soundeffects itself should be the
same as before... Something like load high resolution textures in other
emulators (N64), sound-wise.....
Would be absolutely great....
Possible?
-
- New Member
- Posts: 5
- Joined: Fri Jan 15, 2010 11:54 am
- Location: germany
Isn't the information enough which .spc file is for what level and then just throw the mp3 files with the same name in a mp3 folder? Without touching/hacking the actual game file. The only additional information should be which .spc files are inside the .smc game file and for what level they are. ZSNES audio engine plays the file with the same name, if there is none uses the .spc file. Ok, someone has to find out the names of the .spc files and for what level they are inside the game.
-
- Seen it all
- Posts: 2302
- Joined: Mon Jan 03, 2005 5:04 pm
- Location: Germany
- Contact:
ZSNES has no idea about levels, it just plays the data.snesfanbongo wrote:Isn't the information enough which .spc file is for what level
For the 21fx extension see this link: http://board.byuu.org/viewforum.php?f=16
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
bsnes launcher with recent files list
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
Nothing has any idea about levels.creaothceann wrote:ZSNES has no idea about levels
Except maybe UOSNES.
Doesn't Work Like That (TM)snesfanbongo wrote:which .spc files are inside the .smc
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
-
- "Your thread will be crushed."
- Posts: 1236
- Joined: Wed Jul 28, 2004 1:49 am
- Location: Not in Winnipeg
- Contact:
-
- ZSNES Developer
- Posts: 6747
- Joined: Tue Dec 28, 2004 6:47 am
-
- Veteran
- Posts: 970
- Joined: Fri Jan 21, 2005 11:15 am
- Location: Montana, United States
Damn that brings back memories, a few friends and I would have marathons with that game. I had those distinct 4 songs stuck in my head forever. That and the announcer.badinsults wrote:I'll tell you, I think it would be pretty awesome to use the 21fx to put the actual music into Rock N Roll Racing.
I should have seen that coming.Deathlike2 wrote:I'm sure these additions will make Pit Fighter an even better game.![]()

-
- ZSNES Developer
- Posts: 6747
- Joined: Tue Dec 28, 2004 6:47 am
I don't even know why I borrowed the game from a friend in the first place.SquareHead wrote:I should have seen that coming.Deathlike2 wrote:I'm sure these additions will make Pit Fighter an even better game.![]()
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
-
- Seen it all
- Posts: 2302
- Joined: Mon Jan 03, 2005 5:04 pm
- Location: Germany
- Contact:
badinsults wrote:I'll tell you, I think it would be pretty awesome to use the 21fx to put the actual music into Rock N Roll Racing.
- Lost Vikings II: voices from the PC gameDeathlike2 wrote:I'm sure these additions will make Pit Fighter an even better game.
- Mortal Kombat: Unreal Tournament announcer
- Secret of Mana: music that isn't affected by sound effects
- replacing the game's with the film's music: Aladdin, Blues Brothers, Jungle Book, Jurassic Park, Star Wars
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
bsnes launcher with recent files list
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
Doing this is certainly possible without hacking the game.
If you had a file setup which linked certain audio files with certain SPCs, we can check to see when those SPCs are loaded into memory, and output something else.
I don't think it'll be pretty though.
If you had a file setup which linked certain audio files with certain SPCs, we can check to see when those SPCs are loaded into memory, and output something else.
I don't think it'll be pretty though.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
This honestly seems almost as hard to me as the famed "hires graphics replacment" and "hardware accelerated PPU" discussion threads.
Remember the guy who made the rumble support for SNES games on Zsnexbox? Instead of hacking the games (the right way), he added address watches and write counters. Caused all sorts of fun side effects. Let the intro loop and the pad starts rumbling, skip the intro and the rumbling doesn't work for a few seconds. Rumbling happens on unrelated events between level transitions. And that was the easy part, not much more complex than a Game Genie code.
Matching exact memory may not even be possible, the existing playback of other files may change APURAM, especially in the echo buffer region. It wouldn't work between versions with core changes, it definitely wouldn't work between emulators.
Any attempt to narrow down all of the variables would result in needing per-game code. In which case, it is honestly really easy to add to existing games via hacking. Any ROM hacker could do it. The below code took about an hour to make, and replaces all audio tracks in the entire game with external music instead.
Sound amazing, too. This game has an orchestral CD for it that is ten times better than the SNES version.
But nobody's going to bother doing it unless the mainstream emulators support it. Then again, thanks to new leadership, we managed to get UPS support into Snes9X, so you never know. Need Super Game Boy support first so I can piggyback on the audio mixing code.
Remember the guy who made the rumble support for SNES games on Zsnexbox? Instead of hacking the games (the right way), he added address watches and write counters. Caused all sorts of fun side effects. Let the intro loop and the pad starts rumbling, skip the intro and the rumbling doesn't work for a few seconds. Rumbling happens on unrelated events between level transitions. And that was the easy part, not much more complex than a Game Genie code.
Matching exact memory may not even be possible, the existing playback of other files may change APURAM, especially in the echo buffer region. It wouldn't work between versions with core changes, it definitely wouldn't work between emulators.
Any attempt to narrow down all of the variables would result in needing per-game code. In which case, it is honestly really easy to add to existing games via hacking. Any ROM hacker could do it. The below code took about an hour to make, and replaces all audio tracks in the entire game with external music instead.
Code: Select all
org $36822b; jml test; nop
org $408000
test:
cmp #$02; beq .play
cmp #$04; beq .stop
.ignore:
php
phb
phd
sep #$20
jml $368230
.play:
tya; sta $0021f1
lda #$01; sta $0021f0
-; lda $0021f0; bvs -
lda #$01; sta $0021f1
lda #$03; sta $0021f0
rtl
.stop:
lda #$02; sta $0021f1
lda #$03; sta $0021f0
rtl
But nobody's going to bother doing it unless the mainstream emulators support it. Then again, thanks to new leadership, we managed to get UPS support into Snes9X, so you never know. Need Super Game Boy support first so I can piggyback on the audio mixing code.
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
No, we can't. How hard is it to understand that dammit.Nach wrote:we can check to see when those SPCs are loaded into memory
Reread how it's done. And then look at Lost Vikings and EWJ2 and MARIO PAINT.
No.
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
-
- New Member
- Posts: 5
- Joined: Fri Jan 15, 2010 11:54 am
- Location: germany
So with changes in the rom via a rom hacker its possible to redirect calls to spc-files to user defined mp3-files? Where is the external music located? In the rom file by itself? Is it possible for the emu to play this different codec? (if its mp3 or wave?)byuu wrote:In which case, it is honestly really easy to add to existing games via hacking. Any ROM hacker could do it. The below code took about an hour to make, and replaces all audio tracks in the entire game with external music instead.
CODE
Sound amazing, too. This game has an orchestral CD for it that is ten times better than the SNES version.
-
- Seen it all
- Posts: 2302
- Joined: Mon Jan 03, 2005 5:04 pm
- Location: Germany
- Contact:
Read the "21fx" threads here: http://board.byuu.org/viewforum.php?f=16
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
bsnes launcher with recent files list
Once I have the API and specs finalized, I'll start putting up some UPS patches that can do this for the most popular games.
> So with changes in the rom via a rom hacker its possible to redirect calls to spc-files to user defined mp3-files?
Yes. Not only possible, but trivial for most games. Streaming audio games present a greater challenge, but make up less than 1% of SNES music.
> Where is the external music located?
On the hard drive as external files. Right now, they are stored as 2-channel 44KHz PCM files. One file per audio track, numbered numerically:
game.sfc
game.msu
game-01.wav
game-02.wav
...
An emulator could cheat and use 5.1-channel surround sound @ 32-bit 96KHz, but a real hardware design would require a separate audio output jack on the cartridge. Doesn't really matter, the game modifications are the same regardless; and let's not kid ourselves, slim to none chance actual hardware version will be made unless I save up and go to college to learn EE.
game.msu is for the video and whatever else you want. File size is dynamic, anything from 0 bytes to 4GB.
Exact naming conventions may change, working on that now.
> Is it possible for the emu to play this different codec? (if its mp3 or wave?)
I use PCM (WAV) files. MP3 support is easy enough, but adds an annoying patent-encumbered dependency. I'd prefer to distribute MP3s with a simple copy of LAME and a batch file to spit out waves.
It matters not to me if someone else adds direct MP3 support.
The emulator plays the music in real-time, mixed in to the SNES' internal music stream. So even if you run in slow motion or fast forward, the sound is still consistent and matches sound effects and action in-game.
> So with changes in the rom via a rom hacker its possible to redirect calls to spc-files to user defined mp3-files?
Yes. Not only possible, but trivial for most games. Streaming audio games present a greater challenge, but make up less than 1% of SNES music.
> Where is the external music located?
On the hard drive as external files. Right now, they are stored as 2-channel 44KHz PCM files. One file per audio track, numbered numerically:
game.sfc
game.msu
game-01.wav
game-02.wav
...
An emulator could cheat and use 5.1-channel surround sound @ 32-bit 96KHz, but a real hardware design would require a separate audio output jack on the cartridge. Doesn't really matter, the game modifications are the same regardless; and let's not kid ourselves, slim to none chance actual hardware version will be made unless I save up and go to college to learn EE.
game.msu is for the video and whatever else you want. File size is dynamic, anything from 0 bytes to 4GB.
Exact naming conventions may change, working on that now.
> Is it possible for the emu to play this different codec? (if its mp3 or wave?)
I use PCM (WAV) files. MP3 support is easy enough, but adds an annoying patent-encumbered dependency. I'd prefer to distribute MP3s with a simple copy of LAME and a batch file to spit out waves.
It matters not to me if someone else adds direct MP3 support.
The emulator plays the music in real-time, mixed in to the SNES' internal music stream. So even if you run in slow motion or fast forward, the sound is still consistent and matches sound effects and action in-game.
-
- New Member
- Posts: 5
- Joined: Fri Jan 15, 2010 11:54 am
- Location: germany
-
- Seen it all
- Posts: 2302
- Joined: Mon Jan 03, 2005 5:04 pm
- Location: Germany
- Contact:
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
bsnes launcher with recent files list
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
How hard is it to understand that we can?grinvader wrote:No, we can't. How hard is it to understand that dammit.Nach wrote:we can check to see when those SPCs are loaded into memory
We have code which dumps SPCs, we'd need to have it running constantly in the background. When it finds the SPC it can dump matches a particular SPC on file, we can mute ZSNES normal SPC output, and play up whatever audio file in the background.
But like I said above, this won't be pretty. Getting sound effects aside from the music to play will be nothing short of a nightmare.
I imagine we can run two cores simultaneously in the background, one with just the SPC music from file, and the other the actual emulated game, and whenever there's a difference in the two, output from the main emulated game one. But this certainly won't work for every game. It will also cause a lot of issues with in between BGMs, not to mention slow the whole thing way down.
As long as we have a unique dump of whatever it is being streamed, we can alter the BGM. What we have may or may not be unique across the game. However, since audio is streamed, it won't allow us to differentiate between background music and sound effects.Rashidi wrote:suppose that can be done,Nach wrote:we can check to see when those SPCs are loaded into memory
how about spc(s) that 'can not dump-ed properly' ( such as FEDA' ) ?
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
have fun handling those that start playback before the whole data is uploaded and thus don't match any 'full' SPC file, those streamed where every second has different samples in most channels, and those that are built in ram by the game and there's nothing to compare them to.Nach wrote:We have code which dumps SPCs, we'd need to have it running constantly in the background. When it finds the SPC it can dump matches a particular SPC on file, we can mute ZSNES normal SPC output, and play up whatever audio file in the background.
Feel free to try, I'll watch from there with the popcorn.
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
In those cases, it won't replace until the whole thing is uploaded.grinvader wrote:have fun handling those that start playback before the whole data is uploaded and thus don't match any 'full' SPC fileNach wrote:We have code which dumps SPCs, we'd need to have it running constantly in the background. When it finds the SPC it can dump matches a particular SPC on file, we can mute ZSNES normal SPC output, and play up whatever audio file in the background.
I covered that already in my last post.grinvader wrote: those streamed where every second has different samples in most channels, and those that are built in ram by the game and there's nothing to compare them to.
I have no intention of trying. I'm just saying it's theoretically possible, and would be interesting to see, not that I'm actually interested in the feature.grinvader wrote: Feel free to try, I'll watch from there with the popcorn.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- New Member
- Posts: 5
- Joined: Fri Jan 15, 2010 11:54 am
- Location: germany
Re: Replace music .spc with .mp3 music (load mp3 files)
Hello guys,
so it looks unrealistic, that this feature will ever be implemented? I think it would bring much more to the
game experience than any filter 2x, 3x,4x.... I was satisfied with the visual long time ago. I have
so many great orchestrated soundtracks waiting to be used in their origin games....
Please help....
so it looks unrealistic, that this feature will ever be implemented? I think it would bring much more to the
game experience than any filter 2x, 3x,4x.... I was satisfied with the visual long time ago. I have
so many great orchestrated soundtracks waiting to be used in their origin games....
Please help....