Re: [stella] 262 scanline kernel is rolling

Subject: Re: [stella] 262 scanline kernel is rolling
From: Chris Wilkson <ecwilkso@xxxxxxx>
Date: Sat, 26 Mar 2005 15:03:45 -0500
It depends on what you're trying to do.  The only difference is that as soon
as VBLANK is turned on, the screen goes black.  In those games they are using
a different color for the border IIRC.  So they don't turn on blank until it's
outside the viewable area.  (Do they really wait until it's time for VSYNC?)

In a normally numbered NTSC frame, lines run from 1-262.  VBLANK starts at
line 1, VSYNC starts at 4, VSYNC ends at line 8 (it lasts for 3 lines), and
VBLANK ends at line 21 (it lasts for 20 lines).

So theoretically, VBLANK should be turned on 3 lines before the start of VSYNC,
and it should remain on for 20 lines.  But this will result in active video outside
the top and bottom visible area on most TVs.  So you can adjust VBLANK if you want
to add letterboxing to your 2600 displays.  The "standard" 2600 vertical timing
runs from line 0-261.  VSYNC is lines 0-2, and VBLANK times are starting at the
beginning of overscan and ending at the end of vertical blank, or lines 231-39.
I think I did my math right.  :)


On Sat, 26 Mar 2005, Zach M wrote:

> Thanks Aaron. I believe that VBLANK was the problem in my kernel.  One thing
> I'm confused about though:  Should VBLANK be set at the start or the end of
> overscan? I just used z26 to trace the code of Pacman and Outlaw, and it
> appears they set VBLANK at scanline #263.
> >From: "Aaron" <stella-receiver@xxxxxxxxxxxxxxxxx>
> >Reply-To: stella@xxxxxxxxxxxxxxxxxx
> >To: stella@xxxxxxxxxxxxxxxxxx
> >Subject: Re: [stella] 262 scanline kernel is rolling
> >Date: Fri, 25 Mar 2005 21:24:45 -0500
> >
> >Zach M said:
> > > Hello all, my first homebrew kernel looks good in emulators, and z26
> > > reports
> > > that it displays 262 scanlines, but when I test on a TV the image rolls
> > > slowly, almost like a scrolling background in a Xevious-type game.
> >
> >It doesn't look like you're using VBLANK (the TIA register) correctly.
> >You should turn it off (write 0) at the start of the visible screen, then
> >turn it on (write 2) at the start of overscan and leave it on throughout
> >vertical blank.  Right now you're writing 0 at the start of vertical blank
> >and 8 at the start of overscan.
> >
> >I'm in a similar situation with my game (works fine in emulators, rolls
> >badly on a real machine) and this was one of the first things I checked...
> >
> >-Aaron
> >
> >Archives (includes files) at
> >Unsub & more at
> >
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today - it's FREE!
> Archives (includes files) at
> Unsub & more at

Archives (includes files) at
Unsub & more at

Current Thread