Jump to content
IGNORED

I Like Bacon


atari2600land
 Share

Recommended Posts

It had been a long time since I had programmed anything. I see the last I programmed anything was December 5. So I decided to program something. But what? I thought of an old game I had made for the Atari 2600 called I Like Bacon about a guy going around getting bacon randomly placed. I figured this would be good to do. So here is what I have so far: A temporary guy sprite going up and down on an elevator. Right now he's on the right elevator but I programmed it so he can go on the left one if you place him there. There are no controls yet. Just this.

 

post-9475-0-30194200-1454566083_thumb.png

bacon1.bin

Link to comment
Share on other sites

I changed it so the elevator only moves up and down if you are on it. (This means you can move the guy now.) But now you can't fall down into the hole any more since the elevator will be there. I also changed the elevator from sprites to characters so now I have 3 sprites left. I'm thinking about making bacon strips a pink equals sign, but I'm not sure what to do yet.

bacon5ab.bin

Edited by atari2600land
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Well, first off, I used four characters of 2 quads rather than three characters. I think that helped a lot. If you download the code in this zip file, you can see the code in action beginning on line 1,128. I also did a minor update too. Someone posted a good pig picture so I put it in. As for where the code came from, it was on a now-gone webpage, so I am lucky enough to have spotted it before the page died.

 

bacon20160309.zip

  • Like 1
Link to comment
Share on other sites

Yeah, it looks like you're using binary coded decimal (BCD). The routine to update the highscore seems to be the same one you posted a year ago. I still think if you reverse the two checks, so you compare most significant BCD first, you will save one test case.

 

Can't you use the JC instruction to branch in the case R0 (current score) > A (highscore)?

 

 

check_highscore
  mov r1,#highscore_h
  mov a,@r1 ; get highscore high byte
  cpl a ; make highscore negative
  mov r0,#score_h
  add a,@r0 ; subtract highscore from score
  jc replace_highscore ; if score > highscore
  jnz no_highscore ; if score < highscore
 
  mov r1,#highscore_l ; check lower byte in case the high byte was equal
  mov a,@r1 ; get highscore low byte
  cpl a ; make highscore negative
  mov r0,#score_l
  add a,@r0 ; subtract highscore from score
  jnc no_highscore ; if score <= highscore
 
replace_highscore
  [.. as before ..]
no_highscore
  jmp start
Link to comment
Share on other sites

  • 3 weeks later...

Instead of a timer in the game, could you make it so that there is a pig on each floor.... a pig on floor 2, floor 3, and floor 4? Are you out of sprites?

 

It would sort of be similar to the fireballs in the second level of the Atari 2600 version of DONKEY KONG...

 

post-291-0-89207900-1459612636_thumb.png

 

Just an idea,

Tim

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...