Jump to content
IGNORED

Newbie Question #1


Recommended Posts

Hi all,

 

I'm a real newbie to programming the 2600 and I am reading through Andrew Davie's awesome book, the Stella Programmer's Guide and a nice online video tutorial by Gustavo Pezzi (awesome video series!).

 

My question:

Why is Vertical Blanking required?

Why is Overscan required?

 

I understand Horizontal Blanking as the timeframe that it takes the TVs scan gun to get back to the beginning of the next scanline.  Hoping that is pretty accurate.

 

I think these explanations are alluded to in all of my books (somewhere!), but I just couldn't find an overt explanation.

 

Thank you greatly!  :)

 

 

JR

Edited by JohnnyRockets
Link to comment
Share on other sites

Vertical blank is required to hide the electron beam as it's sent from the bottom of the frame to the top, which happens when vsync is signalled, and for some time after.

 

What we call overscan (which isn't quite 1:1 to what TV engineers would call overscan) is an area where the signal might be carrying visible information, but it isn't guaranteed to actually be displayed, due to differences in CRT TV design. (bezel, tube shape, distortion near the tube edge). There's a similar concept in printing which you may or may not be familiar with - bleed area - it's a margin where your design may or may not be cut off at the print shop, and you don't worry about it that much, because you design the image with that in mind.

 

Since information near the edges of a video game are likely to be important, Atari decided that their company standard would be to display only 192 lines of visible display, after which the game shouldn't display anything. (our overscan area) 

 

The 192 scanline figure is a little bit arbitrary, and also not very nuanced. e.g. with the NES, Nintendo defined 224 lines of display as an "action safe" area, with 192 scanlines as their "title safe" area. Given that most TVs that are still running today can get close to (or sometimes exceed) 224 scanlines, 2600 homebrew authors can choose to display more than 192 visible lines. If you compensate for this by reducing the rest of the overscan, leaving an overall frame count of 262 lines, expanding the visible display like this is almost always not be a problem. (until you get close to 224 anyway.)

 

Somewhat related to all of this is the common practise of 2600 homebrew authors to extend the number of scanlines spent in overscan, to obtain more non-beam-chasing CPU time, without taking lines away elsewhere - this one does carry some risk. It slows down the overall framerate and risks rolling issues, depending on the TV and how much the framerate deviates from the standard.

 

One last wrinkle about what I said at the beginning of this post. I believe strictly speaking, only old tube-logic TVs would literally draw the beam tracing upwards if blanking isn't enabled during vertical sync. Getting rid of a few of those big, expensive, hot tubes by putting blanking into the signal standard is a big win, but it's cheap and easy to ensure the beam is off during vertical sync, with just a couple cents worth of transistors. Just my hunch anyway, and it's not really a practical concern, since it's still important to enable blanking for the VSYNC signal to be properly detected on a lot of TVs.

 

[edit - NTSC numbers used above. Sorry for any offense to PAL folks, but I'm in NTSC land, and using NTSC/PAL slashed numbers just confuses the message.]

  • Like 2
Link to comment
Share on other sites

  • 5 weeks later...
1 hour ago, Lillapojkenpåön said:

One thing I don't understand is why drawing 192 scanlines doesn't just draw a picture on half the screen? doesn't old ntsc tv's have a 640x480 resolution? That means 480 scanlines right?

Does the atari draw bigger scanlines than the TV normally would?

TVs are "interlaced".

What you think of as a single "frame" of a TV picture is actually TWO "frames" drawn one after the other.

Each "frame" is half the vertical resolution, with 1/2 a scanline shift between frames so that the scanlines are... interlaced.

This is just how TV technology works.

So, 192 scanlines (give or take) is close to the resoultion of a TV.  That extra resolution you think of is really a bit of a trick TVs use.

It's possible to create an interlaced image using the '2600, though it hasn't been used in a game.

Instead, no 1/2 line shift is used, and each successive frame sent to the TV is identical in size.

The TV displays with effectively half the vertical resolution you think of.

 

And no, it's not 640x480. Those are dimensions from computers.

 

TV resolution (vertical) for NTSC TV is 525 scanlines.  That is, two frames of 262 scanlines + 1/2 scanline "interlace shift"

For PAL TVs it's 625 scanlines -- 312 x 2 + 0.5

 

The horizontal resolution of TVs is based on bandwidth of the TV signal.

 

  • Like 1
Link to comment
Share on other sites

10 minutes ago, Lillapojkenpåön said:

Aha, I thought old TV's only displayed interlaced if you played interlaced footage, now it's starting to make sense.

All "interlacing" comes down to, really, is shifting scanlines down by 1/2 scanline every 2nd frame.

If you send the right TV signal, that's what happens, and your eye sees effectively 2x vertical resolution + flicker.

But if you don't send the right TV signal, then that shift doesn't happen, and you see 1x vertical resolution + bigger gap between lines.

Interlaced TV is 30 (complete) frames/second in NTSC.  That's two 1/2 frames at 60 frames per second (fps).

That's why the '2600 displays frames at 60 fps, but is "compatible" with NTSC's 30 fps frame rate.

 

Link to comment
Share on other sites

There's an interlace demo in the old Stella Mailing List. You need to run it on hardware to see it properly as none of the emulators support interlaced (z26 used to, but dropped it as of ver 4.00).

 

If you can't run it then check out these photos I originally posted in 2007:

 

Even frame

even.jpg

 

 

Odd frame

odd.jpg

 

 

Interlaced

interlaced.jpg

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...