Re: [stella] Asymmetrical Reflected Playfield

Subject: Re: [stella] Asymmetrical Reflected Playfield
From: Erik Mooney <erik@xxxxxxxxxx>
Date: Fri, 21 Sep 2001 13:10:24 -0400
9/21/2001 12:13:44 PM, Glenn Saunders <cybpunks2@xxxxxxxxxxxxx> wrote:

>We need to label the timings here...

Yes you do.  Use what's become the standard way of labeling cycle counts:

[numbers as if there's a WSYNC here]
         DEC ScanPix		+5  5
         BNE ScanGo		+2  7
         LDA #5		+2  9
         STA ScanPix		+3 12
         DEX		+2 14
         BNE ScanGo		+2 16
         LDX #6		+2 18

>         = max 19 cycles?  I didn't think this would take that long.

Takes 18 by my count.

>I thought about moving WSYNC to the physical end of the scanline code and 
>doing something like that, but that could potentially screw up the PF2 rewrite.

Set up your code to do what logically makes sense, then worry about the timing
of PF2.  There's plenty of ways to adjust the timing of a PF2 write.  If you need
single-cycle precision (when NOP won't do), you can do STA.W PF2 to make
the store happen one cycle later.

>I'm also assuming (and someone tell me if it's not possible) that I can 
>just zero out the playfield registers every other scanline and still have 
>enough time to load up all 4 sprite registers, using VDEL if necessary to 
>align a sprite on a playfield scanline.  We're talking double-scanline res 

Zeroing out the PF every other scanline requires a mere 8 cycles (LDA #0 /
STA PF1 / STA PF2), and can occur anywhere between cycle 54 (you can
start zeroing PF2 while the second PF1 is being displayed) and cycle
24 of the second scanline (finish PF1 by cycle 29, then do PF2.)

Only you can say if that gives you enough time to process all four sprite registers.

Archives (includes files) at
Unsub & more at

Current Thread