set kernel_options no_blank_lines set romsize 16kSC title_screen a=0 : b=0 : c=0 : d=0 : e=0 : f=0 : g=0 : h=0 t{1}=1 playfield: ................................ ................................ ................................ .....................X.......... .......XXX.X..XXX.XX.X.......... ........X..XX..X..X..X..XX...... ...........X......X..X.XX....... ................................ ................................ ..........XX..X..XX.XX.......... ...........XX.X..XX.XX.......... ..............XX................ ................................ ................................ ................................ end const pfres=16 title_screen_music COLUPF=132 drawscreen if switchleftb then u{7}=1 else u{7}=0 if joy0fire then t{0}=1 if !joy0fire && t{0} then t{0}=0 : goto beginning data treble_music 25, 27, 30, 30, 27, 30, 27, 25, 27, 30 30, 27, 30, 27, 25, 30 end data treble_length 79, 79, 159, 19, 19, 19, 19, 19, 19, 39 19, 19, 19, 19, 39, 39 end a=a+1 h=h+1 if h>8 then e=0 else e=6 if h>treble_length[g] then h=0 : g=g+1 : f=f+1 if g>15 then g=0 : f=0 AUDV1=b : AUDF1=c : AUDC1=d AUDV0=e : AUDF0=treble_music[f] : AUDC0=4 if a>=0 then b=6 : c=15 : d=10 if a>8 then b=0 if a>20 then b=6 : c=15 : d=10 if a>28 then b=0 if a>40 then b=6 : c=8 : d=8 if a>48 then b=0 if a>60 && !t{1} then b=6 : c=16 : d=10 if a>60 && t{1} then b=6 : c=20 : d=10 if a>79 then a=0 if a=60 && t{1} then t{1}=0 : goto title_screen_music if a=60 && !t{1} then t{1}=1 goto title_screen_music beginning score=0 v=0 : k=0 COLUPF=200 playfield: X..........X.................... X..........X.................... X..........X.................... X..........X.................... X..........X.................... X..........X.................... X..........X.................... X..........X.................... X..........X.................... X..........X.................... X..........X.................... X..........X.................... X..........X.................... X..........X.................... XXXXXXXXXXXX.................... end o=0 : t=0 : z=0 u{0}=0 : u{1}=0 : u{2}=0 s=0 : a=(rand/32)+1 get_shape pfhline 18 0 21 off : pfhline 18 1 21 off : pfhline 18 2 21 off w=1 get_shape_a if u{6} then a=(rand/32)+1 drawscreen if a=1 then c=5 : d=0 : e=6 : f=0 : g=7 : h=0 : i=8 : j=0 if a=2 then c=5 : d=1 : e=6 : f=1 : g=6 : h=0 : i=7 : j=1 if a=3 then c=5 : d=1 : e=6 : f=1 : g=6 : h=0 : i=7 : j=0 if a=4 then c=5 : d=0 : e=6 : f=0 : g=6 : h=1 : i=7 : j=1 if a=5 then c=5 : d=1 : e=6 : f=2 : g=5 : h=0 : i=5 : j=2 if a=6 then c=5 : d=2 : e=6 : f=0 : g=6 : h=1 : i=6 : j=2 if a=7 then c=5 : d=0 : e=6 : f=0 : g=5 : h=1 : i=6 : j=1 if a=8 && u{6} then goto get_shape_a if a=8 && !u{6} then a=(rand/32)+1 : goto get_shape_a get_next_shape if !u{6} then n=(rand/32)+1 if n=1 then pfpixel 18 0 on : pfpixel 19 0 on : pfpixel 20 0 on : pfpixel 21 0 on if n=2 then pfpixel 18 1 on : pfpixel 19 1 on : pfpixel 19 0 on : pfpixel 20 1 on if n=3 then pfpixel 18 1 on : pfpixel 19 1 on : pfpixel 19 0 on : pfpixel 20 0 on if n=4 then pfpixel 18 0 on : pfpixel 19 0 on : pfpixel 19 1 on : pfpixel 20 1 on if n=5 then pfpixel 18 1 on : pfpixel 19 2 on : pfpixel 18 0 on : pfpixel 18 2 on if n=6 then pfpixel 18 2 on : pfpixel 19 0 on : pfpixel 19 1 on : pfpixel 19 2 on if n=7 then pfpixel 18 0 on : pfpixel 19 0 on : pfpixel 18 1 on : pfpixel 19 1 on if !u{7} then pfhline 18 0 21 off : pfhline 18 1 21 off : pfhline 18 2 21 off drawscreen if n=8 then goto get_next_shape get_shape_b if pfread(c, d) then t{0}=0 : goto game_over_setup bank4 if pfread(e, f) then t{0}=0 : goto game_over_setup bank4 if pfread(g, h) then t{0}=0 : goto game_over_setup bank4 if pfread(i, j) then t{0}=0 : goto game_over_setup bank4 goto main bank2 bank 2 main if !p{7} then AUDV1=0 : AUDV0=0 scorecolor=14 if joy0down then b=b+4 pfpixel c d on : pfpixel e f on : pfpixel g h on : pfpixel i j on drawscreen b=b+1 if b>30 then b=0 : goto down if p{7} then l=l+1 if p{7} && l>10 then l=0 : p{7}=0 if joy0fire then m=m+1 if joy0fire && m>6 then m=0 : goto turn if joy0right then k=k+1 if joy0right && k>6 then k=0 : gosub right if joy0left then m=m+1 if joy0left && m>6 then m=0 : gosub left goto main right pfpixel c d off : pfpixel e f off : pfpixel g h off : pfpixel i j off c=c+1 : e=e+1 : g=g+1 : i=i+1 if pfread(c, d) then c=c-1 : e=e-1 : g=g-1 : i=i-1 if pfread(e, f) then c=c-1 : e=e-1 : g=g-1 : i=i-1 if pfread(g, h) then c=c-1 : e=e-1 : g=g-1 : i=i-1 if pfread(i, j) then c=c-1 : e=e-1 : g=g-1 : i=i-1 return left pfpixel c d off : pfpixel e f off : pfpixel g h off : pfpixel i j off c=c-1 : e=e-1 : g=g-1 : i=i-1 if pfread(c, d) then c=c+1 : e=e+1 : g=g+1 : i=i+1 if pfread(e, f) then c=c+1 : e=e+1 : g=g+1 : i=i+1 if pfread(g, h) then c=c+1 : e=e+1 : g=g+1 : i=i+1 if pfread(i, j) then c=c+1 : e=e+1 : g=g+1 : i=i+1 return turn pfpixel c d off : pfpixel e f off : pfpixel g h off : pfpixel i j off w=w+1 p{7}=1 : AUDV0=6 : AUDF0=2 : AUDC0=15 if w>4 then w=1 turn_2 if a=1 && w=2 then e=e-1 : f=f+1 : g=g-2 : h=h+2 : i=i-3 : j=j+3 if a=1 && w=3 then w=1 : e=e+1 : f=f-1 : g=g+2 : h=h-2 : i=i+3 : j=j-3 if a=2 && w=2 then c=c+1 : d=d+1 if a=2 && w=3 then g=g-1 : h=h+1 if a=2 && w=4 then i=i-1 : j=j-1 if a=2 && w=1 then c=c-1 : d=d-1 : g=g+1 : h=h-1 : i=i+1 : j=j+1 if a=3 && w=1 then g=g+1 : i=i+1 : j=j-2 if a=3 && w=2 then g=g-1 : i=i-1 : j=j+2 if a=3 && w=3 then g=g+1 : i=i+1 : j=j-2 if a=3 && w=4 then g=g-1 : i=i-1 : j=j+2 if a=4 && w=2 then e=e+1 : c=c+1 : d=d+2 if a=4 && w=3 then w=1 : e=e-1 : c=c-1 : d=d-2 if a=5 && w=2 then c=c+2 : d=d+1 : g=g+2 : h=h+1 if a=5 && w=3 then i=i+1 : j=j-2 : e=e+1 : f=f-2 if a=5 && w=4 then c=c-2 : d=d-1 : e=e-1 : f=f+1 : i=i-1 : j=j+2 if a=5 && w=1 then f=f+1 : g=g-2 : h=h-1 if a=6 && w=2 then e=e-2 : f=f+1 : g=g-2 : h=h+1 if a=6 && w=3 then c=c-1 : d=d-2 : i=i-1 : j=j-2 if a=6 && w=4 then d=d+1 : e=e+1 : g=g+2 : h=h-1 : i=i+1 : j=j+2 if a=6 && w=1 then c=c+1 : d=d+1 : e=e+1 : f=f-1 turning_again if pfread(c, d) then w=w-1 : goto turn_3 if pfread(e, f) then w=w-1 : goto turn_3 if pfread(g, h) then w=w-1 : goto turn_3 if pfread(i, j) then w=w-1 : goto turn_3 drawscreen goto main turn_3 if a=1 && w=0 then w=2 : e=e-1 : f=f+1 : g=g-2 : h=h+2 : i=i-3 : j=j+3 if a=1 && w=1 then e=e+1 : f=f-1 : g=g+2 : h=h-2 : i=i+3 : j=j-3 if a=2 && w=0 then w=4 : c=c+1 : d=d+1 : g=g-1 : h=h+1 : i=i-1 : j=j-1 if a=2 && w=3 then i=i-1 : j=j-1 if a=2 && w=2 then g=g+1 : h=h-1 if a=2 && w=1 then c=c-1 : d=d-1 if a=3 && w=0 then w=4 : g=g-1 : i=i-1 : j=j+2 if a=3 && w=3 then g=g+1 : i=i+1 : j=j-2 if a=3 && w=2 then g=g-1 : i=i-1 : j=j+2 if a=3 && w=4 then g=g+1 : i=i+1 : j=j-2 if a=4 && w=0 then w=2 : e=e+1 : c=c+1 : d=d+2 if a=4 && w=1 then e=e-1 : c=c-1 : d=d-2 if a=5 && w=0 then w=4 : f=f-1 : g=g+2 : h=h+1 if a=5 && w=1 then c=c-2 : d=d-1 : g=g-2 : h=h-1 if a=5 && w=2 then i=i-1 : j=j+2 : e=e-1 : f=f+2 if a=5 && w=3 then c=c+2 : d=d+1 : e=e+1 : f=f-1 : i=i+1 : j=j-2 if a=6 && w=0 then w=4 : c=c-1 : d=d-1 : e=e-1 : f=f+1 if a=6 && w=1 then e=e+2 : f=f-1 : g=g+2 : h=h-1 if a=6 && w=2 then c=c+1 : d=d+2 : i=i+1 : j=j+2 if a=6 && w=3 then d=d-1 : e=e-1 : g=g-2 : h=h+1 : i=i-1 : j=j-2 drawscreen goto main down pfpixel c d off : pfpixel e f off : pfpixel g h off : pfpixel i j off d=d+1 : f=f+1 : h=h+1 : j=j+1 if pfread(c, d) then d=d-1 : f=f-1 : h=h-1 : j=j-1 : goto check_line bank3 if pfread(e, f) then d=d-1 : f=f-1 : h=h-1 : j=j-1 : goto check_line bank3 if pfread(g, h) then d=d-1 : f=f-1 : h=h-1 : j=j-1 : goto check_line bank3 if pfread(i, j) then d=d-1 : f=f-1 : h=h-1 : j=j-1 : goto check_line bank3 goto main bank 3 check_line r=14 rem drawscreen pfpixel c d on : pfpixel e f on : pfpixel g h on : pfpixel i j on check_line_2 o=o+1 : l=l+1 if l>10 then AUDV0=6 : AUDC0=14 : AUDF0=31 else AUDV0=0 : l=11 drawscreen if o=10 && r=0 && pfread(o, r) then u{2}=1 if o=10 && r=1 && pfread(o, r) then u{1}=1 if o=10 && r=2 && pfread(o, r) then u{0}=1 if o=10 && r=3 && pfread(o, r) then t{7}=1 if o=10 && r=4 && pfread(o, r) then t{6}=1 if o=10 && r=5 && pfread(o, r) then t{5}=1 if o=10 && r=6 && pfread(o, r) then t{4}=1 if o=10 && r=7 && pfread(o, r) then t{3}=1 if o=10 && r=8 && pfread(o, r) then t{2}=1 if o=10 && r=9 && pfread(o, r) then t{0}=1 if o=10 && r=10 && pfread(o,r) then var0=1 if o=10 && r=11 && pfread(o,r) then var1=1 if o=10 && r=12 && pfread(o,r) then var2=1 if o=10 && r=13 && pfread(o,r) then var3=1 if o<11 && pfread(o, r) then goto check_line_2 r=r-1 : o=0 if r>0 then goto check_line_2 if u{6} then n=a else a=n if u{6} then u{6}=0 else u{6}=1 if t>0 then l=0 : goto erase_line if u{0} then l=0 : goto erase_line if u{1} then l=0 : goto erase_line if u{2} then l=0 : goto erase_line if var0=1 then goto erase_line if var1=1 then goto erase_line if var2=1 then goto erase_line if var3=1 then goto erase_line rem if t>0 && o=10 then goto erase_line rem if u>0 && o=10 then goto erase_line l=0 t=0 : u{0}=0 : u{1}=0 : u{2}=0 : o=0 AUDV1=0 u{6}=0 goto get_shape bank1 erase_line if var3=1 && var2=1 && var1=1 && t{0} then u{4}=1 : y=1 : x=11 : goto erase_line_1a bank4 if var2=1 && var1=1 && t{0} && t{2} then u{4}=1 : y=1 : x=10 : goto erase_line_1a bank4 if var1=1 && t{0} && t{2} && t{3} then u{4}=1 : y=1 : x=9 : goto erase_line_1a bank4 if t{0} && t{2} && t{3} && t{4} then u{4}=1 : y=1 : x=8 : goto erase_line_1a bank4 if t{2} && t{3} && t{4} && t{5} then u{4}=1 : y=1 : x=7 : goto erase_line_1a bank4 if t{3} && t{4} && t{5} && t{6} then u{4}=1 : y=1 : x=6 : goto erase_line_1a bank4 if t{4} && t{5} && t{6} && t{7} then u{4}=1 : y=1 : x=5 : goto erase_line_1a bank4 if t{5} && t{6} && t{7} && u{0} then u{4}=1 : y=1 : x=4 : goto erase_line_1a bank4 if t{6} && t{7} && u{0} && u{1} then u{4}=1 : y=1 : x=3 : goto erase_line_1a bank4 if t{7} && u{0} && u{1} && u{2} then u{4}=1 : y=1 : x=2 : goto erase_line_1a bank4 if var3=1 && var2=1 && var0=1 then u{4}=1 : y=1 : x=12 : goto erase_line_1a bank4 if var3=1 && var1=1 && t{0} then u{4}=1 : y=1 : x=12 : goto erase_line_1a bank4 if var2=1 && var1=1 && t{2} then u{4}=1 : y=1 : x=11 : goto erase_line_1a bank4 if var2=1 && t{0} && t{2} then u{4}=1 : y=1 : x=11 : goto erase_line_1a bank4 if var1=1 && var0=1 && t{2} then u{4}=1 : y=1 : x=10 : goto erase_line_1a bank4 if var1=1 && t{0} && t{2} then u{4}=1 : y=1 : x=10 : goto erase_line_1a bank4 if var0=1 && t{0} && t{3} then u{4}=1 : y=1 : x=9 : goto erase_line_1a bank4 if var0=1 && t{2} && t{3} then u{4}=1 : y=1 : x=9 : goto erase_line_1a bank4 if t{0} && t{2} && t{4} then u{4}=1 : y=1 : x=8 : goto erase_line_1a bank4 if t{0} && t{3} && t{4} then u{4}=1 : y=1 : x=8 : goto erase_line_1a bank4 if t{2} && t{4} && t{5} then u{4}=1 : y=1 : x=7 : goto erase_line_1a bank4 if t{2} && t{3} && t{5} then u{4}=1 : y=1 : x=7 : goto erase_line_1a bank4 if t{3} && t{5} && t{6} then u{4}=1 : y=1 : x=6 : goto erase_line_1a bank4 if t{3} && t{4} && t{6} then u{4}=1 : y=1 : x=6 : goto erase_line_1a bank4 if t{4} && t{5} && t{7} then u{4}=1 : y=1 : x=5 : goto erase_line_1a bank4 if t{4} && t{6} && t{7} then u{4}=1 : y=1 : x=5 : goto erase_line_1a bank4 if t{5} && t{7} && u{0} then u{4}=1 : y=1 : x=4 : goto erase_line_1a bank4 if t{5} && t{6} && u{0} then u{4}=1 : y=1 : x=4 : goto erase_line_1a bank4 if t{6} && u{0} && u{1} then u{4}=1 : y=1 : x=3 : goto erase_line_1a bank4 if t{6} && t{7} && u{1} then u{4}=1 : y=1 : x=3 : goto erase_line_1a bank4 if t{7} && u{1} && u{2} then u{4}=1 : y=1 : x=2 : goto erase_line_1a bank4 if t{7} && u{0} && u{2} then u{4}=1 : y=1 : x=2 : goto erase_line_1a bank4 if var3=1 && var1=1 then u{3}=1 : y=1 : x=12 if var3=1 && var0=1 then u{3}=1 : y=2 : x=12 if var2=1 && var0=1 then u{3}=1 : y=1 : x=11 if var2=1 && t{0} then u{3}=1 : y=1 : x=11 if var1=1 && t{0} then u{3}=1 : y=1 : x=10 if var1=1 && t{2} then u{3}=1 : y=2 : x=10 if var0=1 && t{2} then u{3}=1 : y=1 : x=9 if var0=1 && t{3} then u{3}=1 : y=2: x=9 if t{0} && t{3} then u{3}=1 : y=1 : x=8 if t{0} && t{4} then u{3}=1 : y=2 : x=7 if t{2} && t{4} then u{3}=1 : y=1 : x=7 if t{2} && t{5} then u{3}=1 : y=2 : x=6 if t{3} && t{5} then u{3}=1 : y=1 : x=6 if t{3} && t{6} then u{3}=1 : y=2 : x=5 if t{4} && t{6} then u{3}=1 : y=1 : x=5 if t{4} && t{7} then u{3}=1 : y=2 : x=4 if t{5} && t{7} then u{3}=1 : y=1 : x=4 if t{5} && u{0} then u{3}=1 : y=2 : x=3 goto erase_line_1a bank4 bank 4 erase_line_1a if var4=1 then pfhline 1 14 10 off : drawscreen : z=z+1 : p=13 if var3=1 then pfhline 1 13 10 off : drawscreen : z=z+1 : p=12 if var2=1 then pfhline 1 12 10 off : drawscreen : z=z+1 : p=11 if var1=1 then pfhline 1 11 10 off : drawscreen : z=z+1 : p=10 if var0=1 then pfhline 1 10 10 off : drawscreen : z=z+1 : p=9 if t{0} then pfhline 1 9 10 off : drawscreen : z=z+1 : p=8 if t{2} then pfhline 1 8 10 off : drawscreen : z=z+1 : p=7 if t{3} then pfhline 1 7 10 off : drawscreen : z=z+1 : p=6 if t{4} then pfhline 1 6 10 off : drawscreen : z=z+1 : p=5 if t{5} then pfhline 1 5 10 off : drawscreen : z=z+1 : p=4 if t{6} then pfhline 1 4 10 off : drawscreen : z=z+1 : p=3 if t{7} then pfhline 1 3 10 off : drawscreen : z=z+1 : p=2 if u{0} then pfhline 1 2 10 off : drawscreen : z=z+1 : p=1 if u{1} then pfhline 1 1 10 off : drawscreen : z=z+1 : p=0 if u{2} then pfhline 1 0 10 off : drawscreen : z=z+1 erase_line_1b drawscreen q=1 : rem pfpixel c d on : pfpixel e f on : pfpixel g h on : pfpixel i j on move_blocks_down if q>10 && u{4} then x=x-1 if q>10 && u{3} then x=x-1 if q>10 then p=p-1 : q=1 if u{4} && pfread(q, x) then pfpixel q x off : x=x+y : pfpixel q x on : x=x-y if u{3} && pfread(q, x) then pfpixel q x off : x=x+y : pfpixel q x on : x=x-y if pfread(q, p) then pfpixel q p off : p=p+z : pfpixel q p on : p=p-z l=l+1 if l<31 then AUDV0=6 : AUDF0=l : AUDC0=6 if l>30 then AUDV0=0 drawscreen q=q+1 if p=0 then q=11 : x=0 : goto move_blocks_down_2 goto move_blocks_down move_blocks_down_2 q=q-1 if u{4} && pfread(q, x) then pfpixel q x off : x=x+y : pfpixel q x on : x=x-y if u{3} && pfread(q, x) then pfpixel q x off : x=x+y : pfpixel q x on : x=x-y if pfread(q, p) then pfpixel q p off : p=p+z : pfpixel q p on : p=p-z if q=1 then goto move_blocks_down_2a goto move_blocks_down_2 move_blocks_down_2a score=score+z v=v+z rem drawscreen if v<10 then COLUPF=200 if v>9 then COLUPF=30 if v>19 then COLUPF=56 if v>29 then COLUPF=68 if v>39 then COLUPF=84 if v>49 then COLUPF=132 if v>59 then v=0 : COLUPF=200 t=0 : k=0 : m=0 : l=0 u{0}=0 : u{1}=0 : u{2}=0 : u{3}=0 : u{4}=0 : u{5}=0 : u{6}=0 o=0 : z=0 : q=0 var0=0 : var1=0 : var2=0 : var3=0 drawscreen goto get_shape bank1 game_over_setup playfield: XXXXXXXXXXXX.................... XXXXXXXXXXXX..XX..X...XXX..XXX.. XXXXXXXXXXXX.X...X.X.X.X.X.X.... XXXXXXXXXXXX.X.X.XXX.X.X.X.XXX.. XXXXXXXXXXXX.X.X.X.X.X...X.X.... XXXXXXXXXXXX..XX.X.X.X...X.XXX.. XXXXXXXXXXXX.................... XXXXXXXXXXXX.................... XXXXXXXXXXXX.................... XXXXXXXXXXXX..X..X.X.XXX.XX..X.. XXXXXXXXXXXX.X.X.X.X.X...X.X.X.. XXXXXXXXXXXX.X.X.X.X.XXX.XX..X.. XXXXXXXXXXXX.X.X.X.X.X...X.X.... XXXXXXXXXXXX..X...X..XXX.X.X.X.. XXXXXXXXXXXX.................... end e=19 : t{1}=1 game_over if !t{1} then AUDV0=0 if t{1} then AUDV0=6 : AUDC0=12 : AUDF0=e f=f+1 if f>10 then e=20 if f>20 then e=19 if f>30 then e=20 if f>40 then e=19 if f>50 then e=17 if f>60 then e=19 if f>70 then e=20 if f>80 then e=19 if f>100 then f=0 : t{1}=0 c=c+1 if c>5 then c=0 : d=d+2 COLUPF=d if joy0fire && !t{1} then t{0}=1 if !joy0fire && t{0} then goto beginning bank1 drawscreen goto game_over