Re: [stella] Sprite graphics

Subject: Re: [stella] Sprite graphics
From: Kevin Lipe <kevin.lipe@xxxxxxxxx>
Date: Tue, 12 Oct 2004 20:27:15 -0500
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,

Attachment: llama.asm
Description: Troff document

Current Thread