home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1985 August / Ahoy_Magazine_85-08_1985_Double_L.d64 / boink (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  704b  |  24 lines

  1. 0 print"[147]":poke53280,0:poke53281,2:poke646,1
  2. 1 rem sound effects
  3. 2 rem "boink"
  4. 10 gosub 900:goto 100
  5. 20 poke ad(1),5:poke sr(1),21:poke fl(1),30:poke fh(1),30
  6. 25 poke ad(0),5:poke sr(0),53 :poke fh(0),25
  7. 30 poke vl,15:print "."
  8. 40 poke gt(1),129:for i=0 to 29:next:poke gt(0),17
  9. 50 for i=25 to 250 step 25:poke fh(0),i:for x=0 to 14:next:next
  10. 60 poke gt(1),0:poke gt(0),0
  11. 90 return
  12. 99 rem routine to play sounds when shift is pressed
  13. 100 print "press shift to hear sound";
  14. 110 if peek(653)=0 then 110
  15. 120 gosub 20:goto 100
  16. 898 rem routine to set up variables
  17. 899 rem set up sound control addresses
  18. 900 fl(0)=54272:fh(0)=54273:gt(0)=54276:ad(0)=54277:sr(0)=54278
  19. 905 for i=1 to 2:x=i*7:fl(i)=fl(0)+x:fh(i)=fh(0)+x:gt(i)=gt(0)+x:ad(i)=ad(0)+x
  20. 906 sr(i)=sr(0)+x:next
  21. 909 rem set volume address
  22. 910 vl=54296
  23. 990 return
  24.