Re: [stella] Syncing without WSYNC

Subject: Re: [stella] Syncing without WSYNC
From: Mark De Smet <de-smet@xxxxxxxxxxxxxxx>
Date: Thu, 30 Aug 2001 21:38:56 -0500 (CDT)
> > > 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.  :)

As a reference(and to the new programmers, don't let this confuse you, if
you don't get it, pretend I never said it), you don't need to have your
code 'end' on the 76 cycle mark.  When I was doing my caves program, RIP,
my kernal was 2/4 lines long(it only drew graphics on a single line; check
out thrust for what I'm talking about), and my first line not only didn't
end on the 76 cycle mark(middle of some instruction), my code was still
doing calculation, So in effect, my code considered it a 152/304 cycle

If for instance, you have a 2 line kernal, and you do the display on the
first line, then do some other calcs on the second line, then you can
simply make sure that your code is >76 cycles and <152, and use a Wsync at
the end of it all.  The only possible confusion is that all your stores to
graphic registers have to happen at the same time, which is why i proposed
doing the drawing in the first line, and the calculations in the second.


Archives (includes files) at
Unsub & more at

Current Thread