Re: [stella] Syncing without WSYNC

Subject: Re: [stella] Syncing without WSYNC
From: "B. Watson" <atari@xxxxxxxxxxxxxx>
Date: Thu, 30 Aug 2001 18:28:19 -0400 (EDT)
On Thu, 30 Aug 2001, Chris Wilkson wrote:

> On Thu, 30 Aug 2001, B. Watson wrote:
> > Does anyone know, is one scanline *exactly* 76 cycles? I.E. if I write a
> > scanline loop with no STA WSYNC in it, that takes exactly 76 cycles (with
> > dey;bne start_of_loop as the last 5 cycles), will the Atari stay in sync
> > with the TV picture, or are the WSYNCs absolutely necessary? The emulators
> > all handle it fine, but will a real Atari be able to do this?
> Yes, you can do this.  Strobing the WSYNC register is just a lazy way to do
> it.  It also only takes 2 bytes.  Delay loops and whatnot waste valuable ROM
> space.  :)
> -Chris

Ah, that's good to know, thanks.

This is a case where I'm trying to do so much in one scan line that
I can't afford the 3 cycles for the STA WSYNC... The loop was 75 cycles,
including the DEY;BNE top_loop at the end, I changed one of my STA GRP0's to
a STA $2000+GRP0 to make it eat one more cycle, bringing me up to 76..

Of course, the last time through the loop, the BNE won't branch, so I'll be at
the 75th cycle of the last scanline... Slowly, I'm learning this stuff :)

Right now the timings are still a little off, so I'm not getting the beautiful
6-digit score I want (one of my STA GRP1's happens in the middle of drawing
player 1, so the left half is the old data and the right half is the new)

The idea is, use NUSIZ0/1 to draw 3 copies of both players, and modify the
GRP0/1 registers during the scanline... Hopefully I'm doing this the right
way, even though it doesn't work properly yet...



If a trainstation is the place where trains stop, what is a workstation?

Archives (includes files) at
Unsub & more at

Current Thread