[stella] PF register write timing

SeaGtGruff at aol.com SeaGtGruff at aol.com
Tue May 16 01:49:25 CDT 2006


Forgive me for jumping into this thread so late,  but I was out of town for 
several days.
 
I did extensive testing in the Stella and z26  emulators, and got the 
following results:
 
Repeated Playfield,  Non-Asymmetrical
====================================
Object:      Earliest:     Latest:
-------      ---------      -------
PF0         Cycle  52*     Cycle  21**
PF1         Cycle  63*     Cycle  26**
PF2         Cycle  74*     Cycle 37**
* of the previous scan line
** of  the current scan line
 
Repeated Playfield,  Asymmetrical
================================
Object:      Earliest:     Latest:
-------      ---------      -------
L.PF0       Cycle  52*     Cycle  21**
L.PF1       Cycle  63*     Cycle  26**
L.PF2       Cycle  74*     Cycle  37**
R.PF0       Cycle 26**     Cycle 47**
R.PF1       Cycle  36**    Cycle 53**
R.PF2        Cycle 47**    Cycle 63**
* of the previous scan line
** of  the current scan line
 
Reflected Playfield,  Non-Asymmetrical
=====================================
Object:      Earliest:     Latest:
-------      ---------      -------
PF0         Cycle  74*     Cycle  21**
PF1         Cycle  68*     Cycle  26**
PF2         Cycle  58*     Cycle 37**
* of the previous scan line
** of  the current scan line
 
Reflected Playfield,  Asymmetrical
=================================
Object:      Earliest:     Latest:
-------      ---------      -------
L.PF0       Cycle  74*     Cycle  21**
L.PF1       Cycle  68*     Cycle  26**
L.PF2       Cycle  58*     Cycle  37**
R.PF2       Cycle 47**     Cycle 47**
R.PF1       Cycle  36**    Cycle 58**
R.PF0        Cycle 26**    Cycle 69**
* of the previous scan line
** of  the current scan line
 
The preceding values assume we're numbering the  machine cycles from 0 to 75. 
If you're counting cycles by keeping a running  total-- which means you're 
actually numbering the cycles from 1 to 76-- then you  must add 1 to the values 
shown above.
 
The 2600 needs two-thirds of a cycle to load a  given PF bit before it starts 
to draw the corresponding PF pixel, as Thomas  pointed out (if not in those 
exact words). And as Bob pointed out, once the 2600  starts to draw a PF pixel, 
changing the corresponding bit of the PF register  won't affect the PF pixel 
as it's being drawn.
 
As mos6507 at yahoo.com pointed  out, color changes can take effect on a 
sub-pixel basis (if the pixel is wider  than 1 color clock). For changes to the 
playfield or background color to  precisely coincide with a PF pixel boundary, the 
write to the color register  must end on cycle 23, 27, 31, 35, 39, 43, 47, 51, 
55, 59, 63, 67, 71, or  75.
 
The following tables show the relationship  between the machine cycles, color 
clocks, screen pixels, and playfield  pixels. The first table is for a 
repeated  (duplicated) playfield. The second table is for a reflected (mirrored)  
playfield. In the second table, the rows for the left side of the screen are  
omitted, since they're the same as in the first table. In both tables, the  
columns are organized as follows:
 
First column = The machine cycle ("MC"), numbered  from 0 to 75.
 
Second column = The values for the first color  clock of that machine cycle 
(labelled "xx.00").
 
Third column = The values for the second color  clock of that machine cycle 
(labelled "xx.33").
 
Fourth column = The values for the third color  clock of that machine cycle 
(labelled "xx.67").
 
The second, third, and fourth columns are further  split into three 
subcolumns each, as follows:
 
First subcolumn = The color clock ("CC"), numbered  from 0 to 227.
 
Second subcolumn = The screen pixel ("SP"),  numbered from 0 to 159. (For the 
horizontal blank interval, this column contains  "xxx," since the HBI has no 
screen pixels per se.)
 
Third subcolumn = The "object" ("OBJ"), which is  either the horizontal 
blanking interval ("HBI"), the PF0 register, the PF1  register, or the PF2 register.
 
For the playfield registers, the third subcolumn  (or "object") is further 
split into three sub-subcolumns, as  follows:
 
First sub-subcolumn = A letter ("L" or "R") to  indicate whether the 
playfield register is on the left or right half of the  screen.
 
Second sub-subcolumn = The playfield  register.
 
Third sub-subcolumn = The pixel within the  playfield register (not to be 
confused with the bit of the playfield  register).
 
