Primordial Ooze Posted November 22, 2009 Share Posted November 22, 2009 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 Quote Link to comment Share on other sites More sharing options...
Wickeycolumbus Posted November 22, 2009 Share Posted November 22, 2009 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. Archive 17.zip Quote Link to comment Share on other sites More sharing options...
Primordial Ooze Posted November 22, 2009 Author Share Posted November 22, 2009 (edited) 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 November 22, 2009 by Primordial Ooze Quote Link to comment Share on other sites More sharing options...
Wickeycolumbus Posted November 22, 2009 Share Posted November 22, 2009 No problem Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.