set kernel_options no_blank_lines set romsize 8k t_s_p_f playfield: X....XXX..XX...XXX.X..X.XXX....X X...X....X..X.X....X..X.X..X...X X...X.XX.X..X..XX..X..X.XXX....X X...X..X.X..X....X.X..X.X..X...X X....XX...XX..XXX...XX..XXX....X X..............................X X..............XX..............X X.............X..X.............X X...............X..............X X..............X...............X X.............XXXX.............X end lives=64 AUDV1=0 : AUDV0=0 player1x=0 : player1y=0 : player0x=0 : player0y=0 : missile1x=0 : missile1y=0 ballx=0 : bally=0 : c=0 : d=0 : e=0 title_screen dim level=a if switchbw then s{5}=1 else s{5}=0 if switchrightb then w{0}=1 else w{0}=0 if switchleftb then s{6}=0 else s{6}=1 if joy0fire then score=0 : goto begin data notes 13, 15, 16, 20, 15, 16, 15, 18, 15, 16, 15, 18, 13, 15, 16, 20 end data length 20, 10, 30, 180, 20, 10, 30, 180, 20, 10, 50, 180, 30, 10, 50, 180 end if c<=30 then z=6 if c>30 then z=5 if c>60 then z=4 if c>90 then z=3 if c>120 then z=2 if c>150 then z=1 AUDV0=z : AUDC0=12 AUDF0=notes[e] c=c+1 if c>length[d] then c=0 : d=d+1 : e=e+1 if e>15 then c=0 : d=0 : e=0 scorecolor=14 rem TEMPORARY LEVEL SELECT if switchselect then g=g+1 if g>10 then g=0 : score=score+1 : a=a+1 if a>11 then a=0 : score=0 rem level=10 : rem CHANGE TO 1 WHEN DONE d{3}=0 : d{5}=0 : f=0 if !s{5} then COLUBK=130 : COLUPF=204 : lifecolor=130 if s{5} then COLUBK=4 : COLUPF=10 : lifecolor=4 drawscreen goto title_screen begin player1: %01111110 %11111111 %11011011 %01111110 %00011000 %00011100 end begin_level pfclear s{1}=0 lives=64 lives: %00000000 %01111110 %11111111 %11011011 %01111110 %00011000 %00011100 %00000000 end goto start_level_2 bank2 start_level player1x=21 : player1y=80 c=0 : d{1}=0 : q=0 : p{0}=0 d{1}=0 if s{6} then player0x=0 : player0y=0 : goto main get_octo_x if player1x>80 then player0x=20 if player1x<=80 then player0x=140 get_octo_y player0y=rand if player0y<16 then goto get_octo_y if player0y>80 then goto get_octo_y d{6}=1 q=6 main CTRLPF=$31 : ballheight=4 lifecolor=14 if !s{5} then COLUP0=72 : COLUPF=204 : COLUBK=130 if s{5} then COLUP0=8 : COLUPF=10 : COLUBK=4 if level=9 && !s{1} then pfvline 7 1 2 on : pfvline 27 6 7 on if level=9 && s{1} then pfvline 7 1 2 off : pfvline 27 6 7 off if level=10 && !s{1} then pfvline 7 1 2 on : pfvline 13 1 2 on if level=10 && s{1} then pfvline 7 1 2 off : pfvline 13 1 2 off if level>8 then t=t+1 if level=11 && !s{1} then pfvline 8 5 9 on if level=11 && s{1} then pfvline 8 5 9 off if level>8 && t>99 && s{1} then s{1}=0 : t=0 if level>8 && t>99 && !s{1} then s{1}=1 : t=0 if switchbw then s{5}=1 else s{5}=0 if switchrightb then w{0}=1 else w{0}=0 if w{0} then goto main_2 sonar u=u+1 if u>20 then u=0 : v=v+1 if v>9 then v=0 AUDV1=sonarvol[v] AUDC1=12 : AUDF1=2 data sonarvol 6, 5, 4, 3, 2, 1, 0, 0, 0, 0 end main_2 drawscreen if d{5} then goto complete_level if d{2} then goto lose_life if switchreset then goto t_s_p_f if joy0left then c=1 if joy0right then c=2 if joy0up then c=3 if joy0down then c=4 if joy0left && joy0up then c=5 if joy0left && joy0down then c=6 if joy0right && joy0up then c=7 if joy0right && joy0down then c=8 if c>0 then e=e+1 : p=p+1 if c=1 then REFP1=0 if c=2 then REFP1=8 if c=5 then REFP1=0 if c=6 then REFP1=0 if c=7 then REFP1=8 if c=8 then REFP1=8 if c=1 && e>2 then player1x=player1x-1 : e=0 if c=2 && e>2 then player1x=player1x+1 : e=0 if c=3 && e>2 then player1y=player1y-1 : e=0 if c=4 && e>2 then player1y=player1y+1 : e=0 if c=5 && e>2 then player1y=player1y-1 : player1x=player1x-1 : e=0 if c=6 && e>2 then player1y=player1y+1 : player1x=player1x-1 : e=0 if c=7 && e>2 then player1y=player1y-1 : player1x=player1x+1 : e=0 if c=8 && e>2 then player1y=player1y+1 : player1x=player1x+1 : e=0 if collision(player1,playfield) then d{2}=1 if collision(player1,ball) then d{5}=1 if d{4} then REFP0=8 else REFP0=0 g=g+1 : i=i+1 if d{1} then AUDV0=6 : AUDC0=3 : AUDF0=14 if !d{1} then AUDV0=0 if s{0} then r=r+1 if s{0} && r<30 then AUDV0=6 : AUDC0=12 : AUDF0=9 if s{0} && r>30 then r=0 : s{0}=0 : AUDV0=0 if s{6} then goto main if joy0fire && !d{1} && c>0 then q=c : d{1}=1 if d{1} && q=1 then missile1x=missile1x-1 if d{1} && q=2 then missile1x=missile1x+1 if d{1} && q=3 then missile1y=missile1y-1 if d{1} && q=4 then missile1y=missile1y+1 if q=5 && d{1} then missile1y=missile1y-1 : missile1x=missile1x-1 if q=6 && d{1} then missile1y=missile1y+1 : missile1x=missile1x-1 if q=7 && d{1} then missile1y=missile1y-1 : missile1x=missile1x+1 if q=8 && d{1} then missile1y=missile1y+1 : missile1x=missile1x+1 if collision(missile1,player0) && d{1} then d{1}=0 : score=score+10 : s{0}=1 : d{0}=1 if collision(missile1,playfield) then d{1}=0 if !d{1} then missile1x=player1x+5 : missile1y=player1y-5 if collision(player1,player0) then d{2}=1 if h=0 then h=(rand / 32) +1 if h=1 && g>2 then g=0 : player0x=player0x+1 if h=2 && g>2 then g=0 : player0x=player0x+1 : player0y=player0y-1 if h=3 && g>2 then g=0 : player0x=player0x+1 : player0y=player0y+1 if h=4 && g>2 then g=0 : player0x=player0x-1 if h=5 && g>2 then g=0 : player0x=player0x-1 : player0y=player0y-1 if h=6 && g>2 then g=0 : player0x=player0x-1 : player0y=player0y+1 if h=7 && g>2 then g=0 : player0y=player0y+1 if h=8 && g>2 then g=0 : player0y=player0y-1 if player0x<20 then h=1 if player0x>130 then h=4 if player0y<8 then h=7 if player0y<32 then h=7 if player0y>70 then h=8 if i=30 then i=0 : g=0 : h=0 if d{0} then goto wait get_octo_dir if h=1 then d{4}=1 : goto octo_left if h=2 then d{4}=0 : goto octo_left if h=3 then goto octo_straight if h=4 then goto octo_straight if h=5 then d{4}=0 : goto octo_left if h=6 then d{4}=0 : goto octo_left if h=7 then d{4}=1 : goto octo_left if h=8 then d{4}=1 : goto octo_left octo_left player0: %00101010 %00101010 %00101010 %01010100 %00111000 %01111100 %01010100 %00111000 end goto main octo_straight player0: %01010100 %01010100 %01010100 %01010100 %00111000 %01111100 %01010100 %00111000 end goto main lose_life if d{2} then c=0 : f=f+1 : d{1}=0 : s{0}=0 if d{2} && f<60 then AUDV0=6 : AUDF0=20 : AUDC0=10 if d{2} && d{3} && lives<32 && f>60 then d{2}=0 : goto t_s_p_f if d{2} && f>60 then lives=lives-32 if d{2} && lives<32 && !d{3} then d{3}=1 if d{2} && f>60 then d{2}=0 : f=0 : AUDV0=0 : goto start_level goto main wait if d{0} then k=k+1 : player0x=0 : player0y=0 : h=0 if d{0} && k=2 then l=rand if l<64 then l=1 if l>=64 && l<128 then l=2 if l>=128 && l<196 then l=3 if l>=196 then l=4 if d{0} && k>60 then k=0 : m=m+1 if d{0} && m>l then k=0 : m=0 : l=0 : d{0}=0 : goto get_octo_x goto main complete_level if d{5} then c=0 : f=f+1 : v=6 if d{5} && f>0 then AUDV0=6 : AUDC0=12 : AUDF0=31 if d{5} && f>20 then AUDF0=24 if d{5} && f>40 then AUDF0=20 if d{5} && f>60 then AUDF0=15 if d{5} && f>80 then d{5}=0 : a=a+1 : f=0 : AUDV0=0 : goto begin goto main bank 2 start_level_2 on a goto l_0 l_1 l_2 l_3 l_4 l_5 l_6 l_7 l_8 l_9 l_10 l_11 l_0 playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X.........X....................X X.........X....................X X....X....X...XXXXXXXXXXXXX....X X....X....X...X................X X....X....X...X................X X....X....X...X...XXXXXXXXXXXXXX X....X....X...X................X X....X........X................X X....X........XXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX................. end ballx=130 : bally=65 goto start_level bank1 l_1 playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X...............X........X.....X X........................X.....X X...XXXXXXXXX........X...X.....X X...........XXXXXXXXXX...X...XXX X...........X............X.....X XXXXXXXXX...X............X.....X X.......X...X...XXXXXXXXXXXX...X X...........X..................X X...X.......X..................X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end ballx=133 : bally=17 goto start_level bank1 l_2 playfield: XXXXXXXXXXXXXXXXXXXXXXXXXX...... X.......X.......X........X...... X...............X........XXXXXXX X...X.......X.......X..........X X...XXXXXXXXX.......X..........X X...........XXXXXXXXXXXXXXX....X X............X....X.......X....X XXXXXXXXX....X....X.......X....X X............X........X........X X............XX.......X........X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end ballx=76 : bally=56 goto start_level bank1 l_3 playfield: XXXXXXXX......XXXXXXXXXXXXXXXXXX X......XX.....X................X X........XX...X................X X..XX......XX.X...XXXXXXXXXX...X X..X.XX......XX...XXX......X...X X..X...X......X...X............X X..X.XX.......X...X....X.......X X..XXX....XXXXX...X...XXXXXXXXXX X..X.X............X............X X..X..X...........XX...........X XXXX...XXXXXXXXXXXXXXXXXXXXXXXXX end ballx=132 : bally=72 goto start_level bank1 l_4 playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X...........X....X.........X...X X...........X...X..........X...X X...XXXXX...X..........X...X...X X...X.......X......XXXXX...X...X X...X.......XX....XX.......X...X X...X...XXXXX......X.......X...X X...X...X..........X...XXXXX...X X...X..........X...X...........X X...X.........X....X...........X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end ballx=132 : bally=16 goto start_level bank1 l_5 playfield: ...........XXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXX...X.......X.......X X..............X.......X.......X X..............X...X.......X...X X...XXXX...X...X...X.......X...X X...X..X...X.......XXXXXXXXX...X X...X..X...X......X........X...X X...XXXX...XXXXXXXX........X...X X..........X..........X........X X..........X..........X........X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end ballx=70 : bally=74 goto start_level bank1 l_6 playfield: XXXXXXXXXXXXXXXXXXXXXXXXX..XXXXX X.......................XXXX...X X...X...................X......X X...XXXXXXXXXXXXXXXXX...X......X X...X.......X.......X...X...XXXX X...X.......X.......X...X......X X.......X...X...X.......X......X X.......X...X...X.......XXXX...X XXXXXXXXX...X...XXXXXXX........X X...........X..................X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end ballx=132 : bally=13 goto start_level bank1 l_7 playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X......................X.......X X...XXXXXXXXXXXXXXXX...X.......X XXXXXXXX...........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...X...X...XXXXXXXXX...X X..X...........X...............X X..X...........X...............X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end ballx=24 : bally=21 goto start_level bank1 l_8 playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X...........X.........X........X X...........X.........X........X X..XXXXXX...X....XX........X...X X..X........X......XXXXXXXXX...X X..X........XXX........X.......X X..X...XXXX....X.......X.......X X..X...X........XXXX...X...XXXXX X..X...X...............X.......X X..X........X..........X.......X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end ballx=132 : bally=72 goto start_level bank1 l_9 playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X..............X...............X X..............X...............X XXXXXXXXXXXX.......XXXXXXXXX...X X......X...X.......X.......X...X X......XXXXXXXXXXXXX.......X...X X..X...X.......X.......X.......X X..X...X.......X.......X.......X X..X.......X.......X.......XXXXX X..X.......X.......X.......X.... XXXXXXXXXXXXXXXXXXXXXXXXXXXX.... end ballx=24 : bally=21 goto start_level bank1 l_10 playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X....................X.........X X....................X.........X X..XXXXXXXXXXXXXXX...X...XXX...X X..XXX...X.......X...X...X.....X X..X.....X.......X.......X.....X X..X.....X...X...X.......X...XXX X..X...XXX...X...XXXXXXXXX...X.. X..X.........X...............X.. X..X.........X...............X.. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.. end ballx=44 : bally=38 goto start_level bank1 l_11 playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.. X.........XX........X........X.. X..........X........X........X.. X...XXXX...X...X....X....X...XXX X...XXXXXXXX...X....X....X.....X X..............X.........X.....X X..............X.........X.....X XXXXXXXXXXXXXXXXXXXXXXXXXXXX...X X..............................X X..............................X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end ballx=52 : bally=30 goto start_level bank1 inline 6lives.asm