Hi,

I've got two questions, which might be related.

The Altirra manual in section 2.3 states that there are 114 CPU cycles per scan line.

I've written a test program which disables Antic, DMA, and everything. Then it changes the background color register while the screen is displayed.

This test program needs to consume 105 cycles per scan line, otherwise the display gets distorted.

This is my first question. Is the Altirra manual wrong, or where do I lose the 9 (114-105) cycles?

For the second question look at the attached screen shot.

I expected the vertical bars to be evenly spaced.

I'm doing this in the program

; this should give evenly spaced horizontal bars ; but somehow that's not the case !?? CYCLES 33 STX COLBK ; 4 cycles (37) STA COLBK ; 4 cycles (41) STX COLBK ; 4 cycles (45) STA COLBK ; 4 cycles (49) STX COLBK ; 4 cycles (53) STA COLBK ; 4 cycles (57) STX COLBK ; 4 cycles (61) STA COLBK ; 4 cycles (65) STX COLBK ; 4 cycles (69) STA COLBK ; 4 cycles (73) STX COLBK ; 4 cycles (77) STA COLBK ; 4 cycles (81) STX COLBK ; 4 cycles (85) STA COLBK ; 4 cycles (89) STX COLBK ; 4 cycles (93) STA COLBK ; 4 cycles (97) STX COLBK ; 4 cycles (101) STA COLBK ; 4 cycles (105) -> 105 cycles total

This is for one display line. The code is repeated a few times to get "bars".

On the right half of the screen this looks like expected. But on the left half, the bars are thicker and the space between them is also larger. Can someone explain this effect to me? Maybe my missing cycles are somehow consumed by these bigger bars and spaces btw. them.

Attached are a precompiled exe and the (cc65) source code.

regards,

chris