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

  1. 0 print"[147]":poke53280,0:poke53281,3:poke646,0
  2. 1 rem sound effects
  3. 2 rem seashore
  4. 10 gosub 900:goto 100
  5. 20 poke ad(1),160:poke sr(1),255:poke fl(1),30:poke fh(1),30
  6. 25 poke ad(2),15:poke sr(2),0:poke fh(2),80
  7. 30 poke vl,15:print "press runstop/restore to stop"
  8. 35 poke gt(1),129
  9. 40 poke gt(2),129:for i=255 to 100 step -(1+int(3*rnd(9))):poke fh(1),i
  10. 50 x=4+int(i/23):if x>15 then x=15
  11. 55 poke vl,x:for x=0 to 29:next:next:poke gt(2),0
  12. 60 for i=100 to 255 step 8+int(10*rnd(9)):poke fh(1),i
  13. 70 x=4+int(i/23):if x>15 then x=15
  14. 75 poke vl,x:for x=0 to 19:next:next
  15. 80 goto 40
  16. 90 return
  17. 99 rem routine to play sounds when shift is pressed
  18. 100 print "press shift to hear sound"
  19. 110 if peek(653)=0 then 110
  20. 120 gosub 20:goto 100
  21. 898 rem routine to set up variables
  22. 899 rem set up sound control addresses
  23. 900 fl(0)=54272:fh(0)=54273:gt(0)=54276:ad(0)=54277:sr(0)=54278
  24. 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
  25. 906 sr(i)=sr(0)+x:next
  26. 909 rem set volume address
  27. 910 vl=54296
  28. 990 return
  29.