Re: [stella] Re: supercharger line definition

Subject: Re: [stella] Re: supercharger line definition
From: "John K. Harvey" <jkharvey@xxxxxxxxxxxxxxxxx>
Date: Mon, 10 Jan 2000 07:13:32 -0600

>Anyway, before I revolutionize 2600 programming I'll have to learn how to
>output the right number of scanlines every frame ;)

Hmm... you were getting 265, right?  That'd be 3 extra.  There was a short
thread on the stellalist  back in September about 3 extra WSYNCs appearing
in Nick Bensema's "How to Draw a Playfield"

Here's an excerpt from the thread (Eckhard replying to Mark De Smet)
{
>I am uncertain about why the first three STA WSYNC's are there.

One of them is to make the access to VSYNC happen at the start
of a scanline, so that you get a VSYNC signal of three full
scanlines. The other two: well I suspect that Atari's programmers
first used screen loops with register counters for 256 scanlines.
You would need 6 more lines to get the suggested 262. When they
started programming real games, they pasted the working VSYNC
routine in the code. And Nick then copied the routine from one of
Atari's games. They are actually unnessesary
}

So, that gives us 3 extra scanlines in our loop.  I suppose that the last 2
can just be removed, but there is a good question raised about the first
WSYNC, as it does make VSYNC go for exactly 3 scanlines.

Your best bet (the easiest way) would be to change the counter in the
Overscan loop from 30 to 27.  That should give you what you need.

If you want to do it a more complex way, some modifications must be made,
ie, changing the overscan loop to:

OverScan
        STA WSYNC
        LDA #34
        STA TIM64T

and modifying the VerticalBlank loop by adding this to the top of it, and
changing the mainloop, of course to JSR to endoverscan instead of
VerticalBlank.

endoverscan
        LDA INTIM
        BNE endoverscan
        LDA  #2
        STA WSYNC

My question is, do we still need those 3 WSYNC's then, or were they deleted
when this code was tested?  Basically, I haven't done the math to see if
the new overscan loop was calculated for 27 scanlines or for 30.  Mark?

	-John K. Harvey
	"Oh, joy!"

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

Current Thread