set kernel_options player1colors no_blank_lines pfcolors background const noscore=1 const player0colors=1 set romsize 16k rem const pfcenter=0 rem const pfwidth=4 rem const scorefade=0 a{0}=0 s=0 : v=0 : u=0 : q=0 title_screen playfield: XXXXXXXXXX...........XXXXXXXXXXX XXXXXXXXX.............XXXXXXXXXX XXXXXXXXX.............XXXXXXXXXX XXXXXXXX...............XXXXXXXXX XXXXXXXXX.............XXXXXXXXXX XXXXXXXXXXX.........XXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ...X...X...XX..X..XX...X.X..X... ...X.XXX..XXX.XX.XXX..XX.X.XX..X .XXX.XXX...X..X..XXX.XXX.X.XX... XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end pfcolors: $82 $44 $44 $2e $2e $2e $2e 14 14 14 14 $82 end COLUPF=$82 COLUP1=$44 COLUBK=$82 player1: %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %01011010 %01011010 %00100100 %00100100 %11111111 end player0: %01111110 %11000011 %00000000 %11111111 %11111111 %11111111 %00000000 %00011000 %00100100 %00100100 %00100100 %00000000 %11000011 %11000011 %11000011 %11000011 %11000011 %11000011 %11000011 %11000011 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 %11111111 %10100101 %10100101 %11011011 %11011011 %11111111 end player1color: $40 $40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 14 14 14 0 0 0 0 0 0 0 0 14 14 14 14 14 14 14 14 end if s>73 then s=7 : u=7 : v=7 : q=7 : x=255 : b{0}=1 : AUDV1=0 AUDC0=4 : AUDF0=titlescreenmusic2[s] : AUDV0=4 t=t+1 if t>titlescreenmusiclength[u] then t=0 : u=u+1 : s=s+1 if s=0 && t>8 then AUDV0=0 if s=1 && t>18 then AUDV0=0 if s=41 && t>8 then AUDV0=0 if s=43 && t>8 then AUDV0=0 rem if s=45 && t>8 then AUDV0=0 if s=52 && t>8 then AUDV0=0 if s=54 && t>8 then AUDV0=0 if s=57 && t>8 then AUDV0=0 if s=58 && t>8 then AUDV0=0 if s=60 && t>8 then AUDV0=0 if s=62 && t>8 then AUDV0=0 b{0}=1 if b{0} then x=x+1 : AUDC1=12 : AUDF1=titlescreenbass[v] : AUDV1=4 if x>titlescreenbasslength[q] then x=0 : v=v+1 : q=q+1 player0x=62 : player0y=45 NUSIZ1=$07 PF0=$FF NUSIZ0=$07 : player1x=62 : player1y=24 drawscreen if joy0fire && !a{0} then a{0}=1 if !joy0fire && a{0} then a{0}=0 : goto beginning goto title_screen beginning pfclear NUSIZ0=$00 : NUSIZ1=$00 player0x=78 if b=7 then player0y=26 else player0y=88 dim castlex=c dim castley=d dim birdnoise=m if b=7 then castlex=66 else castlex=79 beginning_2 k=30 : j=31 : l=0 : e=0 f=16 : m=1 : n=rand : o=0 : p=0 castley=24 pfcolors: $9A $9A $9A $9A $C6 $C6 $C6 $C6 $C6 $C6 $c6 $c6 end outside_the_castle player0: %00011000 %00010000 %00010000 %00010000 %10000000 %10111100 %10111101 %10111101 %10111101 %01111110 %00011000 %00011100 %00011100 %00011100 %00011111 %00001100 end if missile0x{4} then player0: %00110110 %00100100 %00100100 %00100100 %00000001 %00111101 %10111101 %10111101 %10111101 %01111110 %00011000 %00011100 %00011100 %00011100 %00011111 %00001100 end player1color: $f0 $94 $94 $94 $0e $94 $94 $94 $94 $94 $2a $2A $2a $2a $44 $44 end if player0y<33 && f<15 && !l{4} && !l{5} then player0y=33 if player0y<33 && f>17 && !l{4} && !l{5} then player0y=33 if player0y<25 && f>14 && f<18 && !l{4} && !l{5} then player0y=88 : s=255 : goto castle_lobby_setup bank2 if f=0 && player0x<78 && b<4 then castlex=17 if f=0 && player0x<78 && b>3 && b<6 then castlex=13 if f=0 && player0x<78 && b>5 then castlex=5 if f=0 && player0x<78 then player0x=78 : f=1 if player0x>134 && !l{3} && !l{4} && !l{5} && player0y>25 then l{2}=1 : player0: %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 %10111101 %10111101 %10111101 %01111110 %00011000 %00011100 %00011100 %00011100 %00011111 %00001100 end if f>0 then pfvline f 3 10 on if f=0 && player0x>139 then player0x=139 if f>0 then pfvline 30 3 10 off : pfvline 31 3 10 off if f=0 then pfvline 30 3 10 on : pfvline 31 3 10 on NUSIZ1=$00 if b<4 then NUSIZ1=$00 if b>3 && b<6 then NUSIZ1=$05 if b>5 then NUSIZ1=$07 COLUBK=$9a drawscreen if joy0left && f<29 && f>0 then g=g+1 : bally{0}=1 : missile0x=missile0x+1 if g>3 then g=0 : bally{0}=1 : pfvline f 3 10 off : f=f+1 : castlex=castlex+4 if joy0right && f>0 then h=h+1 : bally{0}=0 : missile0x=missile0x+1 if h>3 then h=0 : bally{0}=0 : pfvline f 3 10 off : f=f-1 : castlex=castlex-4 if bally{0} then REFP0=8 else REFP0=0 if f=0 && joy0right then player0x=player0x+1 : bally{0}=0 : missile0x=missile0x+1 if f=0 && player0x>79 && joy0left then player0x=player0x-1 : bally{0}=1 : missile0x=missile0x+1 if f=0 && player0x<80 then f=1 : castlex=castlex+4 : missile0x=missile0x+1 if joy0fire && !l{4} && !l{5} && player0y<88 && !joy0up && !joy0down then l{4}=1 if !joy0fire && l{4} then l{4}=0 : l{5}=1 if !l{4} && !l{5} then AUDV1=0 if l{4} || l{5} then AUDC1=12 : AUDF1=r : AUDV1=4 if l{4} && r<30 then player0y=player0y-1 : r=r+1 if l{4} && r>29 then l{4}=0 : l{5}=1 if l{5} && r>0 then player0y=player0y+1 : r=r-1 if l{5} && r=0 && player0x>133 then r=0 : l{5}=0 : l{2}=1 : p=0 if l{5} && r=0 then l{5}=0 if joy0down && b>6 && player0y>87 && !l{4} && !l{5} then b=6 if joy0down && player0y>87 && r=0 then e=e+1 : missile0x=missile0x+1 if joy0down && player0y>88 then player0y=88 : missile0x=missile0x+1 if joy0down && !l{4} && !l{5} && b>6 then player0y=player0y+1 : missile0x=missile0x+1 if e>10 && joy0down && player0y>87 then b=b-1 if b<7 && !l{4} && !l{5} then player0y=88 if e>10 && b=3 then castlex=castlex+4 : e=0 if e>10 && b=5 then castlex=castlex+8 : e=0 if b<2 then b=1 if e>10 then e=0 if joy0up && !l{4} && !l{5} then a=a+1 : missile0x=missile0x+1 if a>10 then b=b+1 if a>10 && b=4 then castlex=castlex-4 : a=0 if a>10 && b=6 then castlex=castlex-8 : a=0 if a>10 then a=0 if joy0up && !l{4} && !l{5} && b>6 then player0y=player0y-1 : missile0x=missile0x+1 if f=0 then gosub lake if b=0 then player1x=200 : player1y=0 if b>0 then player1x=castlex : player1y=castley if b=1 then player1:: missile0x=missile0x+1 %11111111 %11111111 %10000001 end if b=2 then player1: %11111111 %11111111 %11111111 %11000011 end if b=3 then player1: %11111111 %11111111 %11111111 %11111111 %11111111 %11000011 end if b=5 then player1: %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11011011 %11000011 end if b=6 then player1: %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11011011 %11011011 %11011011 %11011011 %11011011 %11011011 %11000011 %11000011 end if b=7 then player1: %11000011 %11000011 %11000011 %11000011 %11100111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11011011 %11011011 %11011011 %11011011 %11011011 %11011011 %11000011 %11000011 end birdnoise=birdnoise+1 if birdnoise>n && !l{0} && !l{1} then l{0}=1 : birdnoise=0 AUDV0=0 rem if !l{2} then AUDV1=0 if l{0} && o<12 then o=o+1 : AUDF0=o : AUDC0=4 : AUDV0=4 if l{0} && o=12 then l{0}=0 : l{1}=1 if l{1} && o>0 then o=o-1 : AUDF0=o : AUDC0=4 : AUDV0=4 if l{1} && o=0 then l{1}=0 : gosub get_n if l{2} && p<31 then p=p+1 : AUDF1=p : AUDC1=2 : AUDV1=4 if l{2} && p>30 then l{2}=0 : AUDV1=0 if player0x<135 && !l{4} && !l{5} then l{2}=0 : l{3}=0 : p=0 : AUDV1=0 COLUPF=$80 if f>0 then COLUPF=$3c COLUP1=$04 goto outside_the_castle get_n m=0 n=rand return lake if f=255 then f=0 return world_1_entering_setup u=0 : s=0 : t=0 : r=0 data enteringworldmusic 19, 19, 19, 19, 26, 19, 15 end data enteringworldlength 10, 20, 20, 5, 10, 20, 15 end data titlescreenmusic2 11, 11, 11, 14, 11, 9, 19 14, 19, 23, 17, 15, 16, 17 19, 11, 9, 8, 10, 9, 11, 14, 12, 15 14, 19, 23, 17, 15, 16, 17 19, 11, 9, 8, 10, 9, 11, 14, 12, 15 9, 9, 10, 10, 11, 18, 17, 14, 17, 14, 12 9, 9, 10, 10, 11, 5, 5, 5 9, 9, 10, 10, 11, 18, 17, 14, 17, 14, 12 24, 26, 29 end data titlescreenmusic 15, 15, 15, 19, 15, 12, 26 19, 26, 31, 23, 20, 21, 23 26, 15, 12, 11, 14, 12, 15, 19, 17, 20 19, 26, 31, 23, 20, 21, 23 26, 15, 12, 11, 14, 12, 15, 19, 17, 20 12, 13, 14, 16, 15, 24, 23, 19, 23, 19, 17 12, 13, 14, 16, 15, 9, 9, 9 12, 13, 14, 16, 15, 24, 23, 19, 23, 19, 17 16, 17, 19 end data titlescreenmusiclength 10, 20, 20, 10, 20, 40, 40 30, 30, 40, 10, 20, 10, 20 10, 20, 10, 20, 10, 20, 20, 10, 10, 30 30, 30, 40, 10, 20, 10, 20 10, 20, 10, 20, 10, 20, 20, 10, 10, 50 10, 10, 10, 20, 20, 10, 10, 20, 10, 10, 30 10, 10, 10, 20, 20, 20, 10, 50 10, 10, 10, 20, 20, 10, 10, 20, 10, 10, 30 30, 30, 80 end data titlescreenbass 15, 15, 15, 15, 15, 17, 26 12, 15, 19, 14, 12, 12, 14 31, 19, 15, 14, 17, 15, 19, 23, 20, 26 12, 15, 19, 14, 12, 12, 14 31, 19, 15, 14, 17, 15, 19, 23, 20, 26 19, 12, 9, 12, 9, 9, 12 19, 15, 12, 9, 12 19, 12, 9, 12, 9, 9, 12 19, 24, 21, 19, 12, 12, 19 end data titlescreenbasslength 10, 20, 20, 10, 20, 40, 40 30, 30, 40, 10, 20, 10, 20 10, 20, 10, 20, 10, 20, 20, 10, 10, 30 30, 30, 40, 10, 20, 10, 20 10, 20, 10, 20, 10, 20, 20, 10, 10, 30 30, 30, 20, 30, 10, 20, 20 30, 30, 10, 70, 20 30, 30, 20, 30, 10, 20, 20 20, 30, 30, 30, 10, 20, 20 end playfield: ..X.X.X..XXX..XXXX..X.....XXXX.. ..X.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. ...XXX...XXX..X...X.XXXXX.XXXX.. ................................ .........XXX..XXXX..XXXXX....... ........X...X.X...X.X........... ........X...X.X...X.XXXX........ ........X...X.X...X.X........... .........XXX..X...X.XXXXX....... ................................ end pfcolors: 14 14 14 14 14 14 14 14 14 14 14 14 end world_1_entering player0y=200 : player1y=200 : COLUPF=$44 rem r=0 AUDV1=0 drawscreen if u<7 then AUDC0=6 : AUDF0=enteringworldmusic[s] : AUDV0=4 if u<7 then t=t+1 if t>enteringworldlength[u] then t=0 : u=u+1 : s=s+1 if u<3 && t<2 then AUDV0=0 if u>6 then AUDV0=0 if !r{0} && u>6 && joy0fire then r{0}=1 if r{0} && !joy0fire then goto world_1_setup bank2 if switchreset then reboot goto world_1_entering bank 2 rem code for the castle goes here. data castlemusicnotes 26, 24, 26, 27, 26, 19, 15 29, 26, 29, 31, 29, 20, 17 31, 29, 31, 29, 31, 23, 19 23, 20, 19, 17, 19, 17, 19, 23, 29, 17, 19, 20, 26, 31 26, 24, 26, 27, 26, 19, 15 29, 26, 29, 31, 29, 20, 17 31, 29, 31, 29, 31, 23, 19 23, 20, 19, 17, 19, 17, 19, 23, 29, 17, 19, 20, 26, 31 26, 27, 26, 31, 26, 19, 15, 19, 20, 19, 23, 24, 23 23, 24, 23, 29, 23, 19, 14, 17, 19, 17, 20, 21, 20 20, 21, 20, 26, 20, 15, 12, 14, 15, 14, 15, 16, 15 17, 19, 17, 23, 24, 23 17, 19, 17, 26, 27, 26 26, 27, 12, 12, 17, 17, 20, 20, 23, 23 26, 27, 26, 31, 26, 19, 15, 19, 20, 19, 23, 24, 23 23, 24, 23, 29, 23, 19, 14, 17, 19, 17, 20, 21, 20 20, 21, 20, 26, 20, 15, 17, 20, 23, 20, 19, 17, 19 end data castlemusiclength 30, 20, 20, 10, 10, 10, 60 30, 20, 20, 10, 10, 10, 60 30, 20, 20, 10, 10, 10, 30 10, 10, 10, 10, 10, 10, 25, 10, 10, 10, 10, 10, 10, 60 30, 20, 20, 10, 10, 10, 60 30, 20, 20, 10, 10, 10, 60 30, 20, 20, 10, 10, 10, 20 10, 10, 10, 10, 10, 10, 20, 10, 10, 10, 10, 10, 10, 20 10, 10, 10, 10, 10, 10, 20, 10, 10, 10, 10, 10, 30 10, 10, 10, 10, 10, 10, 20, 10, 10, 10, 10, 10, 30 10, 10, 10, 10, 10, 10, 20, 10, 10, 10, 10, 10, 20 10, 10, 10, 10, 10, 30 10, 10, 10, 10, 10, 30 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 10, 10, 10, 10, 10, 10, 20, 10, 10, 10, 10, 10, 30 10, 10, 10, 10, 10, 10, 20, 10, 10, 10, 10, 10, 30 10, 10, 10, 10, 10, 10, 20, 10, 10, 10, 50, 20, 60 end castle_lobby_setup t=0 : s=0 : u=0 castle_lobby_setup2 e=0 pfcolors: 162 162 162 162 66 66 66 66 66 66 66 66 end pfclear player1: %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 end dim doorx=c dim doory=d l=0 : o=0 : p=0 : r=0 castle_lobby COLUBK=162 AUDC0=12 : AUDF0=castlemusicnotes[s] : AUDV0=4 t=t+1 if t>castlemusiclength[u] then t=0 : u=u+1 : s=s+1 player1x=40 : player1y=24 if joy0left && player0x>17 then bally{0}=1 : player0x=player0x-1 : e=e+1 if joy0left && player0x<17 then bally{0}=1 : player0x=17 : e=e+1 if joy0left && doorx<81 then doorx=doorx+1 if joy0right && player0x<140 then bally{0}=0 : player0x=player0x+1 : e=e+1 if joy0right && player0x>139 then bally{0}=0 : doorx=doorx-1 : e=e+1 if bally{0} then REFP0=8 else REFP0=0 ds if s>169 then s=0 : u=0 COLUP1=$f2 : NUSIZ1=$06 gosub mario_anim bank3 drawscreen if joy0down && player0y>87 then player0y=25 : player0x=78 : b=7 : castlex=66 : f=16 : goto beginning bank1 if joy0up && player0y>25 then player0y=player0y-1 : e=e+1 if joy0down && player0y<88 then player0y=player0y+1 : e=e+1 if joy0fire && !l{4} && !l{5} && player0y<89 && !joy0up && !joy0down then l{4}=1 if !joy0fire && l{4} then l{4}=0 : l{5}=1 if !l{4} && !l{5} then AUDV1=0 if l{4} || l{5} then AUDC1=12 : AUDF1=r : AUDV1=4 if l{4} && r<30 then player0y=player0y-1 : r=r+1 if l{4} && r>29 then l{4}=0 : l{5}=1 if l{5} && r>0 then player0y=player0y+1 : r=r-1 if l{5} && r=0 && player0x>133 then r=0 : l{5}=0 : l{2}=1 : p=0 if l{5} && r=0 then l{5}=0 if collision(player0,player1) && joy0up && player0y=25 && player0x<70 then goto room1_setup if collision(player0,player1) && joy0up && player0y=25 && player0x>100 then goto room1_setup goto castle_lobby room1_setup playfield: ..........XXXXXXXXXX............ ..........XXXXXXXXXX............ ..........XXXXXXXXXX............ end player1: %11111111 %11111111 %11101111 %11101111 %00000000 %11101111 %11101111 %11010111 %10111011 %10111011 %10111011 %11010111 %11010111 %11101111 %11111111 %11111111 %11111111 %11111111 end pfcolors: 246 162 162 162 66 66 66 66 66 66 66 66 end player1x=60 : player1y=20 if player0x>100 then goto room2_setup player0x=80 : player0y=80 missile1x=1 goto room_main room2_setup missile1x=2 player1: %00000000 %00000000 %00111100 %01111110 %01111110 %01111110 %00111100 %00111100 %01111110 %01111110 %01111110 %00111100 %00111100 %01100110 %01111110 %01010110 %00111100 %00000000 end player0x=80 : player0y=80 room_main player0: %00011000 %00010000 %00010000 %00010000 %10000000 %10111100 %10111101 %10111101 %10111101 %01111110 %00011000 %00011100 %00011100 %00011100 %00011111 %00001100 end if e{4} then player0: %00110110 %00100100 %00100100 %00100100 %00000001 %00111101 %10111101 %10111101 %10111101 %01111110 %00011000 %00011100 %00011100 %00011100 %00011111 %00001100 end COLUP1=$0e if missile1x=1 then COLUP1=$c8 COLUBK=162 AUDV1=0 : NUSIZ1=$07 : NUSIZ0=$00 AUDC0=12 : AUDF0=castlemusicnotes[s] : AUDV0=4 t=t+1 if t>castlemusiclength[u] then t=0 : u=u+1 : s=s+1 if s>169 then s=0 : u=0 if joy0down && player0y>87 && missile1x=1 then player0y=25 : player0x=48 : goto castle_lobby_setup2 if joy0down && player0y>87 && missile1x=2 then player0y=25 : player0x=108 : goto castle_lobby_setup2 bally=200 if joy0up && player0y>25 then player0y=player0y-1 : e=e+1 if joy0down && player0y<88 then player0y=player0y+1 : e=e+1 if joy0left && player0x>17 then d{0}=1 : player0x=player0x-1 : e=e+1 if joy0right && player0x<140 then d{0}=0 : player0x=player0x+1 : e=e+1 if d{0} then REFP0=8 else REFP0=0 if joy0fire && !l{4} && !l{5} && player0y<89 && !joy0up && !joy0down then l{4}=1 if !joy0fire && l{4} then l{4}=0 : l{5}=1 if !l{4} && !l{5} then AUDV1=0 if l{4} || l{5} then AUDC1=12 : AUDF1=r : AUDV1=4 if l{4} && r<30 then player0y=player0y-1 : r=r+1 if l{4} && r>29 then l{4}=0 : l{5}=1 if l{5} && r>0 then player0y=player0y+1 : r=r-1 if l{5} && r=0 && player0x>133 then r=0 : l{5}=0 : l{2}=1 : p=0 if l{5} && r=0 then l{5}=0 if collision(player0,player1) && player1x<78 && player0y<25 && l{4} then goto world_1_entering_setup bank1 if collision(player0,player1) && player1x<78 && player0y<25 && l{5} then goto world_1_entering_setup bank1 drawscreen goto room_main world_1_setup pfcolors: $90 $92 $96 $9A $C6 $C6 $C6 $C6 $C6 $C6 $c6 $c6 $90 end player1: %01100110 %00100100 %11111111 %11111111 %11011011 %01111110 end player0x=126 : player0y=70 player1x=110 pfclear f=20 : i=4 pfvline f 4 10 on rem l{6}=0 rem m=0 rem l=0 rem l{3}=0 : l{2}=0 : l{4}=0 : l{5}=0 s=0 : t=0 : u=0 : z=0 : j=0 : n=0 : m=0 : l=0 r=0 player1y=40 z=80 w=40 : a=1 : k=1 world_1_part1 l{7}=0 if switchreset then s=0 : t=0 : u=0 : player0y=25 : player0x=48 : goto castle_lobby_setup if !l{3} && ballheight>14 then player1: %01100000 %00100110 %00100100 %11111111 %11111111 %11011011 %01111110 end if !l{3} && ballheight<15 then player1: %00000110 %01100100 %00100100 %11111111 %11111111 %11011011 %01111110 end if l{3} then player1: %0 end if !l{3} && player1x<50 then player1: %0 end ballheight=ballheight+1 if ballheight>30 then ballheight=0 rem if joy0right && f<1 then f=30 : rem player1x=player1x-1 if player0x>130 then player0x=130 if joy0down && player0y<80 then y=255 : e=e+1 if joy0down && player0y>79 && w>30 then c=c+1 : w=w-1 : e=e+1 if joy0down && player1y>30 then player1y=player1y-1 if joy0up && player0y>32 then y=1 : e=e+1 if joy0up && player0y<33 then b=b+1 : w=w+1 : e=e+1 if joy0up && player1y<80 then player1y=player1y+1 if h=1 && !collision(player1,playfield) then player1x=player1x-1 if h=2 && !collision(player1,playfield) && player1x<140 then player1x=player1x+1 if h=3 && !collision(player1,playfield) && player1y>50 then player1y=player1y-1 if h=4 && !collision(player1,playfield) && player1y<80 then player1y=player1y+1 if f>30 && !collision(player0,playfield) then a=2 : n=player1x : o=player1y : goto world_1_part2_setup bank3 if w<28 then w=28 if w>88 then w=88 rem if joy0up then b=b+1 if f>31 then a=2 : missile1x=player1x : missile1y=player1y : goto world_1_part2_setup bank3 if b>7 then pfvline f i 11 off : b=0 : i=i+1 if c>7 then pfvline f i 11 off : c=0 : i=i-1 if i<3 then i=3 if i>10 then i=10 rem if f>30 then f=30 rem if x=0 && y=0 then b=0 world_1_part1_a rem if f>30 && f<32 then pfvline 31 i j on if joy0left && collision(player0,playfield) then player0x=player0x+5 if joy0left && player0x>68 then m=2 : x=1 rem if joy0left && !collision(player1,playfield) then player1x=player1x+2 if joy0left && player0x<69 && !collision(player1,playfield) then d=d+1 : player1x=player1x+1 rem if joy0left && player0x<69 && player1x>31 then j=1 if d>2 && joy0left then d=0 : pfvline f i 11 off : f=f+1 if joy0right && player0x<124 then x=255 : m=254 if joy0right && collision(player0,playfield) then player0x=player0x-5 if joy0right && player1x>5 then player1x=player1x-1 rem if joy0right && player0x>125 && ballx>31 then j=255 if e{1} && joy0right && f>5 then pfvline f i 11 off : f=f-1 if player1x<50 then player1x=150 : player1: %0 end gosub goomba_movement bank3 player0y=player0y-y : player0x=player0x-x k=k+1 if k>4 && !collision(player1,playfield) && player0y<126 then player1x=player1x-j if joy0fire && !l{5} && !joy0up && !joy0down then l{4}=1 if l{4} || l{5} then AUDC1=12 : AUDF1=r : AUDV1=4 : gosub jump bank3 if !l{4} && !l{5} then AUDV1=0 gosub ds_stuff bank3 if k>4 then k=0 rem if h=1 && collision(player1,playfield) then player1x=player1x-5 if collision(player1,playfield) && player0x<126 then player1x=player1x+5 if collision(player0,playfield) then player0y=player0y+y : player0x=player0x+m : gosub ds_stuff bank3 rem if x{0} && collision(player0,playfield) && player0x<128 then player0x=player0x+4 : goto world_1_part_1a2 rem if x{1} && collision(player0,playfield) && player0x>147 then player0x=148 : goto world_1_part_1a2 rem if x{1} && collision(player0,playfield) then player0x=player0x-10 : goto world_1_part_1a2 rem if collision(player0,playfield) && joy0right then player0x=player0x-9 world_1_part_1a2 if player1x<20 then player1x=20 : player1: %0 end y=0 : x=0 if !l{5} && collision(player0,player1) && h<5 then player1x=130 : goto world_1_setup i_hate_life_level_1 goto world_1_part1 bank 3 ds_stuff if l{6} then z=z+1 : AUDV1=4 : AUDC1=4 if l{6} && z<10 then AUDF1=29 if l{6} && z>9 then AUDF1=14 if l{6} && z>19 then l{6}=0 : l{2}=1 if v<9 then AUDC0=12 : AUDF0=level_1_notes[s] : AUDV0=4 if v=9 then AUDC0=4 : AUDF0=complete_level[s] : AUDV0=4 t=t+1 if t>level_1_length[u] then t=0 : u=u+1 : s=s+1 if s>9 && player1y=222 then player0x=40 : player0y=30 : v=0 : s=0 : u=0 : t=0 : pfclear : goto room1_setup bank2 if s>135 then s=0 : u=0 if joy0right then missile0x{0}=0 : e=e+1 if joy0left then missile0x{0}=1 : e=e+1 if missile0x{0} then REFP0=8 else REFP0=0 CTRLPF=$01 : COLUBK=$90 COLUP1=$F4 : NUSIZ1=$00 : COLUPF=$20 if a=5 && v<8 then COLUP1=0 if a=5 && v=8 then COLUP1=$1d rem pfclear if a=1 then pfvline f i 11 on if a=3 then pfhline q ballx g on gosub mario_anim drawscreen return goomba_movement g=g+1 if g>19 then g=0 : h=(rand/64)+1 return otherbank jump missile0height=0 if !joy0fire && l{4} then l{4}=0 : l{5}=1 : player0y=player0y+1 if collision(player0,playfield) && l{5} then r=0 : goto jump2 if joy0fire && !l{4} && !l{5} && !joy0up && !joy0down then l{4}=1 if !joy0fire && l{4} then l{4}=0 : l{5}=1 if collision(player0,playfield) && l{4} then player0y=player0y+2 : l{4}=0 : l{5}=1 if l{4} && r<30 then player0y=player0y-1 : r=r+1 if l{4} && r>29 then l{4}=0 : l{5}=1 if l{4} || l{5} then AUDC1=12 : AUDF1=r : AUDV1=4 if player0y>80 then r=0 : player0y=80 : y=0 : AUDV1=0 rem if l{5} && r=0 && player0x>133 then r=0 : l{5}=0 if l{5} && r>0 then r=r-1 : player0y=player0y+1 if l{5} && r=0 then l{5}=0 if l{5} && a<5 && collision(player0,player1) then player1y=200 : l{3}=1 jump2 if r=0 && a=3 then player0y=player0y-1 if r=0 then l{4}=0 : l{5}=0 : y=0 : d=0 if !l{4} && !l{5} && !l{6} then AUDV1=0 return world_1_part2_setup pfclear COLUBK=$90 f=32 world_1_part2_setup_2 rem a=2 if !l{2} then player1: %0001000 %0011100 %0011100 %0011100 %0001000 end player1x=1 : player1y=w if a=3 then player1x=126 : player1y=w a=2 rem drawscreen AUDV1=0 world_1_part2 if joy0right then missile0x{0}=0 if joy0left then missile0x{0}=1 if missile0x{0} then REFP0=8 else REFP0=0 if l{2} then player1: %0 end rem x=spinning coin counter timer world_1_part_3 if v<9 then AUDF0=level_1_notes[s] : AUDC0=12 AUDV0=4 t=t+1 if t>level_1_length[u] then t=0 : u=u+1 : s=s+1 if s>135 then s=0 : u=0 CTRLPF=$01 : COLUBK=$90 COLUP1=$1c NUSIZ1=$00 : COLUPF=$20 rem if j<10 then j=i+7 else j=10 player1y=w missile0y=200 : bally=200 if !l{6} && z=0 && r=0 then AUDV1=0 if l{6} then z=z+1 : AUDV1=4 : AUDC1=4 if l{6} && z<5 then AUDF1=19 if l{6} && z>4 then AUDF1=9 if l{6} && z>19 then l{6}=0 : z=0 gosub mario_anim drawscreen gosub spincoin if switchreset then s=0 : t=0 : u=0 : player0y=25 : player0x=48 : goto castle_lobby_setup bank2 if joy0fire && !m{0} && !m{1} && player0y<89 then m{0}=1 if !joy0fire && m{0} then m{0}=0 : m{1}=1 if m>0 then gosub jump if m=0 then r=0 if joy0left && player0x>39 then player0x=player0x-1 if joy0left && player0x<40 then player0x=40 : g=g+1 : player1x=player1x+1 if g>7 then g=0 : f=f+1 if joy0right && player0x<101 then player0x=player0x+1 if joy0right && player0x>100 then f=f-1 : player1x=player1x-1 if player1x>126 then goto world_1_part_4_setup if collision(player0,player1) && !l{6} && !l{2} then p=1 : l{2}=1 : l{6}=1 : z=0 if joy0down && player0y<80 then player0y=player0y+1 : q=4 : k=5 : e=e+1 if joy0down && player0y>79 then c=c+1 : w=w-1 : o=o-1 : e=e+1 if joy0up && player0y>32 then player0y=player0y-1 : q=252 : k=5 : e=e+1 if joy0up && player0y<33 then b=b+1 : w=w+1 : o=o+1 : e=e+1 if w<28 then w=28 : player1: %0 end if w>87 then w=87 rem if joy0up then b=b+1 if player1x=0 then a=1 : f=30 : player1x=150 : player1y=o : goto world_1_part1 bank2 if b>7 then i=i+1 : b=0 if c>7 then i=i-1 : c=0 if i<3 then i=3 if i>10 then i=10 goto world_1_part2 world_1_part_4_setup a=3 q=0 rem f=0 ballx=(player1y-1)/8 g=0 k=0 : missile0height=0 world_1_part_4 if joy0fire && !l{5} && !joy0up && !joy0down then l{4}=1 if l{4} || l{5} then AUDC1=12 : AUDF1=r : AUDV1=4 : gosub jump if !l{4} && !l{5} then AUDV1=0 if joy0right then missile0x{0}=0 : k=k+1 if joy0left then missile0x{0}=1 if missile0x{0} then REFP0=8 else REFP0=0 if joy0right && player0x>40 then player0x=40 if k>4 && joy0right && q=0 then pfhline q ballx g off : g=g-1 : k=0 if k>4 && joy0right && q<15 then pfhline q ballx g off : q=q-1 : g=g-1 : k=0 if k>4 && joy0right && q>14 then pfhline q ballx g off : q=q-1 : k=0 if k>4 && joy0right && collision(player0,playfield) then d=255 if joy0right && q=0 && g=0 then player1x=126 : player1y=w : goto world_1_part2_setup if joy0left && player0x<41 then player0x=40 if k>4 && joy0left && player0x=40 && q<31 then pfhline q ballx g off : q=q+1 if joy0left && player0x>39 then player1x=player1x+1 : k=k+1 if k>4 && joy0left && collision(player0,playfield) then d=1 if k>4 && g<15 && joy0left then pfhline q ballx g off : g=g+1 : k=0 if k>4 && g>14 && g<31 && joy0left then pfhline q ballx g off : g=g+1 : q=q+1 : k=0 if k>4 && g=31 && joy0left then pfhline q ballx g off : q=q+1 : k=0 if joy0left && q=31 then goto world_1_part_5_setup y=0 if joy0up then missile0height=missile0height+1 : y=1 : e=e+1 if player0y<32 && r=0 then player0y=32 if missile0height>7 && joy0up && ballx<10 then pfhline q ballx g off : ballx=ballx+1 : missile0height=0 : i=i+1 : w=w+8 if w<32 then w=32 if w>80 then w=80 if player0y>80 then player0y=80 if joy0down then missile0height=missile0height+1 : y=255 : e=e+1 if missile0height>7 && joy0down && ballx>3 then pfhline q ballx g off : ballx=ballx-1 : missile0height=0 : i=i-1 : w=w-8 if collision(player0,playfield) then goto coll_with_pf player0x=player0x-d player0y=player0y-y coll_with_pf player1: %0 end COLUPF=$20 if switchreset then s=0 : t=0 : u=0 : player0y=25 : player0x=48 : goto castle_lobby_setup bank2 gosub ds_stuff bank3 if collision(player0,playfield) && !joy0up then player0y=player0y+y : missile0height=0 if collision(player0,playfield) && joy0up then player0y=player0y+y : missile0height=0 : e=e+1 if collision(player0,playfield) && r=0 && !joy0up && !joy0down && player0y<120 && g<14 then pfhline q ballx g off : g=g-1 : player0x=player0x+d if collision(player0,playfield) && r=0 && !joy0up && !joy0down && player0y<120 && g>14 then pfhline q ballx g off : q=q+1 : g=g+1 : player0x=player0x+d coll_with_pf_1 if !collision(player0,playfield) then y=0 : d=0 goto world_1_part_4 world_1_part_5_setup player1x=8 : player1y=80 : h=0 : a=5 : v=0 world_1_part_5 if joy0left then player0x=player0x-1 if joy0left && player0x<25 then player0x=25 if joy0right then player0x=player0x+1 if joy0right && player0x>40 then q=31 : g=31 : missile0height=0 : a=3 : i=0 : goto world_1_part_4 if joy0down && player0y<80 then player0y=player0y+1 : i=i+1 : e=e+1 if joy0up && player0y>30 then player0y=player0y-1 : i=i+1 : e=e+1 if joy0down && i>7 && ballx>3 then i=0 : ballx=ballx-1 : e=e+1 if joy0up && i>7 && ballx<9 then i=0 : ballx=ballx+1 : e=e+1 if collision(player0,player1) && v=0 && joy0fire then v=5 if !joy0fire && v=5 then v=6 if v=6 then player1x=player0x : player1y=player0y-8 if v=6 && joy0fire then v=7 if v=7 then player1x=player1x+4 : player1y=player1y+2 if v=7 && player1y>80 then v=8 if v=7 && collision(player1,playfield) && player0y<40 then v=8 if collision(player0,player1) && v=0 && !joy0fire then goto world_1_setup bank2 if joy0fire && !m{0} && !m{1} && player0y<89 then m{0}=1 if !joy0fire && m{0} then m{0}=0 : m{1}=1 if m>0 && !collision(player1,player0) then gosub jump player1: %010100 %010100 %011110 %111111 %111111 %110101 %111111 %011110 end if v=8 then player1x=28 : player1y=10 : player1: %1100011 %1100011 %0111110 %0111110 %1111111 %1111111 %0011100 %0011100 %0001000 %0001000 end if collision(player0,player1) && v=8 then t=0 : s=0 : u=0 : player1y=222 : v=9 h=h+1 if h>3 then gosub bob_omb_move gosub ds_stuff goto world_1_part_5 bob_omb_move h=0 if v>7 then return if player1x>player0x then player1x=player1x-1 : REFP1=8 if player1xplayer0y then player1y=player1y-1 if player1y9 then x=0 : p=p+1 if p=5 then p=1 if !l{2} && p=1 then player1: %0001000 %0011100 %0011100 %0011100 %0001000 end if !l{2} && p=2 then player1: %0011100 %0111110 %0111110 %0111110 %0011100 end if !l{2} && p=3 then player1: %0001000 %0011100 %0011100 %0011100 %0001000 end if !l{2} && p=4 then player1: %0001000 %0001000 %0001000 %0001000 %0001000 end return mario_anim player0: %00011000 %00010000 %00010000 %00010000 %10000000 %10111100 %10111101 %10111101 %10111101 %01111110 %00011000 %00011100 %00011100 %00011100 %00011111 %00001100 end if e{4} then player0: %00110110 %00100100 %00100100 %00100100 %00000001 %00111101 %10111101 %10111101 %10111101 %01111110 %00011000 %00011100 %00011100 %00011100 %00011111 %00001100 end return bank 4