Prev: $B938 Up: Map Next: $B9A0
$B940: Initialise voices #1, #2 and #3 for the theme tune
Used by the routine at $BA00.
$B940 LDA #$16 Set voice #1 attack length to 8ms and decay length to 204ms.
$B942 STA $D405
$B945 LDA #$1C Set voice #2 attack length to 8ms and decay length to 3s.
$B947 STA $D40C
$B94A LDA #$1C Set voice #3 attack length to 8ms and decay length to 3s.
$B94C STA $D413
$B94F LDA #$00 Set voice #1 sustain volume to 0 and release length to 6ms.
$B951 STA $D406
$B954 LDA #$00 Set voice #2 sustain volume to 0 and release length to 6ms.
$B956 STA $D40D
$B959 LDA #$00 Set voice #3 sustain volume to 0 and release length to 6ms.
$B95B STA $D414
$B95E LDA #$20 Initialise the voice control registers in the tune buffer at $BBB4: voice off; saw waveform enabled.
$B960 STA $BBCB
$B963 LDA #$20
$B965 STA $BBCC
$B968 LDA #$20
$B96A STA $BBCD
$B96D LDA #$80 Set voice #1 pulse width to $8080.
$B96F STA $D402
$B972 LDA #$80
$B974 STA $D403
$B977 LDA #$80 Set voice #2 pulse width to $8080.
$B979 STA $D409
$B97C LDA #$80
$B97E STA $D40A
$B981 LDA #$80 Set voice #3 pulse width to $8080.
$B983 STA $D410
$B986 LDA #$80
$B988 STA $D411
$B98B LDA #$00 Set filter cut off frequency to 0.
$B98D STA $D416
$B990 LDA #$00
$B992 STA $D415
$B995 LDA #$00 Disable voice filters.
$B997 STA $D417
$B99A LDA #$0F Set volume to maximum and disable filters.
$B99C STA $D418
$B99F RTS
Prev: $B938 Up: Map Next: $B9A0