; Sample playback for C64 ; @com.wudsn.ide.asm.hardware=C64 NDX = $c6 SIDVOLUME = $d418 STICK2 = $dc00 STICK1 = $dc01 opt h-f+ org $800-2 .word load ; BASIC header follows load .byte $00, $0c, $08 ,$0a ,$00, $9e, $20, $32, $30, $36, $34, $00, $00, $00 org $810 jsr $e544 MainLoop lda STICK1 ; check for keypress and #%01000000 ; is it "Q"? bne readstick lda #0 ; then clear keyboard buffer... sta NDX jsr $e544 ; ...and screen rts ; and exit readstick lda STICK1 and #%00010000 ; Fire button as flow control sta 1026 bne MainLoop lda STICK2 ; get volume and #%00001111 sta Stick2Save sta 1025 lda STICK1 and #%00001111 sta 1024 cmp #%00001010 ; sample command? bne MainLoop ; if not then loop PlaySample lda Stick2Save sta SIDVOLUME ; store the data in the audio volume register jmp MainLoop Stick2Save .byte 0