Jump to content
IGNORED

Actual television resolution.


EtanSivad

Recommended Posts

I'm going through the Stella programming guide, and I hit one point that confuses me just a bit.

This is less about programming and more about the hardware, so if this topic should be moved please let me know.

 

Anyway, in looking at the documentation the Atari has an display resolution of 192 lines, and including the vertical sync and overscan, that's 226 lines.

On physical TVs of the time, was that the actual vertical display resolution? Or was the TIA able to adjust the vertical resolution the TV was using? I could have sworn that the NTSC signal standard / VHS was closer to 480 vertical lines.

 

Thanks,

 

-Etan

Link to comment
Share on other sites

262.5 per field... 525 per frame. Visible, however, is supposed to be 483 (remainder for vertical blanking), or about 480 as you noted!

Ahh, so is it because the signal is interlaced?

I assume it would happen that the display would change between the drawing of the Even fields and the drawing of the Odd fields?

 

Either way, the 2600 is painting the screen 60 times / second, correct?

Link to comment
Share on other sites

The 226 should be 262.

 

The Atari, like a lot of video game systems, puts out a progressive signal. Using today's terminology, the Atari's display would be 240p.

 

Atari games don't use the full visible screen. A big part of that is due to Overscan:

Overscan is extra image area around the four edges of a video image that may not be seen reliably by the viewer. It exists because television sets in the 1930s through 1970s were highly variable in how the video image was framed within the cathode ray tube (CRT).

 

In other words, if you use the full display then things like the score will most likely be offscreen or clipped, depending upon the TV.

 

The other is that the CPU is time constrained because it must update TIA in real time to draw the screen. If you draw fewer scan lines, you get more processing time for your game logic. If your game displays 192 lines then you get 70 scan lines worth of processing time, about 27%. If you display 200 lines, like I did in Medieval Mayhem, that drops to 24%.

Edited by SpiceWare
Link to comment
Share on other sites

The 226 should be 262.

 

The Atari, like a lot of video game systems, puts out a progressive signal. Using today's terminology, the Atari's display would be 240p.

 

Atari games don't use the full visible screen. A big part of that is due to Overscan:

 

 

In other words, if you use the full display then things like the score will most likely be offscreen or clipped, depending upon the TV.

 

The other is that the CPU is time constrained because it must update TIA in real time to draw the screen. If you draw fewer scan lines, you get more processing time for your game logic. If your game displays 192 lines then you get 70 scan lines worth of processing time, about 27%. If you display 200 lines, like I did in Medieval Mayhem, that drops to 24%.

 

The overscan bit I understand. Makes sense.

The piece I don't understand is where the extra vertical space comes from for the TV. Is the screen displaying an extra tall vertical scan, or does it draw the same image twice with an interlaced image?

Link to comment
Share on other sites

480i uses even and odd frames.

A full frame is split into even and odd fields where the even fields end with half a line and the odd fields begin with the other half of the line. By convention an NTSC video frame is considered to start with an even field followed by an odd field.

 

If you look closely at the picture output by the Atari (click image to see it better):

post-3056-0-86286900-1360614057_thumb.jpg

 

you'll notice thin horizontal black lines that separate the pixels vertically. When receiving a 480i signal, those thin black lines are filled in because of the even/odd frames.

Link to comment
Share on other sites

480i uses even and odd frames.

 

 

If you look closely at the picture output by the Atari (click image to see it better):

post-3056-0-86286900-1360614057_thumb.jpg

 

you'll notice thin horizontal black lines that separate the pixels vertically. When receiving a 480i signal, those thin black lines are filled in because of the even/odd frames.

 

Ahh, gotcha. So this is a progressive signal. Does that mean that half the lines are skipped in the signal? Or does it output really tall lines? The thin space you show in that image doesn't look like an entire scan line.

Link to comment
Share on other sites

A 240p signal is basically all the even frames of a 480i signal.

 

Yes, that thin space is an entire scan line. Pixels on a CRT aren't as precise as they are on an LCD, they often "bleed into" the space around the pixels. The even/odd scan lines on a CRT will thus overlap.

Link to comment
Share on other sites

A 240p signal is basically all the even frames of a 480i signal.

 

Yes, that thin space is an entire scan line. Pixels on a CRT aren't as precise as they are on an LCD, they often "bleed into" the space around the pixels. The even/odd scan lines on a CRT will thus overlap.

Understood. This makes a lot more sense. Thanks for all the info.

Link to comment
Share on other sites

It's not completely accurate to call it the even frames of a 480i signal because that might sound like it was displaying at half the vertical refresh rate when in fact it's displaying at full refresh rate. The odd frame is there it's just not pushed down to create interlace.

