SHARE
TWEET

Follow the sound

EmanueleBonin Apr 8th, 2019 155 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 10 gosub 60000 : rem screen
  2. 11 gosub 60500 : rem inizializza SID
  3. 12 gosub 60300 : rem inizializza un po' di variabili
  4. 14 gosub 10000 : rem inizializza generatore random
  5. 15 for q= 1 to 5: k=s(q): r=400: if q=5 then r=800
  6. 16 gosub 59900: next: so=1:st$="{reverse on}{red}premi un tasto":gosub 21100
  7. 18 r=500: rem lunghezza note
  8. 20 lv=lv+1: sl=1: rem l = livello e sl = sottolivello
  9. 30 sq$ = "": print "{home}{white}livello";lv;" sottolivello";sl;" vite:";vt
  10. 40 for q= 1 to lv+1: gosub 10040: k=rd: gosub 59900
  11. 50 sq$ = sq$ + str$(rd):next
  12. 60 so=0:st$="{reverse on}{yellow}ripeti":gosub 21100
  13. 62 gosub 100:if er=1 then vt=vt-1: if vt = 0 thengoto 80
  14. 65 r=r-240: sl=sl+1:if sl>2 then r=500:goto20
  15. 70 goto 30
  16. 80 end
  17.  
  18.  
  19.  99 rem Routine di controllo della sequenza
  20. 100 pt = 0:er=0
  21. 105 get a$
  22. 110 if a$ = "i" then k = 1: goto160
  23. 120 if a$ = "o" then k = 2: goto160
  24. 130 if a$ = "k" then k = 3: goto160
  25. 140 if a$ = "l" then k = 4: goto160
  26. 150 goto 105
  27. 160 pt=pt+1: ct$ = mid$(sq$, pt*2-1, 2)
  28. 170 gosub 59900
  29. 175 if ct$ <> str$(k) then er=1:so=1:st$="{reverse on}{red}errore":gosub 21100: goto 200
  30. 180 if pt = int(len(sq$)/2) then :so=1:st$="{reverse on}{red}  ok  ":gosub 21100: goto 200:rem sequenza conclusa correttamente
  31. 190 goto 105
  32. 200 return
  33.  
  34. 9999 rem init voice 3 rumore random
  35. 10000 poke 54286, 255: rem LSB voce 3 frequenza d'onda al massimo
  36. 10010 poke 54287, 255: rem MSB voce 3 frequenza d'onda al massimo
  37. 10020 poke 54290, 128: rem Voce 3, rumore bianco, senza attivare audio
  38. 10030 return
  39.  
  40. 10039 rem random 1 4
  41. 10040 rd = peek(54299)
  42. 10045 rd = rd - int(rd/4)*4 + 1
  43. 10050 return
  44.  
  45. 21000 poke 780,0
  46. 21010 poke 781,y
  47. 21020 poke 782,x
  48. 21030 sys 65520
  49. 21040 return
  50.  
  51. 21099 rem stampa una stringa al centro dello schermo e attende un tasto se so = 1
  52. 21100 y=12:x= 19 - int(len(st$)/2):gosub 21000
  53. 21120 print st$: if so<>1 goto 21160
  54. 21130 poke 198,0: wait 198,1:poke 198,0
  55. 21140 y=12:x=0:gosub 21000
  56. 21150 print "       {cyan}{reverse on} {reverse off}{096}{096}{096}{096}{096}{096}{096}{096}{096}{096}{096}{123}{096}{096}{096}{096}{096}{096}{096}{096}{096}{096}{096}{reverse on} "
  57. 21160 return
  58.  
  59.  
  60. 59900 poke SB+0,fl(k): poke SB+1,fh(k): poke SB+24,15
  61. 59910 x=px(k):y=py(k)
  62. 59915 for j = 1 to 2
  63. 59916 c$="{reverse off}"
  64. 59918 if j = 1 then c$ = "{reverse on}" + co$(k)
  65. 59920 gosub 21000
  66. 59925 print c$ + t$(k)
  67. 59945 if j = 2 goto 59955
  68. 59950 for i = 1 to r: next
  69. 59952 poke sb+24,0
  70. 59955 next
  71. 59980 return
  72.  
  73.  
  74. 60000 print "                   {reverse on}{cyan} "
  75. 60010 print " fff ooo l        {reverse on}{191}{reverse off}B{191}     l   ooo w   w"
  76. 60020 print " f   o o l       {reverse on}{191}{reverse off} B {191}    l   o o w   w"
  77. 60030 print " ff  o o l      {reverse on}{191}{reverse off}  B  {191}   l   o o w w w"
  78. 60040 print " f   o o l     {reverse on}{191}{reverse off}   B   {191}  l   o o w w w"
  79. 60050 print " f   ooo lll  {reverse on}{191}{reverse off}    B    {191} lll ooo ww ww"
  80. 60060 print "             {reverse on}{191}{reverse off}     B     {191}"
  81. 60070 print "            {reverse on}{191}{reverse off}      B      {191}"
  82. 60080 print "           {reverse on}{191}{reverse off}       B       {191}"
  83. 60090 print "          {reverse on}{191}{reverse off}        B        {191}"
  84. 60100 print "         {reverse on}{191}{reverse off}         B         {191}"
  85. 60110 print "        {reverse on}{191}{reverse off}          B          {191}"
  86. 60120 print "       {reverse on} {reverse off}{096}{096}{096}{096}{096}{096}{096}{096}{096}{096}{096}{123}{096}{096}{096}{096}{096}{096}{096}{096}{096}{096}{096}{reverse on} "
  87. 60130 print "        {191}          B          {reverse on}{191}"
  88. 60140 print "         {191}         B         {reverse on}{191}"
  89. 60150 print "          {191}        B        {reverse on}{191}"
  90. 60160 print "           {191}       B       {reverse on}{191}"
  91. 60170 print "            {191}      B      {reverse on}{191}"
  92. 60180 print "             {191}     B     {reverse on}{191}"
  93. 60190 print "              {191}    B    {reverse on}{191}"
  94. 60200 print "               {191}   B   {reverse on}{191}"
  95. 60210 print "                {191}  B  {reverse on}{191}"
  96. 60220 print "                 {191} B {reverse on}{191}"
  97. 60230 print "                  {191}B{reverse on}{191}"
  98. 60240 print "tasti iokl         {reverse on} {reverse off} {reverse on}by gdm soft";
  99. 60250 return
  100.  
  101. 60300 fh(1)=12:fh(2)=14:fh(3)=11:fh(4)=8
  102. 60310 fl(1)=43:fl(2)=24:fl(3)=48:fl(4)=97
  103. 60320 t$(1)=" {down}{left*2}  {down}{left*3}   {down}{left*4}    {down}{left*5}     "
  104. 60330 t$(1)=t$(1)+"{down}{left*6}      {down}{left*7}       {down}{left*8}        "
  105. 60340 t$(1)=t$(1)+"{down}{left*9}         {down}{left*10}          "
  106. 60350 t$(2)=" {down}{left}  {down}{left*2}   {down}{left*3}    {down}{left*4}     "
  107. 60360 t$(2)=t$(2)+"{down}{left*5}      {down}{left*6}       {down}{left*7}        {down}{left*8}         "
  108. 60370 t$(2)=t$(2)+"{down}{left*9}          "
  109. 60380 t$(3)=" {up}{left*2}  {up}{left*3}   {up}{left*4}    {up}{left*5}     "
  110. 60390 t$(3)=t$(3)+"{up}{left*6}      {up}{left*7}       {up}{left*8}        "
  111. 60400 t$(3)=t$(3)+"{up}{left*9}         {up}{left*10}          "
  112. 60410 t$(4)=" {up}{left}  {up}{left*2}   {up}{left*3}    {up}{left*4}     "
  113. 60420 t$(4)=t$(4)+"{up}{left*5}      {up}{left*6}       {up}{left*7}        {up}{left*8}         "
  114. 60430 t$(4)=t$(4)+"{up}{left*9}          "
  115. 60440 px(1)=18:px(2)=20:px(3)=18:px(4)=20
  116. 60450 py(1)=2:py(2)=2:py(3)=22:py(4)=22
  117. 60455 s(1)=1:s(2)=2:s(3)=3:s(4)=3:s(5)=4
  118. 60460 co$(1)="{yellow}":co$(2)="{red}":co$(3)="{green}":co$(4)="{blue}"
  119. 60470 poke 53281,0:er=0:vt=3
  120. 60498 return
  121.  
  122. 60499 rem SID BASE
  123. 60500 SB = 54272
  124. 60530 poke SB+24,0: rem volume 0-15
  125. 60550 poke SB+2,128: poke SB+3,8
  126. 60560 poke SB+5,97: poke SB+6,200
  127. 60570 poke SB+4,65
  128. 60580 return
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top