set romsize 8k set kernel_options no_blank_lines the_beginning_of_the_program v=0 : w=0 player0x=78 : player0y=104 dim sc1=score dim sc2=score+1 dim life=score+2 life=$A3 player1y=200 playfield: ................................ ................................ ......X.................X....... ..X...X.................X....... ..X...X......XXXXX.X..X.X.XXXX.. ..XXXXX.XXXX.X.X.X.X..X.X....X.. ......X......X.X.X.X..X.X.XXXX.. ......X......X.X.X.X..X.X.X..X.. ......X......X.X.X..XX..X.XXXX.. ................................ ................................ ................................ end l=0 : n=0 : p=0 : q=0 : a=0 : y=0 : missile1y=200 z=$EA title_screen rem music data (l, n ,p, q, a) l=l+1 : m=m+1 if l>15 then l=0 : a=a+1 : n=n+1 : y=y+1 : q=q+1 : p=p+1 if y>103 then y=0 : l=0 : q=0 : n=0 : p=0 : a=0 AUDV1=5 : AUDC1=treblechan[p] : AUDF1=treble_notes[q] AUDC0=basschan[a] : AUDF0=bass_notes[n] if !l{3} then AUDV0=5 else AUDV0=0 if joy0fire && !w{0} then w{0}=1 if !joy0fire && w{0} then w=0 : p=0 : d=0 : goto get_enemy ballx=0 drawscreen player0: %00011000 %00001000 %00011010 %00111110 %01101100 %00011110 %00011110 end player1: %00010100 %00010100 %00011100 %01111111 %00011100 %00011100 end goto title_screen get_enemy u=0 t=10 i=(rand/64)+1 pfhline 0 11 31 off b=0 : f=0 begin_game life=$A3 sc1=0 sc2=0 if b=8 then b=0 : gosub get_blank_line if f=8 then goto level_reveal AUDV1=0 AUDV0=4 : AUDC0=12 : AUDF0=t drawscreen pfscroll up : b=b+1 s=s+1 if s>7 then s=0 : t=t+1 goto begin_game get_blank_line f=f+1 pfhline 0 11 31 off if d=i && w=0 && sc2<7 then player1x=(rand/4)+30 : player1y=95 : w=1 if d=i && w=0 && sc2=7 then temp2=(a+9)*4 : player1x=temp2 : player1y=95 : w=1 drawscreen return get_wall if sc2<7 then a=(rand/8) if a<3 then a=a+3 if a>28 then a=a-28 gggg c=a+1 : e=a-1 pfhline 0 11 31 on : pfhline e 11 c off b=0 : d=d+1 drawscreen level_reveal player0y=player0y-1 : b=b+1 : player1y=player1y-1 : COLUP1=0 if d=6 && sc2<7 then d=0 : f=0 : AUDV0=0 : s=0 : t=0 : k=0 : goto level_main if d=12 && sc2=7 then d=0 : f=0 : AUDV0=0 : s=0 : t=0 : k=0 : goto level_main drawscreen pfscroll up AUDV0=4 : AUDC0=12 : AUDF0=t s=s+1 if s>7 then s=0 : t=t+1 if b=8 && sc2<7 then gosub get_blank_line if b=16 && sc2<7 then gosub get_blank_line : goto get_wall if b=8 && sc2=7 then gosub get_blank_line : goto gggg if b=16 && sc2=7 then gosub get_blank_line : goto gggg goto level_reveal level_main COLUP1=$AA if g>20 then g=0 player0: %00011000 %00001000 %00011010 %00111110 %01101100 %00011110 %00011110 end if g>10 then player0: %01000010 %00100100 %00011010 %00111110 %01101100 %00011110 %00011110 end if collision(player0, missile1) && p<100 then p=155 if life=$A0 && p=101 then life=0 : goto the_beginning_of_the_program if p>100 then AUDV1=5 : AUDC1=14 : AUDF1=p : p=p-1 if p=100 then life=life-1 : p=0 if switchreset then goto the_beginning_of_the_program if joy0left then goto test_left goto test_right test_left h{0}=0 q=1 x=(player0x-17)/4 : y=(player0y-6)/8 if pfread(x, y) then goto test_right y=player0y/8 if pfread(x, y) then goto test_right if player0x<17 then goto test_right : rem this is stupid! g=g+1 player0x=player0x-1 test_right if joy0right then goto test_right_2 goto test_up test_right_2 h{0}=1 q=2 x=(player0x-10)/4 : y=(player0y-6)/8 if pfread(x, y) then goto test_up y=player0y/8 if pfread(x, y) then goto test_up if player0x>137 then goto test_up : rem this is stupid! g=g+1 player0x=player0x+1 test_up if joy0up then goto test_up_2 goto test_down test_up_2 q=3 x=(player0x-16)/4 : y=(player0y-8)/8 if pfread(x, y) then goto test_down x=(player0x-11)/4 : y=(player0y-8)/8 if pfread(x, y) then goto test_down if player0y<9 then goto test_down g=g+1 player0y=player0y-1 test_down if joy0down then goto test_down_2 goto rest_of_main test_down_2 q=4 x=(player0x-16)/4 : y=(player0y+1)/8 if pfread(x, y) then goto rest_of_main x=(player0x-11)/4 : y=(player0y+1)/8 if pfread(x, y) then goto rest_of_main g=g+1 player0y=player0y+1 rest_of_main if !joy0up && !joy0down && !joy0left && !joy0right then player0: %00011000 %00001000 %00011010 %00111110 %01101100 %00011110 %00011110 end if j{0} && !joy0up && !joy0down && !joy0left && !joy0right then player0: %01101100 %00100100 %00011010 %00111110 %01101100 %00011110 %00011110 end if joy0fire && !j{1} then ballx=player0x+4 : bally=player0y-4 : n=q : l=h : j{0}=1 : j{1}=1 : j{2}=1 : ballheight=1 CTRLPF=$11 if j{2} && k<8 then k=k+1 : AUDC0=1 : AUDF0=k+20 if j{2} && k>7 then k=0 : j{2}=0 if !j{0} then goto j_0_is_not_on if l{0} && n<3 then ballx=ballx+2 if !l{0} && n<3 then ballx=ballx-2 if n=4 then bally=bally+2 if n=3 then bally=bally-2 if collision(ball, playfield) then j{0}=0 : j{2}=0 : bally=101 : k=0 if bally>100 || bally<7 then j{0}=0 : bally=101 : k=0 j_0_is_not_on if t=1 then s=s+1 if t=1 then AUDC0=12 : AUDF0=s if t=1 && s>19 then t=0 : s=0 if k=0 && s=0 then AUDV0=0 else AUDV0=4 if collision(ball, player1) then player1y=200 : bally=101 : k=0 : t=1 : s=1 : j{0}=0 : j{2}=0 if collision(ball, missile1) then missile1y=200 : bally=101 : k=0 : t=1 : p=2 : s=1 : j{0}=0 : j{2}=0 if p=2 then AUDV1=0 if switchreset && !v{0} then v{0}=1 if v{0} && !switchreset then b=1 : d=0 : goto the_beginning_of_the_program if player0y>92 && !j{0} && p=0 then player0y=104 : score=score+100 : b=0 : d=0 : w=0 : k=0 : j=0 : u=0 : t=10 : q=0 : p=0 : AUDV1=0 : player1y=200 : missile1y=200 : i=(rand/64)+1 : goto level_reveal if j{1} && bally=101 && !joy0fire then j{1}=0 rem enemy firing if p>99 then goto enemy_mm v=player1y-16 : c=player1y+16 if player0y>v && player0yplayer1x && p=0 then missile1y=player1y-2 : missile1x=player1x+5 : r=1 : p=1 if player0x<=player1x && p=0 then missile1y=player1y-2 : missile1x=player1x+5 : r=2 : p=1 enemy_missile_not_fired if p=1 then AUDV1=4 : AUDC1=1 : AUDF1=(d/8)+10 if p=0 then missile1y=200 : r=0 : AUDV1=0 if missile1x<20 || missile1x>144 then missile1x=player1x+5 : missile1y=player1y-2 : missile1height=1 : q=0 : p=0 : AUDV1=0 if r=1 then missile1x=missile1x+1 : d=d+1 if r=2 then missile1x=missile1x-1 : d=d+1 enemy_mm drawscreen goto level_main data treble_notes 10, 10, 10, 10, 7, 7, 7, 7 10, 10, 10, 10, 7, 7, 7, 7 10, 10, 10, 10, 8, 8, 8, 8 10, 10, 10, 10, 8, 8, 8, 8 13, 13, 13, 13, 13, 13, 14, 15 16, 16, 16, 16, 16, 16, 16, 16 15, 18, 18, 15, 15, 18, 18, 15 15, 18, 18, 15, 15, 13, 13, 16 16, 16, 16, 16, 16, 16, 16, 16 9, 9, 8, 8, 6, 6, 7, 7 9, 8, 6, 7, 9, 8, 6, 7 15, 20, 15, 20, 17, 20, 17, 20 19, 20, 19, 20, 20, 19, 20, 17 end data treblechan 15, 15, 15, 15, 15, 15, 15, 15 14, 14, 14, 14, 14, 14, 14, 14 15, 15, 15, 15, 15, 15, 15, 15 14, 14, 14, 14, 14, 14, 14, 14 1, 1, 1, 1, 1, 1, 1, 1 1, 1, 1, 1, 1, 1, 1, 1 1, 1, 1, 1, 1, 1, 1, 1 1, 1, 1, 1, 1, 1, 1, 1 1, 1, 1, 1, 1, 1, 1, 1 12, 12, 12, 12, 12, 12, 12, 12 12, 12, 12, 12, 12, 12, 12, 12 12, 12, 12, 12, 12, 12, 12, 12 12, 12, 12, 12, 12, 12, 12, 12 end data bass_notes 11, 11, 11, 15, 11, 11, 11, 15 11, 11, 11, 15, 11, 11, 11, 15 11, 11, 11, 15, 11, 11, 11, 15 11, 11, 11, 15, 11, 11, 11, 15 11, 11, 11, 15, 11, 11, 11, 15 11, 11, 11, 15, 11, 11, 11, 15 12, 12, 19, 15, 12, 12, 19, 15 12, 12, 19, 15, 12, 12, 19, 15 11, 11, 11, 15, 11, 11, 11, 15 11, 11, 11, 15, 11, 11, 11, 15 11, 11, 11, 15, 11, 11, 11, 15 11, 11, 11, 15, 11, 11, 11, 15 11, 11, 11, 15, 11, 11, 11, 15 end data basschan 6, 6, 8, 6, 6, 6, 8, 6 6, 6, 8, 6, 6, 6, 8, 6 6, 6, 8, 6, 6, 6, 8, 6 6, 6, 8, 6, 6, 6, 8, 6 6, 6, 8, 6, 6, 6, 8, 6 6, 6, 8, 6, 6, 6, 8, 6 6, 6, 8, 6, 6 ,6, 8, 6 6, 6, 8, 6, 6 ,6, 8, 6 6, 6, 8, 6, 6, 6, 8, 6 6, 6, 8, 6, 6, 6, 8, 6 6, 6, 8, 6, 6, 6, 8, 6 6, 6, 8, 6, 6, 6, 8, 6 6, 6, 8, 6, 6, 6, 8, 6 end bank 2 vblank REFP0=0 if h{0} then REFP0=8 NUSIZ1=$20 scorecolor=z PF0=$ff COLUPF=z COLUP0=$0A COLUP1=$AA return