Link to comment
Share on other sites

  • 4 weeks later...

It's the half-line per field in the NTSC standard that triggers the interlacing. 262 lines (including blanking) is the closest non-interlaced picture height to the actual NTSC standard of 262.5 lines per field. This is why, on systems where one can control the total number of lines to be output, it's possible to output a true interlaced signal with some ingenious coding. As well as with the 2600, I've also seen where someone used a test bit on the Commodore 128's VIC-IIe chip to output an extra half-line per field and generate interlaced output.

Link to comment
Share on other sites

  • 3 weeks later...

This is partially off-topic from the specific question about scan lines, but I believe the resolution for NTSC 240p is given as 352x240. For an Atari 800 Graphics 0 display, this corresponds to 44x30 characters, so the border area is 2 characters wide on the left, 2 characters wide on the right, 3 rows tall at the top, and 3 rows tall at the bottom:

 

352 x 240 = 352/8 x 240/8 = 44 x 30 = (2+40+2) x (3+24+3)

 

The Atari 2600 doesn't have a border area like the Atari 800, since the border area on the 800 is part of the active video (hence you can set the border color), whereas the border on the 2600 is part of the horizontal blanking and vertical blanking.

 

Anyway, I believe the pixel aspect ratio for NTSC video is given as 10:11. That applies to both 704x480 and 352x240, since 352x240 = (704/2)x(480/2). But since the 2600 has 160 active pixels per line, its pixel aspect ratio is 20:11, or about 1.82 (1.81 repeating 81). That's close to the default 2x1 pixel size used by most of the emulators; but if you want to tweak Stella's resolution to get 1.82, you would set the scaling factor to 91% (100% = 2.0, so 1.82/2.0 = 91%).

 

I'm not sure about the PAL 2600, but I think the pixel aspect ratio is 59:27, or about 2.19 (2.185 repeating 185). So I guess you'd set Stella's scaling factor to 109% for PAL?

Edited by SeaGtGruff
Link to comment
Share on other sites

How many scanlines do we have if we make sure to only use half of them? ;)

 

I was amazed when widescreen became popular because the format effectively deinterlaced the image.

If you've got something scanlines, but you make sure to use only half of them, then you have some scanlines. Now, you might have thought you'd have some scanlines plus half of the t, but if we include half of the t then we'd be interlacing, so we have to throw away the half of the t since we aren't interlacing. So we keep the some and throw away the thing.

 

As for PAL, the reference I was looking at said PAL pixels have an aspect ratio of 59:54, but another page says that a pixel aspect ratio of 12:11 is actually used, which makes more sense. That still gives a Stella scaling factor of 109% for PAL games.

 

I made a picture to try to (approximately) illustrate how a PAL 2600 and NTSC 2600 screen compares to the full TV picture. The full canvas represents a 4:3 screen. The black area represents the part that corresponds to the border on an Atari 800 (NTSC). The yellow plus the gray portion represents the picture area on a standard NTSC 2600 screen (192 lines, each with 160 active color clocks). The yellow portion by itself represents 192 lines on a PAL 2600 screen, with the gray portion representing the extra blanked lines above and below the active lines. If you want the PAL 2600 screen to have the same size and aspect ratio as the NTSC 2600, you should draw about 230 active lines (288/240=1.2, and 192*1.2=230.4).

 

post-7456-0-68803000-1364875166_thumb.png

Link to comment
Share on other sites

If you've got something scanlines, but you make sure to use only half of them, then you have some scanlines. Now, you might have thought you'd have some scanlines plus half of the t, but if we include half of the t then we'd be interlacing, so we have to throw away the half of the t since we aren't interlacing. So we keep the some and throw away the thing.

 

As for PAL, the reference I was looking at said PAL pixels have an aspect ratio of 59:54, but another page says that a pixel aspect ratio of 12:11 is actually used, which makes more sense. That still gives a Stella scaling factor of 109% for PAL games.

 

I made a picture to try to (approximately) illustrate how a PAL 2600 and NTSC 2600 screen compares to the full TV picture. The full canvas represents a 4:3 screen. The black area represents the part that corresponds to the border on an Atari 800 (NTSC). The yellow plus the gray portion represents the picture area on a standard NTSC 2600 screen (192 lines, each with 160 active color clocks). The yellow portion by itself represents 192 lines on a PAL 2600 screen, with the gray portion representing the extra blanked lines above and below the active lines. If you want the PAL 2600 screen to have the same size and aspect ratio as the NTSC 2600, you should draw about 230 active lines (288/240=1.2, and 192*1.2=230.4).

 

post-7456-0-68803000-1364875166_thumb.png

