Jump to content
  • entries
    5,048
  • comments
    2,756
  • views
    1,822,595

Bob the Blueberry


atari2600land

384 views

So I worked and worked for hours. I finally got it so not only does the blueberry chase you around, but it does so only on a specific screen. You start on screen 1 and then move right, just like in Pitfall (although in this game you can't move left at the starting screen.) Screen 2 has the blueberry and screen 3 doesn't. Surprisingly, having the blueberry chase Craig was the easy part. What turned out to be extremely hard and basically most of my programming was moving from screen to screen.

blogentry-9475-0-21418200-1535883876.png

What's next for this game?

First off, I have to make it so instead of screen 2 having the blueberry, making a screen type variable and if THAT is 1, then have the blueberry. And then making screen 2 having the screen type be 1. (As opposed to 0, which would be nothing on screen.) This is tomorrow's work because it's 3:30am and I've been sitting here sweating for hours because it is hot. Why it's hot at 3:30am is a mystery to me as well.

Then after that, I can make more screen types where different stuff shows up. But what will be a problem is a huge block of code that says stuff like if screen=1 then screentype=0, if screen=2 then screentype=1, and so on. I don't think there's a way to have the "on" function in assembly. If there's a better way, like how Mr. Crane did it in Pitfall, then please tell me.

And in case you have a Channel F emulator set up, I've made a webpage where you can download the latest file.

2 Comments


Recommended Comments

If you're using Assembly Language, then you should be able to do something similar to the "Select Case" or "On X Goto" statement in BASIC dialects. As a matter of fact, such "switch" statements are just very slightly removed from Assembly's dispatch tables.

 

I do not know your specific Assembly dialect, but the typical construct is something like this (in pseudo code):

  1. Move In Value to Register
  2. Add base address of dispatch table to Register
  3. Move In address pointed to by Register (indirect mode) to Program Counter

If your language does not support moving an address from a Register to the Program Counter then:
  3. Move In address pointed to by Register (indirect mode) to Index Register
  4. Branch to Index Register

I hope that helps!

 

-dZ.

Link to comment

The Dispatch Table is just an array of addresses to the individual procedures.

 

Basically, you are using the value of a variable as an index into the array, and jumping to that address.

Link to comment
Guest
Add a comment...

×   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...
  • Recently Browsing   0 members

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