[stella] Earliest safe write to PF1 for asymmetrical playfield?

seagtgruff at aol.com seagtgruff at aol.com
Sat Jul 5 06:57:51 CDT 2008


For any given playfield pixel, you must write to the appropriate playfield register at least two-thirds of a machine cycle before the pixel begins if you want that pixel to display the new value. If subtracting two-thirds of a cycle puts you partway into a cycle, then you must round down to the beginning of that cycle (i.e., truncate the fractional part).

- The last pixel of PF1 (left side) begins?at color clock 112.
- Dividing that by 3 gives us machine cycle 37 and one-third.
- Subtracting two-thirds of a cycle gives us 36 and two-thirds.
- Rounding down (or truncating), we get cycle 36.
- So if you write to PF1, and the write ends on cycle 36, the last pixel of PF1 (left side) will display the new value, "corrupting" PF1.
- But if the write to PF1 ends on cycle 37, then the left copy of PF1 will be okay.

So the short answer is "37." :)

Michael


-----Original Message-----
From: R Mundschau <rmundschau at frontiernet.net>
To: Atari 2600 programming list <stella at atari2600.org>
Sent: Fri, 4 Jul 2008 5:20 pm
Subject: [stella] Earliest safe write to PF1 for asymmetrical playfield?



Hello,

I know that I need to write to PF2 on cycle 48 to create an  
asymmetrical playfield with a reflected PF.  What is the earliest I  
can write to PF1 for the right hand side of a playfield without  
corrupting the left side?  It must be either cycle 37, 38, or 39.     
Does anybody know?

Thanks,
Rob

_______________________________________________
Stella mailing list
Stella at atari2600.org
http://atari2600.org/mailman/listinfo/stella

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://atari2600.org/pipermail/stella/attachments/20080705/432c006f/attachment.html 


More information about the Stella mailing list