View Single Post
Old 24 July 2010, 18:07   #2
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,642
Games by talented guys, like Hybris/Battle Squadron, Turrican etc use clever techniques to "hide" the uhm lack of channels by having 3-4 channel music but putting parts of the composition "that the ear needs most to feel continuity in the music" in reserved channels. For example bass+drums in chan 0 and harmonies or chords in chan 1, and then have melody and "extras" for the music in two optional channels that get overridden by SFX.

You can rearrange the music to f.ex. 3 channels and set number of channels in The Player, then the unused channels won't be touched.

I always feel I get more "into" the game if all 4 channels are used for an absorbing barrage of SFX only, I love that Music can be played as interludes, f.ex. "loading level" or "big ship landing" or "here comes a boss".

The usual way to "hack" a module player is to
put a "don't write to soundregisters if SFX is playing" conditional in the part that starts a sample
put a "don't write to soundregisters if SFX is playing" conditional in the part that sets the samples' loops (look for a busy-wait or a CIA interrupt)
put a "don't execute musiceffectcommand if SFX is playing" conditional in the 1 or 2 places that handle effects.

A fail-safe quick hack method is to patch each and every single write to audio-registers with a conditional that checks if the SFX routine has "tagged" that channel and if so skips it. (The only thing you have to watch out is for code triggered by an audio-interrupt, but I haven't seen any in the normal .mod players.)


If a soundeffect reserves a channel, you must have some kind of timing-value to release it back to the playroutine after "a while", of course.


Edit: Jesus "Christ", that's a lot of "double quotes". Poor "post writing". Oh well
Photon is offline  
 
Page generated in 0.04431 seconds with 11 queries