I used periods to separate the sub-subcolumns--  e.g., "R.PF2.5" means "the 
right copy of PF2, pixel 5."
 
I drew a line ("-") between the playfield  registers, to indicate where one 
playfield register ends and the next one  begins. I drew a double line ("=") to 
indicate where the horizontal blank  interval ends and the visible screen 
begins, as well as where the left half of  the screen ends and the right half 
begins.
 
Here is the first table:
 
==============================================================
Repeated Playfield (PF0, PF1, PF2, PF0, PF1,  PF2)
==============================================================
MC  |       xx.00        |       xx.33        |       xx.67
|-------------------|-------------------|------------------
|  CC,  SP,   OBJ   |  CC,   SP,   OBJ   |  CC,  SP,    OBJ
==============================================================
00 |  000, xxx,   HBI   | 001, xxx,   HBI   |  002, xxx,   HBI
01 | 003, xxx,   HBI   | 004,  xxx,   HBI   | 005, xxx,   HBI
02 | 006,  xxx,   HBI   | 007, xxx,   HBI   | 008,  xxx,   HBI
03 | 009, xxx,   HBI   | 010,  xxx,   HBI   | 011, xxx,   HBI
04 | 012,  xxx,   HBI   | 013, xxx,   HBI   | 014,  xxx,   HBI
05 | 015, xxx,   HBI   | 016,  xxx,   HBI   | 017, xxx,   HBI
06 | 018,  xxx,   HBI   | 019, xxx,   HBI   | 020,  xxx,   HBI
07 | 021, xxx,   HBI   | 022,  xxx,   HBI   | 023, xxx,   HBI
08 | 024,  xxx,   HBI   | 025, xxx,   HBI   | 026,  xxx,   HBI
09 | 027, xxx,   HBI   | 028,  xxx,   HBI   | 029, xxx,   HBI
10 | 030,  xxx,   HBI   | 031, xxx,   HBI   | 032,  xxx,   HBI
11 | 033, xxx,   HBI   | 034,  xxx,   HBI   | 035, xxx,   HBI
12 | 036,  xxx,   HBI   | 037, xxx,   HBI   | 038,  xxx,   HBI
13 | 039, xxx,   HBI   | 040,  xxx,   HBI   | 041, xxx,   HBI
14 | 042,  xxx,   HBI   | 043, xxx,   HBI   | 044,  xxx,   HBI
15 | 045, xxx,   HBI   | 046,  xxx,   HBI   | 047, xxx,   HBI
16 | 048,  xxx,   HBI   | 049, xxx,   HBI   | 050,  xxx,   HBI
17 | 051, xxx,   HBI   | 052,  xxx,   HBI   | 053, xxx,   HBI
18 | 054,  xxx,   HBI   | 055, xxx,   HBI   | 056,  xxx,   HBI
19 | 057, xxx,   HBI   | 058,  xxx,   HBI   | 059, xxx,   HBI
20 | 060,  xxx,   HBI   | 061, xxx,   HBI   | 062,  xxx,   HBI
21 | 063, xxx,   HBI   | 064,  xxx,   HBI   | 065, xxx,    HBI
==================
22 | 066, xxx,   HBI   | 067,  xxx,   HBI   / 068, 000,  L.PF0.0
===========================================
23 | 069, 001, L.PF0.0  | 070, 002, L.PF0.0 | 071, 003, L.PF0.0
24 | 072, 004, L.PF0.1 | 073, 005,  L.PF0.1 | 074, 006, L.PF0.1
25 | 075, 007, L.PF0.1 | 076, 008, L.PF0.2 | 077,  009, L.PF0.2
26 | 078, 010, L.PF0.2 | 079, 011, L.PF0.2 | 080, 012,  L.PF0.3
27 | 081, 013, L.PF0.3 | 082, 014, L.PF0.3 | 083, 015,  L.PF0.3
--------------------------------------------------------------
28  | 084, 016, L.PF1.0 | 085, 017, L.PF1.0 | 086, 018, L.PF1.0
29 | 087, 019,  L.PF1.0 | 088, 020, L.PF1.1 | 089, 021, L.PF1.1
30 | 090, 022, L.PF1.1 | 091,  023, L.PF1.1 | 092, 024, L.PF1.2
31 | 093, 025, L.PF1.2 | 094, 026, L.PF1.2 |  095, 027, L.PF1.2
32 | 096, 028, L.PF1.3 | 097, 029, L.PF1.3 | 098, 030,  L.PF1.3
33 | 099, 031, L.PF1.3 | 100, 032, L.PF1.4 | 101, 033, L.PF1.4
34  | 102, 034, L.PF1.4 | 103, 035, L.PF1.4 | 104, 036, L.PF1.5
35 | 105, 037,  L.PF1.5 | 106, 038, L.PF1.5 | 107, 039, L.PF1.5
36 | 108, 040, L.PF1.6 | 109,  041, L.PF1.6 | 110, 042, L.PF1.6
37 | 111, 043, L.PF1.6 | 112, 044, L.PF1.7 |  113, 045,  L.PF1.7
------------------
38 | 114, 046, L.PF1.7 | 115, 047, L.PF1.7 / 116, 048,  L.PF2.0
-------------------------------------------
39 | 117, 049, L.PF2.0  | 118, 050, L.PF2.0 | 119, 051, L.PF2.0
40 | 120, 052, L.PF2.1 | 121, 053,  L.PF2.1 | 122, 054, L.PF2.1
41 | 123, 055, L.PF2.1 | 124, 056, L.PF2.2 | 125,  057, L.PF2.2
42 | 126, 058, L.PF2.2 | 127, 059, L.PF2.2 | 128, 060,  L.PF2.3
43 | 129, 061, L.PF2.3 | 130, 062, L.PF2.3 | 131, 063, L.PF2.3
44  | 132, 064, L.PF2.4 | 133, 065, L.PF2.4 | 134, 066, L.PF2.4
45 | 135, 067,  L.PF2.4 | 136, 068, L.PF2.5 | 137, 069, L.PF2.5
46 | 138, 070, L.PF2.5 | 139,  071, L.PF2.5 | 140, 072, L.PF2.6
47 | 141, 073, L.PF2.6 | 142, 074, L.PF2.6 |  143, 075, L.PF2.6
48 | 144, 076, L.PF2.7 | 145, 077, L.PF2.7 | 146, 078,  L.PF2.7
======================================
49 | 147, 079, L.PF2.7 / 148, 080,  R.PF0.0 | 149, 081, R.PF0.0
=======================
50 | 150, 082, R.PF0.0  | 151, 083, R.PF0.0 | 152, 084, R.PF0.1
51 | 153, 085, R.PF0.1 | 154, 086,  R.PF0.1 | 155, 087, R.PF0.1
52 | 156, 088, R.PF0.2 | 157, 089, R.PF0.2 | 158,  090, R.PF0.2
53 | 159, 091, R.PF0.2 | 160, 092, R.PF0.3 | 161, 093,  R.PF0.3
------------------
54 | 162, 094, R.PF0.3 | 163, 095, R.PF0.3 / 164, 096,  R.PF1.0
-------------------------------------------
55 | 165, 097, R.PF1.0  | 166, 098, R.PF1.0 | 167, 099, R.PF1.0
56 | 168, 100, R.PF1.1 | 169, 101,  R.PF1.1 | 170, 102, R.PF1.1
57 | 171, 103, R.PF1.1 | 172, 104, R.PF1.2 | 173,  105, R.PF1.2
58 | 174, 106, R.PF1.2 | 175, 107, R.PF1.2 | 176, 108,  R.PF1.3
59 | 177, 109, R.PF1.3 | 178, 110, R.PF1.3 | 179, 111, R.PF1.3
60  | 180, 112, R.PF1.4 | 181, 113, R.PF1.4 | 182, 114, R.PF1.4
61 | 183, 115,  R.PF1.4 | 184, 116, R.PF1.5 | 185, 117, R.PF1.5
62 | 186, 118, R.PF1.5 | 187,  119, R.PF1.5 | 188, 120, R.PF1.6
63 | 189, 121, R.PF1.6 | 190, 122, R.PF1.6 |  191, 123, R.PF1.6
64 | 192, 124, R.PF1.7 | 193, 125, R.PF1.7 | 194, 126,  R.PF1.7
--------------------------------------
65 | 195, 127, R.PF1.7 / 196, 128,  R.PF2.0 | 197, 129, R.PF2.0
-----------------------
66 | 198, 130, R.PF2.0  | 199, 131, R.PF2.0 | 200, 132, R.PF2.1
67 | 201, 133, R.PF2.1 | 202, 134,  R.PF2.1 | 203, 135, R.PF2.1
68 | 204, 136, R.PF2.2 | 205, 137, R.PF2.2 | 206,  138, R.PF2.2
69 | 207, 139, R.PF2.2 | 208, 140, R.PF2.3 | 209, 141,  R.PF2.3
70 | 210, 142, R.PF2.3 | 211, 143, R.PF2.3 | 212, 144, R.PF2.4
71  | 213, 145, R.PF2.4 | 214, 146, R.PF2.4 | 215, 147, R.PF2.4
72 | 216, 148,  R.PF2.5 | 217, 149, R.PF2.5 | 218, 150, R.PF2.5
73 | 219, 151, R.PF2.5 | 220,  152, R.PF2.6 | 221, 153, R.PF2.6
74 | 222, 154, R.PF2.6 | 223, 155, R.PF2.6 |  224, 156, R.PF2.7
75 | 225, 157, R.PF2.7 | 226, 158, R.PF2.7 | 227, 159,  R.PF2.7
==============================================================
 
