Jump to content
IGNORED

Coordinate System Messed Up


Primordial Ooze

Recommended Posts

In my game the y register holds the scan line the Atari in currently drawing. The y register starts at 191(top) and continues to decrement until it reaches the final scan line(1) after which it goes into vertical blank. However for some reason, i have the constant TOPDINOY which is equal to 80 in hexadecimal and the top Dino in being drawn at the very bottom of the screen. In another constant called BOTTOMDINOY equal to 40 in hexadecimal, it is being drawn above the top Dino. According to the scan list count the top Dino should be drawn somewhere close to the center of the screen and the bottom Dino 40 scan lines lower but, not at the very edge. I have attached my assembly code as a reference. Could someone please help me?

 

Sincerely,

 

Dino Dash Derby

 

 

Link to comment
Share on other sites

When using constants, you must put the number sign before the name of the constant, otherwise DASM will think it is an address.

 

For example:

 


Constant    equ $3F

   lda Constant   ;loads address $003F
   lda #Constant  ;loads the immediate value #$3F

 

Attached is a fixed binary and source.

I figured it was going to be something very silly on my part. :( Thanks for fixing my code, i really appreciated it. :)

 

Sincerely,

 

Dino Dash Derby

Edited by Primordial Ooze
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...
  • Recently Browsing   0 members

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