Text of this page, read by machine (may contain mistakes)
COLECOVISION SOUND VEERS' MANUAL page
INIT_SOUND. This routine shoulc be called immediately after power on, before
any sound processing can occur. It turns off the sound generators, initializes
the CART RAM locations to be used as song data areas, sets up the four channel
Sats area pointers, and initializes PTR_TO_LST_OF_SND_ADDRS.
INPUT: n
TYPE: 8 bit constant
PASSED: in B
DESCRIPTION: number of song cata areas used by the game
INPUT: LST_OF_SND_ADDRS
TYPE: 16 bit address
PASSED: in KL
DESCRIPTION: LST_OF_SND_ACORS is the base address of a list of the starting
sédresses of seach song's Satz ree end note List.
OUTPUT: 1) turns off all sound generators -
2) initialses PTR_TO_LST_OF_SND_ADDRS
3) writes the inactive code (OFTH) tc byte O of the n song data areas
4 stores 00 at end of song data areas
S) sets the ¢ channel song pointers to a dummy inactive sree
6) sets SAVE_CTRL to OFFH Gee “Noise notes” discussicn)
JUKE_BOX: JUKE_BOX is called to start a song. Using a song number passed in B,
JUKE_BOX loads the data for the song's first note into the appropriate song
gata area, thereby truncating whatever song had been "playing" in that data
area. (The address of the appropriate area is found by using the song number
as an inder inte the LST_LOT_SND_ADDRS table). It also formats the data area's
header and sets up the next note pointer. If the song is a special sound
effect, its next note pointer is set to the address of the special effect
routine. The next time PLAY_SONCS ts called, that song's first note will be
played.
If JUKE_BOX is called with a song number of a song already in progress, it
returns immediately G.e., it doesn't restart the song).
INPUT: song mumber to be started
TYPE: B bit constant, i to éi
PASSED: in B
CALLS: PT_IX_TO_SeDATA, LOAD_NEXT_NOTE_PTR, UP_CH_DATA_PTRS
OUTPUT: 1) moves the song's first note data to the appropriate song data area
1) formats byte 0 header of the song's data area
2 points next note pointer in date area (bytes 162) to address of
first note in song, or address cf special sound effect routine
SND_MANAGCER: SND_MANAGER should be called every VDP interrupt (every 16.7 ms).
For each data area, SND_MANACER processes the appropriate timer and sweep
counters and modifies the frequency and attenuation Gata accordingly. If the
data area ie assigned to a special effect, SND_MANACER calle that effect.
When a note is finished, SND_MANACER, using the data area's next note pointer,
moves ¢ata for the nest note of the song into the area. If 5ND_MANACER reads «
header byte (in CART ROM) that has bits 364 set, indicating repeat song. it
will start the song again by reloading the first note in the song.
After the operations upon a data area have been performed, if necessary, the
channel Gate sree pointers (PTR_TO_S_ON_x) are updated. The following date
§