23 lines
407 B
Fennel
23 lines
407 B
Fennel
(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))
|
|
|
|
(vm:word :snd-explode 0x40 :lit :randombytes :blipmem)
|
|
|