And here is the second table:
 
==============================================================
Reflected Playfield (PF0, PF1, PF2, PF2, PF1,  PF0)
==============================================================
MC  |       xx.00        |       xx.33        |       xx.67
|-------------------|-------------------|------------------
|  CC,  SP,   OBJ   |  CC,   SP,   OBJ   |  CC,  SP,    OBJ
==============================================================
======================================
49 | 147, 079, L.PF2.7 / 148, 080,  R.PF2.0 | 149, 081, R.PF2.0
=======================
50 | 150, 082, R.PF2.0  | 151, 083, R.PF2.0 | 152, 084, R.PF2.1
51 | 153, 085, R.PF2.1 | 154, 086,  R.PF2.1 | 155, 087, R.PF2.1
52 | 156, 088, R.PF2.2 | 157, 089, R.PF2.2 | 158,  090, R.PF2.2
53 | 159, 091, R.PF2.2 | 160, 092, R.PF2.3 | 161, 093,  R.PF2.3
54 | 162, 094, R.PF2.3 | 163, 095, R.PF2.3 | 164, 096, R.PF2.4
55  | 165, 097, R.PF2.4 | 166, 098, R.PF2.4 | 167, 099, R.PF2.4
56 | 168, 100,  R.PF2.5 | 169, 101, R.PF2.5 | 170, 102, R.PF2.5
57 | 171, 103, R.PF2.5 | 172,  104, R.PF2.6 | 173, 105, R.PF2.6
58 | 174, 106, R.PF2.6 | 175, 107, R.PF2.6 |  176, 108, R.PF2.7
59 | 177, 109, R.PF2.7 | 178, 110, R.PF2.7 | 179, 111,  R.PF2.7
--------------------------------------------------------------
60  | 180, 112, R.PF1.0 | 181, 113, R.PF1.0 | 182, 114, R.PF1.0
61 | 183, 115,  R.PF1.0 | 184, 116, R.PF1.1 | 185, 117, R.PF1.1
62 | 186, 118, R.PF1.1 | 187,  119, R.PF1.1 | 188, 120, R.PF1.2
63 | 189, 121, R.PF1.2 | 190, 122, R.PF1.2 |  191, 123, R.PF1.2
64 | 192, 124, R.PF1.3 | 193, 125, R.PF1.3 | 194, 126,  R.PF1.3
65 | 195, 127, R.PF1.3 | 196, 128, R.PF1.4 | 197, 129, R.PF1.4
66  | 198, 130, R.PF1.4 | 199, 131, R.PF1.4 | 200, 132, R.PF1.5
67 | 201, 133,  R.PF1.5 | 202, 134, R.PF1.5 | 203, 135, R.PF1.5
68 | 204, 136, R.PF1.6 | 205,  137, R.PF1.6 | 206, 138, R.PF1.6
69 | 207, 139, R.PF1.6 | 208, 140, R.PF1.7 |  209, 141,  R.PF1.7
------------------
70 | 210, 142, R.PF1.7 | 211, 143, R.PF1.7 / 212, 144,  R.PF0.0
-------------------------------------------
71 | 213, 145, R.PF0.0  | 214, 146, R.PF0.0 | 215, 147, R.PF0.0
72 | 216, 148, R.PF0.1 | 217, 149,  R.PF0.1 | 218, 150, R.PF0.1
73 | 219, 151, R.PF0.1 | 220, 152, R.PF0.2 | 221,  153, R.PF0.2
74 | 222, 154, R.PF0.2 | 223, 155, R.PF0.2 | 224, 156,  R.PF0.3
75 | 225, 157, R.PF0.3 | 226, 158, R.PF0.3 | 227, 159,  R.PF0.3
==============================================================
 
Michael  Rideout

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.atariage.com/pipermail/stella/attachments/20060516/63c147e3/attachment.html 


More information about the Stella mailing list