Nice illustration! If I had to choose I'd much rather watch movies in widescreen format on PAL than NTSC - the vertical resolution is so low extra scanlines really make a big difference.

 

With the games the programmer has a lot more CPU time to play with, your model frees up even more :)

 

What happens with PAL 262 mode normally, does this correct for aspect ratio or stretch out the image?

Link to comment
Share on other sites

Nice illustration! If I had to choose I'd much rather watch movies in widescreen format on PAL than NTSC - the vertical resolution is so low extra scanlines really make a big difference.

I'd much rather watch widescreen movies on a widescreen HD TV! :) And I hate when I pull out an old "widescreen" DVD of a movie that's really just a letterboxed 480-line film-- I have to change the settings on my HD TV and Blu-Ray player so the picture fills up the screen the way it's supposed to. Oh, well, eventually they'll be re-released in a proper widescreen format-- I hope.

 

With the games the programmer has a lot more CPU time to play with, your model frees up even more :)

 

What happens with PAL 262 mode normally, does this correct for aspect ratio or stretch out the image?

If you make a PAL/50 game that draws only 192 active lines (the yellow area in my illustration), you do get a lot more CPU time during the vertical blanking. And even if you draw 230 active lines so the picture more closely resembles an NTSC/60 game (the yellow and gray areas in my illustration), you still get more CPU time, since you've got 82 lines of vertical blanking (as opposed to only 70 lines of vertical blanking with NTSC)-- but not as much extra CPU time as with only 192 active lines.

 

If you make a PAL/60 game, the picture should match that of an NTSC/60 game (except for the difference in the color palettes), since the lines should be spaced a little further apart such that the pixel aspect ratio is the same as an NTSC/60 game. In contrast, using 230 lines in a PAL/50 game should give you an active area that's about the same height as 192 lines in an NTSC/60 or PAL/60 game, but the pixels will be flatter/wider because of the lines being closer together-- so you get a higher vertical resolution, but that means it will be harder to make the graphics match those of the NTSC/60 or PAL/60 version. For example, a sprite that's 12 lines tall will look shorter or squatter in PAL/50-- you'd have to draw the sprite 14 or 15 lines tall (12 * 1.2 = 14.4) to make it look like it's the same height as a 12-line-tall sprite in an NTSC/60 or PAL/60 game.

Link to comment
Share on other sites

I'd much rather watch widescreen movies on a widescreen HD TV! :) And I hate when I pull out an old "widescreen" DVD of a movie that's really just a letterboxed 480-line film-- I have to change the settings on my HD TV and Blu-Ray player so the picture fills up the screen the way it's supposed to. Oh, well, eventually they'll be re-released in a proper widescreen format-- I hope.

 

 

If you make a PAL/50 game that draws only 192 active lines (the yellow area in my illustration), you do get a lot more CPU time during the vertical blanking. And even if you draw 230 active lines so the picture more closely resembles an NTSC/60 game (the yellow and gray areas in my illustration), you still get more CPU time, since you've got 82 lines of vertical blanking (as opposed to only 70 lines of vertical blanking with NTSC)-- but not as much extra CPU time as with only 192 active lines.

 

If you make a PAL/60 game, the picture should match that of an NTSC/60 game (except for the difference in the color palettes), since the lines should be spaced a little further apart such that the pixel aspect ratio is the same as an NTSC/60 game. In contrast, using 230 lines in a PAL/50 game should give you an active area that's about the same height as 192 lines in an NTSC/60 or PAL/60 game, but the pixels will be flatter/wider because of the lines being closer together-- so you get a higher vertical resolution, but that means it will be harder to make the graphics match those of the NTSC/60 or PAL/60 version. For example, a sprite that's 12 lines tall will look shorter or squatter in PAL/50-- you'd have to draw the sprite 14 or 15 lines tall (12 * 1.2 = 14.4) to make it look like it's the same height as a 12-line-tall sprite in an NTSC/60 or PAL/60 game.

SeaGtGruff,

this is interesting! Has me thinking about making a 192 line PAL/50 version of the ASDK kernel that could run without flicker because of the extra block of time for the scrolling engines; not a bad tradeoff for a slightly squashed image.

 

I prefer HD too and plasma over LCD, but when widescreen/halfscreen first became popular many years ago I was using an ordinary NTSC Television and it suddenly felt low resolution.

 

I find I really miss programming on a CRT though; it has a warmer feel, the pixels are a softer hexagonal shape and always the right size. In order to properly display the 800x600 resolution I like on my LCD monitor I had to find one with 1600x1200 native resolution so that it could build square pixels for a genuine 800x600 display instead of displaying a dithering algorithm.

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...