NES output resolution

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

AzimuthFE
Posts: 17
Joined: Thu Jun 09, 2016 4:46 pm

NES output resolution

Post by AzimuthFE »

Hey, everyone. Just a quick question about the video signal output by the NES.

It is my understanding that the NES outputs at 224p. In order to display this on SDTV the CRT display would skip over every other scanline (which is why emulators have a scanline option).

Fair enough. But in this video (https://hooktube.com/watch?v=3BJU2drrtCM, the TV (presumably designed for NTSC SDTV) seems to be drawing every scanline with no 'dark' scanlines. This is also how I personally remember the picture looking as a child.

So whats happening here? How is the 224p picture being displayed on every line of a 525-line display and still taking up most of the screen?
User avatar
Quietust
Posts: 1920
Joined: Sun Sep 19, 2004 10:59 pm
Contact:

Re: NES output resolution

Post by Quietust »

First of all, the NES outputs 240p, not 224p - some scanlines might be obscured by your TV's bezel, but the PPU outputs all of them. Second, it's definitely progressive output, because the NTSC NES PPU outputs exactly 262 scanlines per frame (312 for PAL), not 262.5 as per the NTSC specifications (312.5 for PAL), and the lack of that final half scanline is what makes it progressive instead of interlaced.

The most likely reason you don't see inter-scanline gaps is probably because that video was recorded on a rather small screen, so the gaps would've been extrremely small; on a larger screen, they likely would've been more noticeable. The "100% scanlines" effect presented by most emulators is highly exaggerated, and real TVs (especially small ones) didn't actually look like that.

In order to see that it's actually progressive rather than interlaced, you'd need to see a recording of two consecutive frames to see that the scanlines from each frame are perfectly aligned with the scanlines from the frame immediately preceding/following it.
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.
User avatar
Nioreh
Posts: 115
Joined: Sun Jan 22, 2012 11:46 am
Location: Stockholm, Sweden

Re: NES output resolution

Post by Nioreh »

It seems you misunderstand how a CRT works. There is no "on every line" on a CRT. It is just a surface where the electron gun can "paint". It does this by scanning in lines from left to right, top to bottom. The "dark lines" you are referring to are the gaps between the lines that are drawn. Depending on the focus of the beam and the size of the display, these gaps are more or less visible.
AzimuthFE
Posts: 17
Joined: Thu Jun 09, 2016 4:46 pm

Re: NES output resolution

Post by AzimuthFE »

Nioreh wrote:It seems you misunderstand how a CRT works. There is no "on every line" on a CRT. It is just a surface where the electron gun can "paint". It does this by scanning in lines from left to right, top to bottom. The "dark lines" you are referring to are the gaps between the lines that are drawn. Depending on the focus of the beam and the size of the display, these gaps are more or less visible.
So does the screen display higher resolutions than 240p (e.g. 480i) by focusing the beam into a smaller 'dot'?
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: NES output resolution

Post by lidnariq »

A CRT is an analog device: there is a beam of electrons that is rapidly scanned across a screen covered in phosphors.

The size of the dot is almost never tuned at operation time: every CRT is optimized for a given fixed resolution. 240p vs 480i is just a question of whether the electron beam is at the exact same vertical offset every vsync or offset by half.

Smaller CRTs don't (can't?) tune the dot small enough to meaningfully achieve visible interlacing. Most TVs include a specification of the number of vertical lines: this is a specification of how large the electron beam is relative to the size of the phosphor screen.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: NES output resolution

Post by psycopathicteen »

AzimuthFE wrote:
Nioreh wrote:It seems you misunderstand how a CRT works. There is no "on every line" on a CRT. It is just a surface where the electron gun can "paint". It does this by scanning in lines from left to right, top to bottom. The "dark lines" you are referring to are the gaps between the lines that are drawn. Depending on the focus of the beam and the size of the display, these gaps are more or less visible.
So does the screen display higher resolutions than 240p (e.g. 480i) by focusing the beam into a smaller 'dot'?
The lines would just overlap in 480i mode. Actually, it's a good thing if interlacing lines overlap, because it makes interlacing artifacts less noticeable.
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: NES output resolution

Post by Dwedit »

Some TVs will not show any black lines between scanlines at all, while others have big black gaps.

My 1981 trinitron has no gaps, but a newer JVC TV has huge gaps.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: NES output resolution

Post by tokumaru »

