Hello,
I am writing my first ever NES rom using nesasm and I am having the strangest problem ever.
Basically, I am incrementing the x position of a sprite on every frame (I'm using VBlank). And for some reason, when i move the sprite one way (adc), it moves faster than when I move it the other way (sbc). This is basically what I'm doing:
I'm sure that I'm doing something completely wrong, and I apologize for the noob questions, but if someone can nudge me in the right direction, I would appreciate it.
EDIT: Can someone move this to the newbie section. I didn't mean to post it here.
I am writing my first ever NES rom using nesasm and I am having the strangest problem ever.
Basically, I am incrementing the x position of a sprite on every frame (I'm using VBlank). And for some reason, when i move the sprite one way (adc), it moves faster than when I move it the other way (sbc). This is basically what I'm doing:
Code:
infinite:
WaitForVBlank:
lda VBlankOrNo
cmp #1
bne WaitForVBlank
dec VBlankOrNoagain.
lda Player_X
sbc #1 ; if this is adc, sprite moves faster
sta Player_X
lda #3
sta $4014
jmp infinite
WaitForVBlank:
lda VBlankOrNo
cmp #1
bne WaitForVBlank
dec VBlankOrNoagain.
lda Player_X
sbc #1 ; if this is adc, sprite moves faster
sta Player_X
lda #3
sta $4014
jmp infinite
I'm sure that I'm doing something completely wrong, and I apologize for the noob questions, but if someone can nudge me in the right direction, I would appreciate it.
EDIT: Can someone move this to the newbie section. I didn't mean to post it here.