set romsize 4k set optimization noinlinedata dim rand16 = n b = -1 c = 0 : q = 0 : v = 0 : y = 0 l = 1 : p = 1 : z = 1 w = 30 x = 31 scorecolor = $0E const pfscore = 1 pfscorecolor = $AC __initialize__ gosub __player_ship__ player0x = 76 player0y = 20 player1x = 80 player1y = 88 a = -1 __attract__ COLUP0 = _galactopus_color[l] COLUP1 = $AC NUSIZ0 = $07 AUDV0 = 0 : AUDC0 = 0 : AUDF0 = 0 : AUDV1 = 0 : AUDC1 = 0 : AUDF1 = 0 i = 7 gosub __animate_galactopus__ a = -a if player0x < 1 then a = 1 if player0x > 126 then a = -1 player0x = player0x + a a = -a if player1x < 3 then a = 1 if player1x > 151 then a = -1 player1x = player1x + a if switchreset || joy0fire then goto __start__ drawscreen goto __attract__ __start__ pfclear player0y = 0 : missile0y = 0 : missile1y = 0 : a = 0 : c = 0 : r = 0 : o = 0 : score = 0 i = 7 l = 1 player1x = 80 pfscore1 = %00000101 __start_loop__ COLUP0 = _galactopus_color[l] COLUP1 = $AC pfscore2 = %00000000 bally = 0 player0x = 76 gosub __animate_galactopus__ gosub __lower_galactopus__ drawscreen if player0y < 20 then goto __start_loop__ AUDV0 = 0 a = -2 __game__ i = 3 j = 29 missile0y = 12 missile0height = 5 missile1y = 87 missile1height = 4 ballx = 64 bally = 0 ballheight = 3 CTRLPF = $21 e = (rand&63) __game_loop__ if switchreset then goto __start__ if switchbw then goto __pause__ COLUPF = _shield_pulse[p] if l > 5 && missile0y = 12 then u = 7 else u = l COLUP0 = _galactopus_color[u] COLUP1 = $AC NUSIZ0 = $07 if !joy0right && !joy0left then k = 0 if joy0left && player1x > 15 then player1x = player1x - 2 : k = -2 if joy0right && player1x < 135 then player1x = player1x + 2 : k = 2 if missile1y < 87 && missile1y > 0 && r = 0 then missile1y = missile1y - 3 if missile1y > 87 then missile1y = 87 : r = 0 if missile1y = 87 then missile1x = player1x + 4 if joy0fire && missile1y = 87 then missile1y = 86 : j = j - 1 if missile1y < 87 && missile1y > 60 && r = 0 then AUDV0 = 8 : AUDC0 = 12 : AUDF0 = -missile1y + 90 if missile1y < 59 && r = 0 then AUDV0 = 0 if r > 0 && missile1y < 87 then missile1y = missile1y + 3 gosub __animate_galactopus__ if missile0y > 88 then missile0y = 12 if missile0y = 12 then missile0x = player0x + 16 __galactopus_move__ on l goto __move1__ __move1__ __move1__ __move2__ __move3__ __move4__ __move3__ __move4__ if player0x = e + e then a = -a : e = (rand&63) __move3__ if bally < 45 then goto __move2__ if ballx < player0x then a = -2 if player0x + 32 < ballx then a = 2 __move2__ if missile1y > 30 then goto __move2a__ if missile1x - player0x < 35 && missile1x - player0x > 20 then a = -2 if player0x - missile1x < 3 then a = 2 __move2a__ if missile0y > 12 then goto __move1__ if k = 2 && player0x - player1x < 21 then missile0y = 13 if k = -2 && player1x - player0x < 45 then missile0y = 13 __move1__ if player0x < 1 then a = 2 if player0x > 126 then a = -2 player0x = player0x + a if missile0y = 12 && missile0x - 1 - player1x < 7 then missile0y = 13 __missile_move__ if missile0y > 12 && missile0y < 41 then AUDV1 = 8 : AUDC1 = 15 : AUDF1 = missile0y - 13 if missile0y > 40 then AUDV1 = 0 if missile0y > 12 && missile0y < 89 then missile0y = missile0y + 3 if l > 3 && missile0y > 12 then missile0y = missile0y + 1 __ball_move__ if bally > 0 && bally < 89 then bally = bally + 2 if bally > 88 then bally = 0 drawscreen COLUPF = _shield_pulse[p] COLUP0 = _galactopus_color[u] COLUP1 = $AC NUSIZ0 = $07 gosub __move_shields__ drawscreen if collision(playfield,missile1) && l < 5 then missile1y = 87 if collision(playfield,missile1) && l > 4 then r = 1 if collision(player1,missile0) then goto __player_hit__ if collision(player1,missile1) && r > 0 then goto __player_hit__ if collision(missile1,ball) && !switchleftb then bally = 0 : missile1y = 87 if collision(player1,ball) then pfscore2 = pfscore2*2|1 : bally = 0 : score = score + 50 if j = 0 then j = 1 if collision(player0,missile1) then goto __galactopus_hit__ goto __game_loop__ __bonus_stage__ player0x = 76 bally = 0 e = (rand&127) v = 1 f = 0 : h = 0 __bonus_start__ COLUP0 = _galactopus_color[0] COLUP1 = $AC gosub __animate_galactopus__ gosub __lower_galactopus__ drawscreen if player0y < 20 then goto __bonus_start__ AUDV0 = 0 bally = 12 ballx = 92 a = -1 __bonus_loop__ gosub __move_shields__ COLUPF = _shield_pulse[p] COLUP0 = _galactopus_color[0] NUSIZ0 = $07 COLUP1 = $AC if joy0left && player1x > 15 then player1x = player1x - 1 if joy0right && player1x < 135 then player1x = player1x + 1 gosub __animate_galactopus__ if player0x = e then a = -a : e = (rand&127) if player0x < 2 then a = 1 if player0x > 126 then a = -1 : e = e - 1 player0x = player0x + a if f > 4 then player0x = player0x + a if bally < 12 then ballx = player0x + 16 if bally > 12 && bally < 27 then AUDV0 = 8 : AUDC0 = 4 : AUDF0 = bally + 5 if bally > 26 then AUDV0 = 0 bally = bally + 1 if f > 9 then bally = bally + 1 drawscreen if !collision(player1,ball) then goto __no_score__ f = f + 1 : h = h + 1 if h = 10 then pfscore1 = pfscore1*4|1 for g = 1 to h score = score + 10 next g bally = 11 __no_score__ if bally < 87 then goto __bonus_loop__ bally = 11 h = 0 pfscore2 = pfscore2/2 if pfscore2 <> %00000000 then goto __bonus_loop__ player0y = 0 : bally = 0 : v = 0 a = -2 if l < 6 then l = l + 1 else l = 5 AUDV0 = 8 : AUDC0 = 7 : AUDF0 = 25 for d = 1 to 180 COLUP1 = $AC if d > 50 then AUDV0 = 0 drawscreen next d goto __start_loop__ __move_shields__ pfhline w 3 x off pfhline y 4 z off q = q + 1 if q = 5 then p = p + 1 : q = 0 if p > 4 then p = 0 if w > 0 then w = w - 1 if w < 21 then x = x - 1 if x = 1 then w = 31 : x = 31 if z < 31 then z = z + 1 if z > 10 then y = y + 1 if y = 31 then y = 0 : z = 0 if v = 0 then pfhline w 3 x on if l > 1 && v = 0 then pfhline y 4 z on return __lower_galactopus__ NUSIZ0 = $07 a = a + 1 if a = 5 then player0y = player0y + 1 : a = 0 AUDV0 = 8 : AUDC0 = 1 : AUDF0 = player0y + a return __galactopus_hit__ if pfscore2 = %11111111 then goto __galactopus_dies__ if bally = 0 then ballx = missile1x - 2 : bally = 18 missile1y = 87 missile1x = player1x + 4 if missile0y > 12 && missile0y < 89 then missile0y = missile0y + 2 if missile0y > 88 then missile0y = 12 COLUP0 = $0E NUSIZ0 = $07 drawscreen goto __game_loop__ __galactopus_dies__ AUDV1 = 0 pfhline w 3 x off pfhline y 4 z off d = 0 : e = 0 f = player0x - 8 g = 2 __galactopus_death_loop__ COLUPF = _shield_pulse[p] NUSIZ0 = $07 COLUP1 = $AC missile0y = 0 : missile1y = 0 d = d + 1 e = e + 1 g = g - 1 if g < 0 then g = 2 if e > 3 then e = 0 AUDV0 = 8 : AUDC0 = 15 : AUDF0 = 3 - g COLUP0 = _color_cycle[e] drawscreen if d < 120 then goto __galactopus_death_loop__ player0x = 76 player0y = 0 : d = 0 if j = 20 then j = 30 __jackpot__ COLUP1 = $AC d = d + 1 if d = 5 then score = score + 50 : j = j - 1 : d = 0 AUDV0 = 8 : AUDC0 = 12 : AUDF0 = 10 - d drawscreen if j > 0 then goto __jackpot__ AUDV0 = 0 for d = 1 to 60 COLUP1 = $AC drawscreen next d i = 7 o = o + 1 if l < 5 && o = 2 then o = 0 : goto __bonus_stage__ if l > 4 && o = 3 then o = 0 : goto __bonus_stage__ if l < 2 then l = l + 1 goto __start_loop__ __player_hit__ i = 7 AUDV0 = 0 gosub __explosion__ missile0y = 12 missile0x = player0x + 16 missile1y = 0 : d = 0 : g = 0 : f = 0 h = player1x __player_hit_loop__ COLUPF = _shield_pulse[p] COLUP0 = _galactopus_color[l] NUSIZ0 = $07 gosub __animate_galactopus__ d = d + 1 : g = g + 1 : f = f + 1 if g > 3 then g = 0 COLUP1 = _color_cycle[g] if f > 4 then REFP1 = 8 if f > 8 then f = 0 if d < 30 then AUDV1 = 8 : AUDC1 = 8 : AUDF1 = 1 + d if d > 4 then NUSIZ1 = $05 : player1x = h - 4 if d > 7 then NUSIZ1 = $07 : player1x = h - 8 if d > 18 then NUSIZ1 = $05 : player1x = h - 4 if d > 30 then NUSIZ1 = $00 : player1x = h if d > 40 then player1y = 107 : AUDV1 = 0 if bally > 0 && bally < 89 then bally = bally + 1 if bally > 88 then bally = 0 gosub __move_shields__ drawscreen if d < 75 then goto __player_hit_loop__ if pfscore1 = 0 then goto __game_over__ player1y = 88 player1x = 80 missile1y = 87 if !switchrightb then pfscore2 = %00000000 r = 0 gosub __player_ship__ pfscore1 = pfscore1/4 goto __game_loop__ __game_over__ pfhline w 3 x off pfhline y 4 z off missile0y = 0 player1x = 50 d = 0 : e = 0 i = 7 gosub __city__ __galactopus_descends__ COLUP0 = _galactopus_color[l] NUSIZ0 = $07 NUSIZ1 = $06 gosub __animate_galactopus__ d = d + 1 if d <> 3 then goto dskip if player0x < 76 then player0x = player0x + 1 if player0x > 76 then player0x = player0x - 1 if player0y < 75 then player0y = player0y + 1 : d = 0 if player0y > 74 && player1y > 88 then player1y = player1y - 1 : d = 0 dskip if player1y > 88 then goto __draw_the_end__ __earth_dies__ d = d + 1 e = e + 1 if e > 3 then e = 0 COLUBK = _color_cycle[e] if d < 40 then AUDV0 = 8 : AUDC0 = 8 : AUDF0 = 30 - e if d > 29 then player1y = 0 if d > 60 then COLUBK = $00 : AUDV1 = 0 : AUDV0 = 0 __draw_the_end__ drawscreen if d < 240 then goto __galactopus_descends__ goto __initialize__ __pause__ if !switchbw then goto __game_loop__ drawscreen goto __pause__ __player_ship__ player1: %10010010 %11111110 %11111110 %10111010 %10010010 %00010000 end return __explosion__ player1: %00010000 %00000100 %10010000 %00001001 %00100000 %00000100 end return __city__ player1: %11110111 %11110111 %11110111 %11110111 %11110111 %11110111 %11110111 %11110111 %00000111 %01011111 %01011111 %01011111 %01011111 %01000000 %01111100 %01111100 %00111000 %00010000 end return __animate_galactopus__ b = b + 1 if b = 0 then on c goto __galactopus0__ __galactopus1__ __galactopus2__ __galactopus3__ if b > i then b = -1 return __galactopus0__ player0: %00001000 %00010100 %10000010 %01000100 %00101000 %00010000 %00100100 %01011010 %10011001 %00011000 %00011000 %00111100 %00111100 %00111100 %00100100 %00111100 %00111100 %00111100 %00011000 %00011000 end c = 1 return __galactopus1__ player0: %00000000 %00011000 %00000100 %11000010 %00101100 %00010000 %00000100 %01111011 %10011000 %00011000 %00011000 %00111100 %00111100 %00111100 %00100100 %00111100 %00111100 %00111100 %00011000 %00011000 end c = 2 return __galactopus2__ player0: %00010000 %00001100 %00000010 %00000100 %11101000 %00010000 %00000111 %10111000 %01011000 %00011000 %00011000 %00111100 %00111100 %00111100 %00100100 %00111100 %00111100 %00111100 %00011000 %00011000 end c = 3 return __galactopus3__ player0: %00011000 %00000100 %00000010 %01000100 %10101000 %00010000 %00100101 %11011010 %00011000 %00011000 %00011000 %00111100 %00111100 %00111100 %00100100 %00111100 %00111100 %00111100 %00011000 %00011000 end c = 0 return data _color_cycle $0E, $36, $1E, $42 end data _shield_pulse $5E, $5C, $5A, $58, $56 end data _galactopus_color $5C, $68, $68, $46, $A6, $18, $D8, $00 end