rem 2600 De Amigo rem a Samba De Amimo clone for the 2600 rem Updated: October 11, 2008 rem Website: http://planetarydefense.freepgs.com rem includes rem 6 lives kernal rem include 6lives.asm rem setup all the game variables rem variable to hold note direction dim notedirection = a rem set the rom size set romsize 2k rem set the tv format to NTSC set tv ntsc rem turn on smartbranching set smartbranching on rem kernel options rem enable no blank lines set kernel_options no_blank_lines rem set the color of the background to white COLUBK = 0 rem set the playfield color to black COLUPF = 14 rem set the score field color scorecolor = 128 rem set the color of the miss counter lifecolor = 66 rem define the playfield playfield: ................................ ................................ ................X............... ................................ ................................ ................................ ........X..............X........ ................................ ................................ ................X............... ................................ ................................ end rem enable the "High Definition" playfield hack pfscroll upup : pfscroll upup rem define first note sprite player0: %00111100 %00111100 %00111100 %00111100 %00111100 %00111100 %00111100 %00111100 end rem start a new game startNewGame rem start the player with 0 strikes lives = 0 rem define the miss counter lives: %00000000 %01000010 %00100100 %00011000 %00011000 %00100100 %01000010 %00000000 end rem reset player's score to 0 score = 0 rem set first note's inital x position off screen player0x = 79 rem set first note's inital y position off screen player0y = 51 rem set the note's initial direction to 0 (none) notedirection = 2 gameLoop rem if the reset switch is pressed, start a new game if switchreset then startNewGame rem set note's color to white COLUP0 = 14 rem move the note cue based on the notes direction rem if notedirection is 1(up) move the note cue up if notedirection = 1 then player0y = player0y - 1 rem if notedirection is 2(down) move the note cue down if notedirection = 2 then player0y = player0y + 1 rem if notedirection is 3(left) move the note cue left if notedirection = 3 then player0x = player0x - 1 rem if notedirection is 4(left) move the note cue right if notedirection = 4 then player0x = player0x + 1 rem if the notedirection is up(1) and thejoystick is rem up while it is colliding with the playfield rem give the user points and move the arrow back rem to the center if collision(player0, playfield) && joy0up && notedirection = 1 then score = score + 1:player0x = 79:player0y = 51 rem if the player misses the up note then give the rem player a miss and move the arrow back to the center if player0y > 16 then lives = lives + 32:player0x = 79:player0y = 51 rem if the notedirection is down(2) and the joystick is rem down while it is colliding with the playfield rem give the user points and move the arrow back rem to the center if collision(player0, playfield) && joy0down && notedirection = 2 then score = score + 1:player0x = 79:player0y = 51 rem if the player misses the down note then give the rem player a miss and move the arrow back to the center if player0y < 78 then lives = lives + 32:player0x = 79:player0y = 51 rem if the notedirection is left(3) and the joystick is rem left while it is colliding with the playfield rem give the user points and move the arrow back rem to the center if collision(player0, playfield) && joy0left && notedirection = 3 then score = score + 1:player0x = 79:player0y = 51 rem if the player misses the left note then give the rem player a miss and move the arrow back to the center if player0x > 44 then lives = lives + 32:player0x = 79:player0y = 51 rem if the notedirection is right(4) and the joystick is rem rightt while it is colliding with the playfield rem give the user points and move the arrow back to rem the center if collision(player0, playfield) && joy0right && notedirection = 4 then score = score + 1:player0x = 79:player0y = 51 rem if the player misses the rightt note then give the rem player a miss and move the arrow back to the center if player0x < 109 then lives = lives + 32:player0x = 79:player0y = 51 rem if the player misses 3 times it's game over if lives > 128 then gameOver rem draw the screen drawscreen goto gameLoop rem Game Over Screen gameOver gameOverLoop rem if the reset switch is pressed, start a new game if switchreset then startNewGame rem if the joystick fire button is pressed start a new game if joy0fire then startNewGame rem set first note's color to white COLUP0 = 14 rem draw the screen drawscreen goto gameOverLoopPlease take a look and let me know what you find.
Sincerely,
Open Source Pong













