Text of this page, read by machine (may contain mistakes)
COLECOVISION SOUND USERS' MANUAL page 13
OPERATING SYSTEM ROUTINES
INIT_SOUND
Contains ENTRY POINT: ALL_OFF
INIT_SOUND, usually called right after power on, turns off the sound
generators, tnitialises the CART RAM locations to be used es song data areas,
and sets up the four channel data area pointers. Specifically, it:
1) directly turns off all four sound generators.
2) initialises PTR _TO_LST_OF_SND_ADDRS, « dedicated i¢ bit CFU RAM pointer
which other sound routines expect to contain the base address of a list in
CART ROM (called LST_OF_SND_ADDRS) of the starting addresses of each
song's data area and note list. The address of LST_OF_SND_ADDRS is pessed
to INIT_SOUND in HL.
3) stores the sound-inactive code (OFFH) into byte 0 ef mn song data areas. n
is passed in B and « the total mumber of song data arees used by the gaze
@® stores an end of data area code (00) following the lest data area.
5S) sets the four pointers to the data areas for the songs to be played on
each channel, PTR TO_S_ON_x (x = 0-3), to a dummy inactive area (DUM_AREA,
which is actually a single OFFH byte within INIT_SOU).
6) sets SAVE_CTRZ to an initial value of OFFH
INPUT: n
TYPE: § bit constant
PASSED: in B
DESCRIPTION: number of song data area used by the game
INPUT: LST_OF_SND_ADDRS
TYPE: 16 bit address
PASSED: in KL
DESCRIPTION: LST_OF_SND_ADDRS is the base address of a list of the starting
addresses of each song's data area and note list.
OUTPUT: 1) turns off all sound generators
2) initializes PTR_TO_LST_OF_SND_ADDRS
3) writes inactive code to byte 0 of n song Gata areas
4) stores 00 at end of song cata areas
S) sets the 4 channel song pointers to the inactive DUM_AREA
6) sets SAVE_CTRL to OFFK
ALL_OFF
ALL_OFF directly turns off all four sound generators, Sut does nothing te any
song data areas or the 4 channel data pointers.
INPUT: none
OUTPUT: turns off all sound generators