You know how in, like, Flying Battery Zone Act 2, you can get part of the music to drop out if you get a sound effect (like a spring noise) to play? How does that happen?
(It's not just old-school games; you can get part of the music for Techno Base Act 2 in Sonic Advance 2 to drop out too)
Comments
the genesis actually has two sound chips, a Yamaha YM2612 and a TI SN76489. the YM2612 has six monophone FM synths, an LFO, some other junk. the SN76489 has three square waves and one noise. both sound chips were controlled by the CPU through a subprocessor, a Z80.
you can see multiple bottlenecks that could result in the effect you're describing. e.g., the CPU-Z80 bridge could be simple and not allow full use of both sound chips simultaneously, or the full capabilities of both sound chips would be required together to play the soundtrack.
chiptunes aren't separated into "layers" because the sound is not produced in the manner of traditional music, with a score, or a modern recording, a linear series of samples. each chiptune is effectively a subprogram of the game, a computable object. so this separation sort of thing is hard to manage.
(chiptunes of course usually have traditional scores/tunes - i'm just saying this is not how the hardware works)
has a Z80 for backwards compat (for several things, including sound). lol
if it was me, i'd try to emulate the coprocessor and the sound chips, except with the sound chips playing recorded square waves/whatever on the PC. should sound identical that way, if the emulation's good. this is the "low-level" approach preferred by e.g. Higan. it also doesn't make "ripping" "tracks" any easier than it would be on an actual Genesis.
you could also take a "high-level" approach, like any N64 emulator not written by Nintendo. maybe slightly harder to explain but amounts to writing your own sound generator that tries to react to the emulated CPU commands appropriately. could be as "high-level" as special-casing the Sonic & Knuckles ROM to play various recordings (possibly with the "twang") at various times.
dolphin has both available, you can compare & contrast https://wiki.dolphin-emu.org/index.php?title=DSP_LLE
I am less familiar with Genesis hardware, but I know that the NES (and Game Boy) had only very limited numbers of sound channels, and very often things like the Mega Man games would pipe sound effects through one of the sound channels, despite that channel also carrying music data.
I think NES and GB both have 3 channels for pitched sound and 1 channel for noise. SNES has 8 channels, and more flexibility in what those channels can be used for instrument-wise.
So when a sound effect comes through, that channel would temporarily stop playing music and only play the sound effect, then resume playing the music when the effect has ended.
Some games got around this creatively. For example, the GB Pokémon games have very few percussion effects, which means the noise channel is free for sound effects to use most of the time.
If you download videogame music in machine (or one could say, emulator) formats -- that is, NSF, SPC, GSF, etc. -- you can frequently use the player or plugin that plays them to mute one or more tracks. For example, you can mute the wind effects in the Death Mountain theme of Link to the Past.
This music is ripped from the game by people basically figuring out how the sound data is compressed into the rom data and extracting it, and also figuring out how the game system handled sound data and writing a program or media player plugin that duplicated that functionality.
GBA specifically expanded on GB's sound hardware by featuring both GB's chiptune sound channels and a more advanced channel (or channels) that could play a far wider variety of stuff, but in a way that I don't think can be taken apart. You have some games that make use of both, such as the soundtracks to Castlevania: Aria of Sorrow and (infamously) Harmony of Dissonance.
You don't see a lot of this channel-stealing behaviour on newer stuff simply because there's more of them to go around. The SNES, as noted, had 8, the PlayStation had either 24 or 32 (I forget), and modern software mixing can handle as many as your CPU can stand.