2021-01-22 03:54:21 +00:00
|
|
|
(local {: vm} (require :game.defs))
|
|
|
|
|
|
|
|
(local speaker :0xc030)
|
|
|
|
(vm:def :blipmem ; count p --
|
|
|
|
[:block
|
|
|
|
[:lda [vm.ST1 :x]]
|
|
|
|
[:tay]
|
|
|
|
:sample
|
|
|
|
[:lda speaker]
|
|
|
|
[:lda [vm.TOP :x]]
|
|
|
|
[:inc vm.TOP :x]
|
|
|
|
[:bne :wait]
|
|
|
|
[:inc vm.TOPH :x]
|
|
|
|
:wait
|
|
|
|
[:clc] [:adc 1]
|
|
|
|
[:bne :wait]
|
|
|
|
[:dey]
|
|
|
|
[:bne :sample]]
|
|
|
|
(vm:drop) (vm:drop))
|
|
|
|
|
2021-01-24 16:32:49 +00:00
|
|
|
(vm:word :snd-explode 0x40 :lit :randombytes :blipmem)
|
2021-01-22 03:54:21 +00:00
|
|
|
|