Text of this page, read by machine (may contain mistakes)
COLECOVISION SOUND USERS’ MANUAL Page 3
® LSTLOF_SND_ADDRS and PTR_TO_LST_OF_SND_ADDRS
The O/S routines expect the ten byte long song data areas to be stored
contiguously in CPU RAM, starting with the data area used by song number one
The beginning addresses cf each of these data creas, as well as the acdresses
of the headers of the first note in each song, are stored in a ROM table calies
IST_OF_SND_ADDRS (see Figure 3): The cartridge programmer way place this teole
wherever desired in ROM. The 0/5 routines know its starting address through «
Sedicated CPU RAM location, PTRLTO_LST_OF_SND_ADDRS, which must be leaded with
the 1é bit address of the table by the cartridge program before calling any O/S
routines which use it (see Sescription of INIT_SOUND).
* Hierarchy of song data areas: truncation. priority, owerwriting
The routine that does the processing of the note data stored in the song data
areas, SND_MANACER, anc the routine that outputs the modified data to the sound
chip, PLAY_SONCS, are designed to be called by the cartridge program every
Video Display Processor (VDP) interrupt (every 16.7 ms). Starting with the
cats area for song number one, SND_MANACER processes the appropriate timer and
Sweep counters and modifies the frequency and attenuation data accordingly. If
the cata area is assigned to a special effect, SND_MANACER calls that effect.
When a note ts finished, SNOLMANAGER, using the data area's next note pointer,
moves cata for the next note of the song into the area.
After the operations upen 2 date area have been performed, the sound chip
channel number (CH®) stored in byte O of that data area is consulted and the
appropriate “channel data area pointer” (PTR_TO_S_ON_x«) ie set to point to the
beginning of the data area just processed (four of these pointers exist at
Gedicated 16 bit locations in CPU RAM, one for each of the sound generator
channels). The following data areas are then processed in the same fashion, in
order of occurence, until the end of data area code, 00, is reached. If a data
area is inactive, i.e., if the songs) that use it aren't playing at the
moment, SND_MANACER simply passes it over, doing no processing or channel data
area pointer modification.
LAY_SONCS, usually called immediately prior to SND_MANACER, outputs data to
the sound chip from the four song data areas pointed to by the channel data
area pointers. Thus, a channel output priority is established on the basi«: of
ordinal position within the data ares block: the last data area processed that
uses 4 given channel is the one that will be played on that channel. E.g.,
order of dats area
within data block
containing all songs that use this data area:
song data areas SONGND/CHE song is to be played on
ist 1/CHex (remember: although other songs may use
this data area also , song 1 MUST use i)
Sth 6/CHe2
éth 3/CHE2
7th 11/CHE2
16th 2/CHE3, 4/CHS3; 7/CHOS