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
Coordinate System Messed Up
Started by Primordial Ooze, Nov 21 2009 9:50 PM
3 replies to this topic
#1
Posted Sat Nov 21, 2009 9:50 PM
#2
Posted Sat Nov 21, 2009 10:11 PM
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:
Attached is a fixed binary and source.
For example:
Constant equ $3F
lda Constant ;loads address $003F
lda #Constant ;loads the immediate value #$3F
Attached is a fixed binary and source.
Attached Files
#3
Posted Sat Nov 21, 2009 10:22 PM
Wickeycolumbus, on Sat Nov 21, 2009 10:11 PM, said:
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:
Attached is a fixed binary and source.
For example:
Constant equ $3F
lda Constant ;loads address $003F
lda #Constant ;loads the immediate value #$3F
Attached is a fixed binary and source.
Sincerely,
Dino Dash Derby
Edited by Primordial Ooze, Sat Nov 21, 2009 10:22 PM.
#4
Posted Sat Nov 21, 2009 10:26 PM
No problem
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users















