diff options
Diffstat (limited to 'src/bell.s')
| -rw-r--r-- | src/bell.s | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/bell.s b/src/bell.s new file mode 100644 index 0000000..6a27503 --- /dev/null +++ b/src/bell.s @@ -0,0 +1,45 @@ + + .include "atari.inc" + + .import _bell_type + .export _bell + +DISTVOL = $a8 +PITCH = $40 +JIFFIES = $03 + +_bell: + lda #<bell_callback + sta CDTMA2 + lda #>bell_callback + sta CDTMA2+1 + lda _bell_type + beq done + lda #JIFFIES + sta CDTMV2 + lda _bell_type + and #1 + beq check_flash + lda #DISTVOL + sta AUDC1 + lda #PITCH + sta AUDF1 +check_flash: + lda _bell_type + and #2 + beq done + lda #$08 + sta COLOR4 + lda #JIFFIES + sta CDTMV2 +done: + rts + +bell_callback: + lda #0 + sta AUDC1 + sta AUDF1 + sta COLOR4 + lda #JIFFIES + sta CDTMV2 + rts |
