Prev: $B9A0 Up: Map Next: $BA48
$BA00: Play the theme tune
Used by the routines at $0800 and $2BB0.
$BA00 SEI Disable interrupts.
$BA01 LDA #$BA Set the interrupt routine address at $FFFE to $BAB4.
$BA03 STA $FFFF
$BA06 LDA #$B4
$BA08 STA $FFFE
$BA0B JSR $BA90 Initialise the tune buffer.
$BA0E LDA #$00 The theme tune data for voice #1 is at $BC00.
$BA10 STA $BBC3
$BA13 LDA #$BC
$BA15 STA $BBC6
$BA18 LDA #$41 The theme tune data for voice #2 is at $BC41.
$BA1A STA $BBC4
$BA1D LDA #$BC
$BA1F STA $BBC7
$BA22 LDA #$5A The theme tune data for voice #3 is at $BC5A.
$BA24 STA $BBC5
$BA27 LDA #$BC
$BA29 STA $BBC8
$BA2C JSR $B940 Initialise voices #1, #2 and #3.
$BA2F CLI Re-enable interrupts to start playing the tune.
$BA30 LDA $BBCE Has the tune finished playing yet?
$BA33 BNE $BA38 Branch if so.
$BA35 JMP $BA30 Otherwise check again.
$BA38 SEI Disable interrupts.
$BA39 LDA #$39 Set the interrupt routine address at $FFFE back to $39C7.
$BA3B STA $FFFF
$BA3E LDA #$C7
$BA40 STA $FFFE
$BA43 CLI Re-enable interrupts.
$BA44 JSR $302A Initialise voice #3.
$BA47 RTS
Prev: $B9A0 Up: Map Next: $BA48