I've never, ever, seen any TV display anything remotely similar to what emulators pass off as "scanlines", be it 100%, 50% or even 25%. I could never understand why those options existed.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: NES output resolution

Post by lidnariq »

One of the big factors is that the size of the electron beam correlates with the brightness. (You can only get so high of an electron flux before you start pulling electrons off more)

So the standard "Just put a simple line in between" doesn't even look close to authentic. Not even on an old VGA CRT where the electron guns have the same effect going on, because the electron beam is tuned to be much much smaller there.

Modern openGL shader emulations of CRT bloom actually begin to approach feeling authentic.
User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2064
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: NES output resolution

Post by FrankenGraphics »

I once borrowed 4 tv sets for showing off some of my graphics side by side, and it was also insightful to see how much the same image could look differently across different screens. One had a very distinct scanline spacing and it was the first time i've actually seen that on a tv.

...and it, as lidnariq points out, didn't look much like the "emulation" effect.
AzimuthFE
Posts: 17
Joined: Thu Jun 09, 2016 4:46 pm

Re: NES output resolution

Post by AzimuthFE »

Thanks for all the replies, guys. I think I understand now. :beer:

So in interlacing mode the 'even' scanlines are offset by only half a scanline? If that's the case I had one last question: How does the TV know to use interlace mode? Is there some part of the video signal?
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: NES output resolution

Post by lidnariq »

In a CRT, the horizontal and vertical deflection coils basically move at one of two constant¹ rates: Down/Right at normal speed, or Up/Left much faster.

The TV separates out two signals from the incoming video that mean "go to top" (vertical sync) and "to to left" (horizontal sync); the relative timing of these two events controls whether the scanlines are skew or aligned.


¹Actually not very constant, because driving electromagnets is hard, and CRTs aren't perfect spherical sections
User avatar
Sumez
Posts: 919
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: NES output resolution

Post by Sumez »

tokumaru wrote:I've never, ever, seen any TV display anything remotely similar to what emulators pass off as "scanlines", be it 100%, 50% or even 25%. I could never understand why those options existed.
Most scanline filters suck, but there are some really good ones out there, and I greatly prefer it to just plain pixel-by-pixel displays, which looks really fake, and nothing like how anyone ever experienced the games at the times.
The problem is of course that you can't just skip every other line of pixels and call it a scanline, since an actual CRT display works with phosphor light, and you'd always have the colors "spill over" into the adjacent scanlines, which is why the picture never gets noticably darker from being progressive instead of interlaced, and the brightest colors would spill over much more than the dark ones - so you'd need a much higher resolution than just 2x or even 4x the original to reproduce a convincing scanline on a modern display.

Here's a picture I took off my Sony PVM monitor - not the best photo, but I think it displays the scanlines well. It's one of the best CRTs ever produced, and a fan favourite among many "retro gamers". I think its scanlines makes the image look incredible. Most lower end consumer TVs (usually off-brand no-name stuff without RGB inputs, VHS combi-TVs, etc.) tended to have a much more blurry image, which also obscured the scanlines. Whether you like scanlines or not, that kind of messy image quality really isn't desirable.

Image
User avatar
MottZilla
Posts: 2837
Joined: Wed Dec 06, 2006 8:18 pm

Re: NES output resolution

Post by MottZilla »

tokumaru wrote:I've never, ever, seen any TV display anything remotely similar to what emulators pass off as "scanlines", be it 100%, 50% or even 25%. I could never understand why those options existed.
One reason it doesn't look similar is because it's not 50/50 image and black line. Sumez's picture shows that it's a far thinner line. So to do this in an emulator you'd need to run at much higher resolutions that older computers couldn't handle. But it could handle the 50/50 scanline effect which does give the image a certain look to it that some people like and some people don't. But I think that's why it exists.
User avatar
mikejmoffitt
Posts: 1353
Joined: Sun May 27, 2012 8:43 pm

Re: NES output resolution

Post by mikejmoffitt »

How the scanlines appear is a product of the beam focus and convergence, which is influenced by tube age / emission, proper alignment of convergence rings, yoke positioning, and quality of the tube in the first place.

Remember that the actual lines are scanned out, and there's no magic to "the scanlines"; they are just the gaps between the actually scanned lines. An emulator filter or shader isn't going to wholly capture "the look of scanlines" because every type of tube is different, even before condition is taken into account.
Post Reply