Detecting song start/stop during emulation

Strictly for discussing ZSNES development and for submitting code. You can also join us on IRC at irc.libera.chat in #zsnes.
Please, no requests here.

Moderator: ZSNES Mods

Post Reply
jannone
New Member
Posts: 3
Joined: Sat Sep 01, 2007 11:30 pm
Location: Porto Alegre/RS - Brazil
Contact:

Detecting song start/stop during emulation

Post by jannone »

Hey guys,

Sorry if this had already been asked, but I couldn't find any information on this very specific topic.

I want to know if it is possible to hack ZSNES in a way as to detect the start and stop of songs during gameplay. The idea is to then suppress the normal playback and use an .mp3 file instead, so that we would be able to play remixed songs in the original game, while maintaining the original sound effects.

Has this been done before? I know that there is a special version of MAME for Golden Axe that accomplishes exactly that. But then again, never found a generic solution involving the SNES.

Thanks,
Rafael
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

I believe the short answer is no.

If you've ever used the dump SPC feature, there are some games that haven't had their music dumped. (I forget the exact reason, but some songs are simply dynamic such as getting on/off Yoshi in Super Mario World) In any case, there is no generic solution for your request/thought.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
jannone
New Member
Posts: 3
Joined: Sat Sep 01, 2007 11:30 pm
Location: Porto Alegre/RS - Brazil
Contact:

Post by jannone »

That's really unfortunate.

Is there, at some stage in the hardware, any way to inspect which notes are being played, regardless of the particular sample? (so that the emulator could associate a particular note sequence with the beginning of a given song, and work from that point on)
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

The SPC isn't a "MIDI player". The SPC also produces sounds. The sounds don't go on a special channel or processor like the Genesis does.

What you are suggesting requires romhacking to know where things are done.. it is the equivalent suggestion to a "hires project" for games.. you actually have to know the intricacies of the game (the graphics or audio data are not stored in some standard format or in a standard portion of the rom). In any case, the hack/replacement/whatever you want to call it would not be called emulation at all.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
jannone
New Member
Posts: 3
Joined: Sat Sep 01, 2007 11:30 pm
Location: Porto Alegre/RS - Brazil
Contact:

Post by jannone »

I see...
Well, thanks for taking the time to explain, I appreciate it.
Post Reply