Re: [stella] to overscan or not to overscan?

Subject: Re: [stella] to overscan or not to overscan?
From: Eckhard_Stolberg@xxxxxxxxxxxxxxxxxxxxx (Eckhard Stolberg)
Date: Mon, 2 Dec 1996 22:41:51 +0100
>According to the Stella programmer's guide, a NTSC TV frame generated by
>the 2600 consists of 3 VSYNC lines, 37 VBLANK lines, 192 TV picture lines
>and 30 "overscan" lines.

I allways thought, that you have PAL TVs in Italy too. So the values would be
3 VSYNC lines, 45 VBLANK lines, 228 TV picture lines and 36 overscan lines.

>The question is: do we really need to do the "overscan" lines?
>I'm writing my first game for the 2600 and I didn't care about overscan (I
>just draw more empty TV picture lines). After a lot of try-and-miss I could
>get a steady picture, so I don't think it's really needed. What do you

You have to do the overscan lines, because they are part of the TV frame. You
can get a steady picture without them, but there is a high possibility, that
you will get the wrong colours or no colours at all, if you don't do the right
number of lines for all parts of the TV frame.

The overscan is the part from the end of the visible TV screen to the end of 
the actual TV tube. Since there is nothing to see there you can simply skip them
by setting up a loop, that does STA WSYNC 30(36) times.

Or you could use it to do some game logic, because there is no time for game
logic during the 'TV picture' part of the TV frame. To do so you would set up
a timer for the same number of processorcycles, that would happen during the
30 lines. Then you could do some game logic. Now you would need to wait for
the timer to expire, do a STA WSYNC and jump to the VSYNC routine.

                LDA     #35     ;30 lines * 76 cycles per line / 64 timercycles
                STA     TIM64T  ;=35,625 wich means ~2280 cycles to use

                do game logic here

WaitOverscan:   LDA     INTIM
                BNE     WaitOverscan
                STA     Wsync
                JMP     VsyncLoop

You can use the same type of timerloop for the VBLANK part too, because it's
not visible either.

Ciao, Eckhard Stolberg

Current Thread