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 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 light blue COLUBK = 142 rem set the playfield color to yellow COLUPF = 30 rem set the color of the score to light purple scorecolor = 116 rem set the life bar to compact dim lives_compact=1 rem drefine the playfield pfpixel 16 2 on:pfpixel 8 6 on:pfpixel 23 6 on:pfpixel 16 10 on rem diagram of the playfield rem ................................ rem ................................ rem ................X............... rem ................................ rem ................................ rem ................................ rem ........X..............X........ rem ................................ rem ................................ rem ................................ rem ................X............... rem ................................ 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 = 96 rem define the miss counter lives: %00000000 %00000000 %00000000 %11111111 %11111111 %00000000 %00000000 %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 orange COLUP0 = 62 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 joy0up && collision(player0, playfield) && 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 joy0down && collision(player0, playfield) && 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 > 84 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 joy0left && collision(player0, playfield) && 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 joy0right && collision(player0, playfield) && 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 hasn't missed then set the live bar color to green if lives > 64 && lives < 97 then lifecolor = 192 rem if the player missed once then set the live bar color to yellow if lives > 32 && lives < 65 then lifecolor = 30 rem if the player missed twice times then set the life bar color to red if lives > 0 && lives < 33 then lifecolor = 78 rem if the player misses 3 times it's game over if lives < 31 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 note's color to orange COLUP0 = 62 rem draw the screen drawscreen goto gameOverLoop