Jump to content
  • entries
    369
  • comments
    183
  • views
    9,225

I tried again.


Gamegearguy

288 views

So I was having horrible trouble getting the fireball to come when a specific amount of points was got. I programmed for a couple hours until I got something working on an Odyssey 2 emulator, but it didn't work on a real Odyssey 2. So I pulled an all-nighter trying to make the thing work on a real Odyssey 2. Finally, at 7:21 in the morning, I made it work.

This bit of code worried me:

    mov r0,#score_l   
    mov a,@r0    
    add a,#245
    jnc rrrrr

The four-digit score is broken up into two variables: low and high (hence the l.) This code checks to see if the score is bigger than 9 and if so, then go to the fireball code. But I was worried that the fireball might stop showing up if the player gets between 100-109 points. The high part are the thousands and hundreds digits and the low is tens and ones. So I was brave and attempted to put another bit of code before that.

    mov r0,#score_h   
    mov a,@r0    
    xrl a,#0
    jnz dddrrrrr

This says in essence if the score >99 then skip the score_l checking code. You have to be brave because one false move could break the entire game. That's why it's ultra-frustrating, not to mention very difficult to program for. The code is in 256-byte pieces called "pages" and you have to make sure to not pass page boundaries.

I need to make a new sprite for the turtle since he walks backwards if he comes out of the left pipe. Since all I would be doing is changing sprite definitions, that part of coding should be easy. The hard part is designing a turtle facing the camera like the crab does. I doubt it will end up being a turtle.

pipedown20.png.2ca2069308b9422ff0727936a9f84921.png

You'll also notice that the fireball sprite lost its yellow middle. This is due to Odyssey 2 limitations. You can't print characters and have them be off the screen. Since the fireball is off the screen sometimes, the score ended up being a flickery mess when it came time for the fireball to not be on the screen any more. That and I think I needed the extra space. I'm using up 2,003 out of a possible 2,048 bytes. The previous version had something like 2,030 bytes being used.

 

  • Wow! 1

1 Comment


Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...