A console with a few sound channels plays its effects on the same channels as the music. The sound code decides which effect wins a channel, mutes the music there while the effect plays, and gives the channel back when it ends. The music driver plays the songs.

Games

Every claim about this mechanic, by game (17)
Super Mario Bros.: The Lost Levels 1986The sound engine (SoundEngine through MusicHandler) is Super Mario Bros.'s with two new sounds in the noise handler: the skid, played on the triangle channel from SkidSfxFreqData, and the wind, played from WindFreqEnvData; both tables sit after the square 2 handler. SoundEngine, Dump_Squ1_Regs, Square1SfxHandler and MusicHandler differ only in their addresses.Code
Mega Man 2 1988Mega Man 2's sound engine entry and channel setup are Mega Man's, with two changes: _music_fade_in_out no longer ignores a new fade while one is running, and where Mega Man steps X with INX, four operands use an address plus 1 instead and one writes SQ1_SWEEP plus X. The engine starts at $8000 instead of $9000, so its jump and call addresses differ too.Code
Mega Man 2's per-frame channel update is Mega Man's, except that _break_frame and the end of _pitch_envelope_common address the next APU register as SQ1_SWEEP plus X, where Mega Man steps X with INX and writes SQ1_VOL plus X. The code sits $100A lower, so its jump and call addresses differ too.Code
Mega Man 2's sound effect reader is Mega Man's, instruction for instruction and with the same RAM, moved $100C lower: only its jump and call addresses and the addresses in its command table differ.Code
Mega Man 3 1990Both games run their sound driver from the NMI, but Mega Man 3's is new code with a new layout. Mega Man 2 keeps the driver and its songs together in bank 12, queues up to 16 tracks, and works out a note's length as a table value times its channel's tempo byte. Mega Man 3 keeps the code in bank 22 and the data in bank 23, reading bank 24 for data addresses from $C000; it takes sound IDs from an eight-entry ring buffer in the fixed bank, and refuses a sound whose priority byte is lower than the one playing.Code
Mega Man 4 1991Mega Man 4's per-frame sound tick is Mega Man 3's sound_driver_update, byte for byte at the same address.Code
Mega Man 4's routine that starts a song or an effect, and takes the stop, pause, fade, and transpose commands, is Mega Man 3's, byte for byte at the same address.Code
Mega Man 4's sound effect reader is Mega Man 3's (labeled parse_music_data there), byte for byte at the same address.Code
Mega Man 5 1992Mega Man 5's per-frame sound tick is Mega Man 4's, byte for byte at the same address.Code
Mega Man 5's routine that starts a song or an effect, and takes the stop, pause, fade, and transpose commands, is Mega Man 4's, byte for byte at the same address.Code
Mega Man 5's sound effect reader is Mega Man 4's, byte for byte at the same address.Code
Mega Man 5's fixed-bank routine that adds a sound to the queue is Mega Man 4's, byte for byte (27 bytes), at $EC5B where Mega Man 4 has it at $F6BC.Code
Mega Man 6 1993Mega Man 6's per-frame sound tick is Mega Man 5's at the same address; three call targets differ, because the stream readers they call sit one byte lower in Mega Man 6.Code
Mega Man 6's sound command routine is Mega Man 5's with one change: where Mega Man 5 steps the sound's data pointer by incrementing $C1 and, on a carry, $C2 before copying it to $D0 and $D1, Mega Man 6 carries into X instead, so $C2 is left as it was, and the routine is a byte shorter. Code after it sits one byte lower, and its jumps, calls, and jump-table entries follow.Code
Mega Man 6's sound effect stream reader is Mega Man 5's, one byte lower ($8251 against $8252); only its call and jump targets and jump-table entries differ.Code
Mega Man 6's sounds $23-$3C, the first 26 after its music, at $B758-$BAC2 of bank $36, are 22 of Mega Man 5's sounds from $1A to $3E plus four new ones ($2A-$2D). The 22 keep Mega Man 5's order, except that its $3E comes in as $2E. Seventeen are byte for byte. In the other five only addresses differ, each moved as far as the sound: one address inside each of four effects, and the four track pointers of $39, a sound with music's priority $00 (Mega Man 5's $30). Mega Man 6 leaves out 12 of Mega Man 5's $1A-$3A: $1F, $21, $23, $2B, $2F, $31-$34, and $36-$38. The Mega Man 5 disassembly's notes name two of the carried sounds, the ricochet ($1E, Mega Man 6's $27) and the hit ($2A, Mega Man 6's $35); the kill sound ($2B) is one of those left out.Verified
Mega Man 6's sound effects $61 and $62, at $BE99-$BEE7 of bank $36, are byte for byte Mega Man 5's $17 and $18, the first two effects after its music.Verified