[stella] 6502 Less Than / Greater Than Help!

Subject: [stella] 6502 Less Than / Greater Than Help!
From: KirkIsrael@xxxxxxxxxxxxx
Date: 5 Jul 2002 22:55:58 -0000
Ok, am I being dumb here?
I have one variable, YPosFromBottom...this is how many
scanlines the top of the sprite is from the bottom...
if that number is less than 6, I assume it has hit the floor.

;check if player hit floor
	LDA #6
	CMP YPosFromBot
	BMI DoneCheckingHitFloor
;we need a better bounce routine, like reducing the speed?
	LDA #-4;
	STA PlayerVertSpeed

	LDA YPosFromBot

	LDA #10
	STA YPosFromBot
The thing is, this seems to happen if YPosFromBot
is large, like maybe around 160, as well as small,
the under 6 I was hoping for.  At least, that's 
what I think I'm seeing, and I've been doing a lot
to isolate it (I had to...combined with my "have
I hit the ceiling routine, I was getting the sucker
freezing in place and acting otherwise confusingly...
other than this, I think my movement routine is 
coming along very well...) Any suggestions what
I'm doing wrong here? Something with the carry bit?

Thanks for any help!

PS I actually have to 6502 books on order from the 
library, but they're slow to get here over the 

KirkIsrael@xxxxxxxxxxxxx    http://kisrael.com
"Morality's lease is up and Science has the keys to the apartment."
        -Ander's Mad Scientist Page

Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/

Current Thread