|
Yes it worked!! Memblers was right, the odd number thing was still way too fast, so I put a delay in the infinite loop and put the sprite flip in there. However then his whole movement was delayed as well and although his feet were nice, he moved way too slow. So, I tried RoboNES's idea and stuck everything in NMI routine and it works perfectly! The counter is initialized at 30 initially in the Start section. Man my NMI routine is getting big, I am used to it being nothing at all in all the beginning tutorials.
NMI: pha ;push accumulator onto stack lda #0 sta $2006 sta $2006 lda #0 ;DMA trigger routine sta $2003 lda #3 sta $4014
ldx $02FE ;load nmi counter address dex ;decrement it bne storex ;if not 0, don't flip sprite
lda Sprite1_S eor #%01000000 ;special sprite byte, flips horizontally! sta Sprite1_S ; need to store it back so next time the correct thing happens. ldx #30 ;restart frame counter
storex stx $02FE ;store decremented counter if not 0 yet
pla ;pull stack val back
rti
Thanks again for the help guys! Heh, the guy reminds me of guantlet.. I was trying to get it to look dragon warrior like, but I played it yesterday and noticed they made everything 16x16 pixels, not 8x8. It makes me wonder if the hero is not actually a sprite, but just a tiny little background and his movement is simply the illusion due to the landscape scrolling all around him.
-Pulper
|