Re: [stella] Star Fire - Return of the Starfield ?!?

Subject: Re: [stella] Star Fire - Return of the Starfield ?!?
From: Erik Mooney <erik@xxxxxxxxxx>
Date: Sun, 21 Jul 2002 17:43:36 -0400
On Sun, 21 Jul 2002 21:01:25 +0200, you wrote:

>I can tell you, why it must flicker that much. 
>The reason is actually simple: Repositioning an object 
>takes a whole scannline.

Not necesssarily.  Set it up with ten to twelve different versions of the
scanline in question, each with the reposition hardcoded.  Use the JMP
Indirect instruction to get to the right one.  Offscreen (or even during
the kernel) you'd calculate the address of the routine to jump to, and
store it in SpritePosAddr.  Also offscreen you'd calculate the HMP0 value.

STA HMCLR
LDA [SpriteHMove]
STA HMP0
JMP [SpritePosAddr]  'jump to any of the Label# addresses

Label1:
instruction1
instruction2
STA RESP0
instruction3
instruction4
...
instruction20
JMP EndOfLine

Label2:
instruction1
...
instruction4
STA RESP0
instruction5
...
instruction20
JMP EndOfLine

Label3:
instruction1
...
instruction6
STA RESP0
instruction7
...
instruction20
JMP EndOfLine

and so on.

EndOfLine:
STA WSYNC
STA HMOVE


Takes a ton of ROM, but saves gobs of CPU time for sprite positioning.
I've been trying to find time to code this in a proof-of-concept for, oh,
about three years now. :)
----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread