set romsize 2k player0: %01100000 %11110000 %11110000 %11110000 %01100110 %00001111 %00001111 %00001111 %00000110 %00000000 %00111100 %01111110 %01111110 %01111110 %01111110 %00111100 %00000000 %00110000 %01111000 %01111000 %01111000 %00110000 %00000000 %00001110 %00011111 %00011111 %00011111 %00001110 %01100000 %11110000 %11110000 %11110000 %01100000 %00000000 %00011110 %00111111 %00111111 %00111111 %00111111 %00111111 %00011110 %00000000 %01111100 %11111110 %11111110 %11111110 %11111110 %11111110 %11111110 %01111100 %00000000 %00000110 %00001111 %00001111 %00001111 %01100110 %11110000 %11110000 %01100000 %00000000 %00011100 %00111110 %00111110 %00111110 %00011100 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 %01100000 %11110000 %11110000 %11110000 %01100110 %00001111 %00001111 %00001111 %00000110 %00000000 %00111100 %01111110 %01111110 %01111110 %01111110 %00111100 %00000000 %00110000 %01111000 %01111000 %01111000 %00110000 %00000000 %00001110 %00011111 %00011111 %00011111 %00001110 %01100000 %11110000 %11110000 %11110000 %01100000 %00000000 %00011110 %00111111 %00111111 %00111111 %00111111 %00111111 %00011110 %00000000 %01111100 %11111110 %11111110 %11111110 %11111110 %11111110 %11111110 %01111100 %00000000 %00000110 %00001111 %00001111 %00001111 %01100110 %11110000 %11110000 %01100000 %00000000 %00011100 %00111110 %00111110 %00111110 %00011100 end game_reset player1: %11100000 %01001110 %11111111 %01001110 %11100000 end player0x = 144 player0y = (rand&63) + 88 player0y = 88 a = (rand&127) if a < 64 then y = 1 else y = -1 player1x = 20 player1y = 46 z = 1 t = 0 player0score = $00 wait_to_start COLUP0 = $00 COLUP1 = $0E if !joy0fire then z = 0 drawscreen if joy0fire && z = 0 then goto game_loop goto wait_to_start game_loop COLUBK = $00 COLUP0 = $0E NUSIZ0 = $05 COLUP1 = $0E player0scorecolor = $0E player1scorecolor = $00 t = t + 1 if t = 3 then player0y = player0y + y : t = 0 if player0y > 150 then y = -1 if player0y < 89 then y = 1 player0x = player0x - 1 if player0x < 1 then player0score = addbcd(player0score, 1) : player0x = 144 : player0y = (rand&63) + 88 if joy0fire then player1y = player1y - 1 else player1y = player1y + 1 if player1y < 6 || player1y > 87 then goto crash drawscreen if collision(player0,player1) then goto crash goto game_loop crash player1: %00100100 %10000001 %00100100 %10000001 %00100100 end player0x = 144 x = 0 crash_loop COLUP1 = $0E x = x + 1 AUDV0 = 8 : AUDC0 = 8 : AUDF0 = x drawscreen if x < 30 then goto crash_loop AUDV0 = 0 z = 1 wait_for_player if !joy0fire then z = 0 if joy0fire && z = 0 then goto game_reset drawscreen goto wait_for_player inline playerscores.asm inline bcd_math.asm