Re: [stella] playfield on-the-fly updates

Subject: Re: [stella] playfield on-the-fly updates
From: bwmott@xxxxxxxxxxxx
Date: Tue, 12 May 1998 22:23:08 -0400 (EDT)
> Before I reinvent the wheel, can anybody comment on the feasibility of
> producing a non-repeated playfield by writing PF0, PF1 and PF2 chasing the
> scanning beam before data required for the repeated section?  Of course,
> there would be two lots of writes required per scan line, but I'm interested
> to know if its been done.  What I'm asking, I guess, is when it comes to
> drawing the right half of the PF, does the hardware re-read the PF
> registers, or is it buffered internally somehow?

As I'm sure you know by now this is possible and used by many games.   
Recently, I ran a few tests to see when changes to the PF registers 
really occur and here are the results I got.  I'm pretty sure these 
were for an unreflected playfield.

Have Fun!
Brad

P.S. You're 4 color playfield doesn't look very good using 
     Stella (the emulator) running under X windows.  Since
     changing the colors of the playfield every frame makes
     the emulator redraw most of the window every frame.  I'd
     suggest limiting the 4 colors to a small part of the
     screen if you want it playable on the emulators.


Changing CTRLPF PF Bits
-----------------------

* Change the reflect bit at or before cycle 48 and the display
  will correspond to the reflect value you specify

* Change the reflect bit after cycle 48 and the display will
  correspond to the old reflect value

* Changes to the score bit and the priority bit take effect
  at the end of the cycle they are changed (even in the middle
  of a 4 pixel wide playfield block)


Hitting PF Registers
--------------------

Here are the results of hitting PF0, PF1, and PF2 at various cycles.
The end result of this table is that the display of changes to the 
playfield registers are delayed by some number of pixels.  The delay 
is either 2, 3, 4 or 5 pixels depending on when the register is hit.  
Looks like the delay can be calculated as delay[cycle mod 4], where 
the delay array is given as delay[4] = {4, 5, 2, 3}.

Cycle  Pixel   Effect
-----  -----   ------
 22     -2     No display problems                   (cy * 3 - 68) + d = ?
 23      1     First  4 pixels of PF0 not changed    (23 * 3 - 68) + 3 = 4
 24      4     First  8 pixels of PF0 not changed    (24 * 3 - 68) + 4 = 8
 25      7     First 12 pixels of PF0 not changed    (25 * 3 - 68) + 5 = 12
 26     10     First 12 pixels of PF0 not changed *  (26 * 3 - 68) + 2 = 12
 27     13     First 16 pixels of PF0 not changed    (27 * 3 - 68) + 4 = 16
 28     16     First  4 pixels of PF1 not changed    (28 * 3 - 68) + 4 = 20
 29     19     First  8 pixels of PF1 not changed          . 
 30     22     First  8 pixels of PF1 not changed *        .
 31     25     First 12 pixels of PF1 not changed          .
 32     28     First 16 pixels of PF1 not changed
 33     31     First 20 pixels of PF1 not changed
 34     34     First 20 pixels of PF1 not changed *
 35     37     First 24 pixels of PF1 not changed
 36     40     First 28 pixels of PF1 not changed
 37     43     First 32 pixels of PF1 not changed
 38     46     First 32 pixels of PF1 not changed *
 39     49     First  4 pixels of PF2 not changed
 40     52     First  8 pixels of PF2 not changed
 41     55     First 12 pixels of PF2 not changed
 42     58     First 12 pixels of PF2 not changed *
 43     61     First 16 pixels of PF2 not changed
 44     64     First 20 pixels of PF2 not changed
 45     67     First 24 pixels of PF2 not changed
 46     70     First 24 pixels of PF2 not changed *
 47     73     First 28 pixels of PF2 not changed 
 48     76     First 32 pixels of PF2 not changed
 49     79     First  4 pixels of PF0 not changed
 50     82     First  4 pixels of PF0 not changed *
 51     85     First  8 pixels of PF0 not changed
 52     88     First 12 pixels of PF0 not changed
 53     91     First 16 pixels of PF0 not changed
 54     94     First 16 pixels of PF0 not changed *
 55     97     First  4 pixels of PF1 not changed
 56    100     First  8 pixels of PF1 not changed
 57    103     First 12 pixels of PF1 not changed
 58    106     First 12 pixels of PF1 not changed *
 59    109     First 16 pixels of PF1 not changed
 60    112     First 20 pixels of PF1 not changed
 61    115     First 24 pixels of PF1 not changed
 62    118     First 24 pixels of PF1 not changed *
 63    121     First 28 pixels of PF1 not changed
 64    124     First 32 pixels of PF1 not changed
 65    127     First  4 pixels of PF2 not changed
 66    130     First  4 pixels of PF2 not changed *
 67    133     First  8 pixels of PF2 not changed
 68    136     First 12 pixels of PF2 not changed
 69    139     First 16 pixels of PF2 not changed
 70    142     First 16 pixels of PF2 not changed *
 71    145     First 20 pixels of PF2 not changed
 72    148     First 24 pixels of PF2 not changed
 73    151     First 28 pixels of PF2 not changed
 74    154     First 28 pixels of PF2 not changed *
 75    157     First 32 pixels of PF2 not changed

--------------------------------------------------------------------------
Bradford W. Mott (bwmott@xxxxxxx)          Computer Science Department
http://www4.ncsu.edu/~bwmott/www           North Carolina State University
--------------------------------------------------------------------------

--
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/stella.html

Current Thread