NESDev and Strangulation Records messageboards
Forum Index | FAQ | New User | Login | Search

Previous ThreadView All ThreadsNext ThreadShow in Flat Mode*


SubjectRe: Sprite Slowdown  
Posted bypulper
Posted on12/25/03 4:02 PM
From IP132.241.65.133  



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

-
Entire Thread
Subject  Posted byPosted On
*Sprite Slowdown  pulper12/24/03 10:39 PM
.*Re: Sprite Slowdown  Memblers12/25/03 02:02 AM
..*Re: Sprite Slowdown  RoboNes12/25/03 12:30 PM
....Re: Sprite Slowdown  pulper12/25/03 4:02 PM
....*Re: Sprite Slowdown  Memblers12/25/03 6:42 PM
.....*Re: Sprite Slowdown  pulper12/25/03 8:35 PM
......*Re: Sprite Slowdown  Memblers12/25/03 9:46 PM
.......*Finished  pulper12/25/03 10:41 PM
........*Re: Finished  pulper12/26/03 00:59 AM
..*Re: Sprite Slowdown  quietust12/25/03 03:16 AM
...*Re: Sprite Slowdown  Memblers12/25/03 06:30 AM
..*Re: Sprite Slowdown  Memblers12/25/03 02:06 AM
Jump to

Memblers' homepage             Contact Me

Forums powered by WWWThreads Demo