Text of this page, read by machine (may contain mistakes)
COLECOVISION SOUND USERS' MANUAL Page 21
UTILITIES
The following are O/S utility routines, used by the main 0/5 sound programs,
that may be of use to the cartridge programmer:
te® AREA_SONC_IBS ttt
The address of byfe 0 of a song data area is passed in IZ. The song number of
the song using that area is returned in A (OFFH if inactive). If « special
effect was using that area, 62 is returned in A and HL is returned with the
address of the special sound effect routine.
tee UPATNCTRE #88
Ferform single byte update of the snd chip noise control register or eny
attenuation register. IZ is passed pointing to byte 0 of a song deta area, MEN
register C = formatted channel attenuation code.
ae® UPFREQ 2
Perform double byte update of a sound chip frequency register. IZ is passed
pointing to byteO of a song data area, MSN register D = formatted’ channel
frequency code.
222 DECLSN ef8
Without affecting the MSN, decresent the LSN of the byte pointed to by HL. HL
Tepains the same.
RET with Z flag set if dec LSN results in 0, reset otherwise.
RET with C flag set if dec LSN results in -1, reset otherwise.
ten DECMSN te8
Without affecting the LSN, decrement the MSN of the byte pointed to by HL. HL
Temains the same.
RET with Z flag set if dec MSN results in 0, reset otherwise.
RET with C flag set if dec MSN results in <1, reset otherwise.
a2 MSNTOLSN #28
Copy MSN of the byte pointed to by HL to the LSN of that byte. KL remains the
same.
eee ADDEIG BER
Adds 8 bit two's complement signed value passed in A to the 16 bit location
pointed to by HL. Result is stored in the 16 bit location.
tee PT_IZ_TO_SeDATA ett
A SONCNO is passed in B. PT_IZ_TO_SeDATA returns with IX pointing to the song
Gata area which is used by that SONGNO.