Re: [stella] Sprite graphics

Subject: Re: [stella] Sprite graphics
From: "Andrew Davie" <atari2600@xxxxxxxxxxxxx>
Date: Wed, 13 Oct 2004 21:06:21 +1100
If you place a sta WSYNC after the call to PositionSprite you'll see the jump disappear
So it's not the routine, rather it is the timing of the code following it. Since towards the right side of the screen, you're very near the end of the scanline, there isn't enough time to do the next bit of code just before the following WSYNC... so it jumps an extra line. If you always put in a WSYNC after the position, you guarantee that the next bit of code always starts at the same place horizontally :)

----- Original Message ----- From: "Kevin Lipe" <kevin.lipe@xxxxxxxxx>
To: <stella@xxxxxxxxxxxxxxxxxx>
Sent: Wednesday, October 13, 2004 12:27 PM
Subject: Re: [stella] Sprite graphics

Well... now I've gotten myself into a new problem and I don't know how
to remedy it. I'm using the simple code from the 2600 Programming for
Newbies tutorial to move the Bad Llama sprite across the screen, and
this subroutine is giving me problems:

sta WSYNC ; (4)
; Pass X register holding desired X position of sprite!
lda Divide15,x ; xPosition / 15...
SimpleLoop dex
bne SimpleLoop

sta RESP1 ; start drawing the sprite

The problem is that once Bad Llama gets about halfway across the
screen, the SimpleLoop starts taking too long and the kernel makes an
extra scanline, which goes away once Bad Llama resets to being on the
left side of the screen. I've wracked my brain for a good hour and
can't come up with a quicker way to do this... how do the pros do it?

Thanks for letting me ask dumb beginner questions when I don't
understand things,

Archives (includes files) at
Unsub & more at
You are subscribed as: atari2600@xxxxxxxxxxxxx
To unsubscribe, send email to:
Or go to:

Current Thread