This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

Finding the exact correct aspect ratio for NTSC NES:

Finding the exact correct aspect ratio for NTSC NES:
by on (#83134)
Ended up finding these forums from doing google searches on the subject. I found there was a lot of different opinions and different technical data depending on who you ask, so I decided to set about determining it myself. Here's what I did:

1. I hooked up my front-loading NES to my Sony 55-inch LED HDTV using the A/V jacks.

2. I set the TV to 4:3 mode so it did not zoom or stretch the picture.

3. Upon loading up a game, I found the TV was displaying all 256 horizontal pixels and exactly 232 vertical pixels (the remaining 8 pixels were beyond the edge of the display).

4. I then measured the dimensions of the active pixels on the screen, and results were 32.5 horizontal inches by 26.75 vertical inches.

5. Setting my paint program on my computer to 100dpi, I then input the measurements into the print resolution settings. This gave me 3250x2675.

6. Since I know the visible vertical resolution was 232, I simply resized 2675 down to 232, which gave 282 as the horizontal resolution.

7. Adding back on the 8 lines missing from the original display, this gives 282x240 and a pixel aspect ratio of 1.175 EXACT. At 500% resize, this gives 1410x1200.

7. To cross-verify, I screen-capped Metroid on the area to the left of the starting screen where the morph ball is. The morph ball was designed to appear as a perfect circle with the proper aspect ratio. Did my figure of 1.175 exact hold up? You bet it did!

8. I resized the Metroid screen capture to 282x240 and then resized that to 500% (1410x1200).

9. Finally, I overlapped a perfect circle onto the morph ball, and it fit EXACTLY inside of it! The dimesions were so precise, there was simply no denying I'd nailed the ratio right on the money (at least what the Metroid programmers expected).

Below is the image of the morph ball at 500% with the perfect circle overlapped on top of it:

Image

So to conclude, 282x240 (1.175) is hands down the intended aspect ratio of NTSC NES graphics.

by on (#83136)
Wow, that's interesting.
For some reason I always through it'd be 4:3, but that's only approximate, as there is less pixels vertically than horizontally.

The good news is that the real aspect ratio is closer to 1:1 than 4:3, so that's less distortion than what it could have been.

Also, the real aspect ratio might vary from TV to TV.... even if you stick to 4:3 TVs, they might not be EXACLTY 4:3, and the amount of cropped pixels on the edges varies.

by on (#83137)
The magnifying glass in Dr. Mario is 72x80 pixels, giving 1.111 PAR. It's clear that some of these PARs calculated from "this in-game object should be circular" implicitly round the true PAR to the nearest pixel or nearest tile.

True, the aspect ratio varies from TV to TV depending on how it's calibrated. So I went back to the definition of the signal, which ties into the well-known Rec. 601. Then I calculated what part of the signal is within the clean aperture and got 280x240, giving PAR of 8:7 = 1.143:1.

by on (#83153)
How I know 282 is the most accurate was the cross-verification with emulated Metroid. Seriously, what are the odds that my LCD TV just happens to make the morph ball PERFECTLY circular when applied to emulated Metroid? No other figure makes that happen. Not 280, not 288, not 290, but EXACTLY 282. Furthermore, 282 makes perfect circles no matter what scale multiples you use. 500% was my example, but any scale multiple works. When you try 280, the circles become more and more inaccurate as you test them at higher scales.

BTW, I've since gone on and applied the 282 in SNES emulation, and narrow circles also looked perfect in those.

Edit:

Here's the Dr. Mario magnifying glass with 282 applied & scaled to 500% (1410x1200) and a perfect circle dropped over the center of it:

Image

Using 280, the glass will be more 'narrow' than the above picture.

Edit 2: I should point out you can test accuracy by scaling to 500% first before applying any correction. This means you take the 256x240 image and scale it to 1280x1200 (500%) for example. You then apply the 282 formula to expand it to 1410x1200. This avoids the largely warped pixels you'd get if you applied the 282 at the original 256 resolution.

by on (#83157)
One caveat with using standards is that very few retro console actually followed the standards 100%. Go ahead, anyone name a retro NTSC machine besides the Amiga that outputs exactly 60000/1001 Hz vertical refresh rate, for example. I would very much doubt the NES outputs the exact line length that the standard calls for.

by on (#83158)
The NES PPU line period is 341 pixels. The standard NTSC line period is 341.25 NES pixels. But as I view it, the length of the active picture portion is what matters.

The magnifying glass size is less than a pixel off, and as I said, it's a case of round-to-nearest-tile anyway.

by on (#83165)
After some more tests with various narrow graphics, I have to concede that there is an 'analog' variance level in expected aspect ratio. It seems each game's programmers used whatever analog 4:3 setting their equipment was at during the graphic design process. I went back and examined Dr. Mario more closely, lining up circles down to the single pixel level and concluded it expected a 286 ratio. However, 286 was too wide for Metroid, indicating a different standard was used. The more games I tested, the more I found it varied from game to game.

So all this means that for NES artwork, there is no specific standard ratio you can go by. Instead, we're back to an analog knob adjutsment, though I feel the range can be tightened down to say 280 to 288 to allow room for error. I wasn't able to find any game examples outside of this range.

by on (#83168)
It might also be interesting, in terms of being an intellectual curiousity, to calculate the length of a NES pixel in nanoseconds, like one can say that the Amiga outputs 70ns pixels in Hires and 35ns pixels in SuperHires.

by on (#83169)
Quote:
How I know 282 is the most accurate was the cross-verification with emulated Metroid. Seriously, what are the odds that my LCD TV just happens to make the morph ball PERFECTLY circular when applied to emulated Metroid? No other figure makes that happen. Not 280, not 288, not 290, but EXACTLY 282. Furthermore, 282 makes perfect circles no matter what scale multiples you use. 500% was my example, but any scale multiple works. When you try 280, the circles become more and more inaccurate as you test them at higher scales.


Dev's BITD tended to just round off the PAR. I've seen it where they completely got it wrong. Though this isn't as obvious until you get into the 16bit generation and ports of arcade games. Consumer grade CRT TVs weren't accurately calibrated (they were calibrated within 'range'). But most, if not all, of my TVs I own during the 8 and 16bit era had narrower settings for PAR (NTSC). Same with friends sets. 290, 292, etc just doesn't look right from the years I played these old games. I personally go with a low 280ish number (for 5.369mhz dot clock) in emulation if I have the option. Still beats a straight 1:1 PAR (on a square pixel display). I have to use different scale values for full screen though, as my monitor is square pixel but 5:4 resolution ratio (no 4:3).

by on (#83171)
I spent most of the evening testing various games in the NES library. 280 and 282 seem to be the most common expected ratios. For example, the silver ball in "Pinbot" becomes perfectly round via 280x240, whereas the bumpers in "Pinball" lean more towards 282x240 for perfect roundness.

I did find one extreme case in "Wheel of Fortune". I don't know if the programmers expected the wheel to appear perfectly round, but it requires 292x240 to make it that way. It's the most anamorphic design of graphics I've seen yet in an NES game.

by on (#83172)
T&C Surf Design 2 overcorrected.

by on (#83174)
LocalH wrote:
It might also be interesting, in terms of being an intellectual curiousity, to calculate the length of a NES pixel in nanoseconds, like one can say that the Amiga outputs 70ns pixels in Hires and 35ns pixels in SuperHires.

Each cycle of the NTSC color subcarrier is 17600/63 = 279.365 ns long, and an NES pixel is two-thirds of that.

Wheel of Fortune for NES was developed by a company based in Twycross, a village deep in PAL-land. They might not have had a lot of NTSC systems handy to test on and thus got it slightly wrong.


EDIT: I did some thinking on the 292 figure, and I might have been unclear in my explanation. Please allow me to clarify:

The calculated pixel aspect ratio, based on the assumptions of Rec. 601, is 8:7. This means (7/8)*320 = 280 NES pixels, including 24 pixels of border, fit in the 320-pixel-wide clean aperture. The actual picture minus the border is (8/7)*256 = 292 pixels wide. So you can resize 256 to 292, or you can pad to 280 and resize to 320. If you're editing video for YouTube, I recommend the latter because YouTube's supported resolutions are all multiples of 160x120.

by on (#83191)
The wiki entry:

http://wiki.nesdev.com/w/index.php/Overscan

Claims the NES PAR on a 4:3 TV to be 1.143, which would make the 256x240 area equal to 274x240. This seems quite a bit less than the 280~282 we've been finding in most games. Am I misunderstanding that article? I wish whoever wrote it would have clarified in a much more simple way what aspect formula should be used for the 256x240 active area...
Scale before padding or pad before scaling?
by on (#83198)
So you want to turn the NES's wide pixels into square pixels of the same size, and you want to scale before padding. You need to multiply the width by the PAR and leave the height unchanged. This gives (256 * 1.143) = 292 wide by 240 tall.

The wiki article assumes that you'll pad before scaling, as that's what actually goes on in the NTSC signal. In this case, you need to find the square-pixel clean aperture (320x240), divide the width by the PAR (producing 280x240), generate the NES picture into that size of a frame, and then scale to 320.

So do you want the wiki article to contain specific instruction from an emulator author's point of view for both the pad-before-scaling case and the scale-before-padding case?

by on (#83204)
To clarify, I'm talking about the intended aspect ratio of the 256x240 active pixels. My LCD TV measurements had it at 1.215:1 (based on the 232 visible vertical res, 1.175:1 total for 256x240), which is 282x240 when you resize an emulated NES screen. Coincidentally, my TV had the SNES in exactly the same horizontal sizing (because both NES and SNES both uses 256 active horizontal), and had borders on the top and bottom where the remaining 16 pixels would have been for a 240 vertical res.

So to recap:

My TV uses 1.215:1 for 256x232 visible (1.175:1 for the full 256x240) and 1.2592:1 for 256x224, both being equal to 282 horizontal correction width in an emulator at lowest scale.

Now that 292 width you're talking about is just way too wide. As I pointed out, the only game that seems to use that figure is Wheel of Fortune. Most everything else expects somewhere around 280~282, which is where my own TV has it. Again the 280~282 I'm talking about is when you take 256x240 and resize it horizontally in a paint program to give the appearance of being TV-aspect accurate.

Edit: corrected some mistakes in my reply

Edit 2: It has now dawned on me the mistake being made about the 292 figure. It assumes all 240 lines are visible onscreen. They are not! On my TV, you have the option of the default 224 visible, or a slightly zoomed out mode of 232 visible (which I use). In both cases, its a mistake to figure in all 240 lines when considering the correct aspect ratio. NTSC TVs only display about 224, so if you shrunk the screen to fit all 240, the aspect ratio becomes changed unless you allow black borders to show up on the sides of the screen. This now makes perfect sense on how the designers of Wheel of Fortune screwed up. They made the mistaken assumption of basing their aspect correction on all 240 lines being visible. This gave them the wrong aspect, and is why it looks so extreme compared to other games.

So to conclude, 292x240 is actually wrong. It doesn't take into account NTSC TVs lop off a portion of the NES graphics on the top and bottom.

by on (#83205)
I probably should post a new reply since I've gone back and edited my previous reply about a dozen times now to add corrections and new findings.

Anyway, because of my epiphany, I now know this part of the wiki article to be flat-out wrong:

But as a slight optimization, you can scale first (256 * 8/7 = 292) and then pad: stretch the 256x240 pixels to 292x240, 584x480, 876x720, or 1168x960 square pixels or 320x240 or 640x480 non-square pixels. Then you can emulate the overscan by drawing a TV bezel on top of the edges of the emulated picture.

It's wrong because it fails to figure in the VISIBLE aspect ratio of the NES screen on 4:3 TVs. The visible aspect should be based on 256x224, NOT 256x240. As I said in my updated reply on page 1, this is the same mistake the designers of Wheel of Fortune made. The article then makes it even worse by suggesting a bezel to cover up the top and bottom edges. Too bad it already used that area to factor in VISIBLE aspect ratio! Wrong wrong wrong! You calculate the ratio based on 256x224, and then add on the remaining 16 lines to the top and bottom. Only after that should you consider the option of a bezel.

by on (#83206)
Forget 224, that number of scanlines isn't even consistent across TVs. My 1980 TV displays about 231 scanlines, but the frame of the TV is rounded, so that's only in the middle.

Also, CRT TVs tend to distort the image based on the contents of the palette. Ever beaten a level in Arcade Pac Man? Notice how the entire maze moves as the colors change.

by on (#83207)
Argh! Just when I thought I had it all figured out, it blows up in my face again!

Here's Wheel of Fortune taking into account my idea of using the "visible" aspect ratio based on 256x224:

Image

Notice the perfect circle? So it would seem they had the same idea I did. You simply go with a 4:3 format based on the middle 224 lines. Unfortunately this goes even more extreme than less extreme. In this case, it comes out to about 299 or 298x240. That's even worse than 292x240!

If I'm going to go with "visible" aspect ratio, I'd need to know on average just how much of the 256 is normally displayed on screen. We already know the vertical average is 224, but so far we've been assuming all 256 for horizontal.

I'm about ready to give up on this quest to find the truth. It's so frustrating!

by on (#83211)
Update:

I got so fed up, I dug out my CRT monitor from the garage, hooked the NES up to it and did the same physical measure of the graphics as I did on my LCD TV. Much to my dismay, the measurements of the onscreen graphics exactly matched the ratio of 292x240. :oops: :x

Furthermore, the Wheel of Fortune test I did was wrong. The border wasn't meant to be a perfect circle, but rather the wheel itself was. At 292x240, it works out just fine.

So I give up. My own CRT matched the 292x240 ratio, so I cannot deny that now. My apologies for my previous revelations. I seriously thought I was on to something with the visible aspect concept.

by on (#83220)
Quote:
It's wrong because it fails to figure in the VISIBLE aspect ratio of the NES screen on 4:3 TVs. The visible aspect should be based on 256x224, NOT 256x240.


The visible scanline count has nothing to do with it. Screen aspect ration and PAR (pixel aspect ratio) are not the same thing. First, you calibrate your TV to 4:3. If the visible part of the display window doesn't allow for full 4:3 image, then you need to resort to adjustment with clipping (overscan). When that's correct, then you can analyze PARs of games on the TV.
Re: Finding the exact correct aspect ratio for NTSC NES:
by on (#111058)
I've used this thread as a guide before, and came back to it now when calibrating emulators. It seems that FCEUX is the only one I have that will let me input the correct aspect ratio adjustment.

Others either keep everything 1:1, or they have an automatic adjustment that goes 1.25:1 (which is much too wide; at 3x it becomes 3.75:3). Even FCEUX has these as defaults and forces one to manually put in a different number in order to get anything resembling television proportions.

I have no idea why this is. At 3x, I input 3.422 in the "x" field. 3.422 is most accurate in stretching 256 pixels into 292, but a true 8x7 multiplier would be 3.428, which becomes one pixel too wide due to rounding.

The way the pixels scale, inputting 3.425 yields the same result as 3.422, and might be easier to remember. What's also noteworthy is that, in this range, no columns appear to flicker with no hardware acceleration or filters, whereas in other ranges they do.

The thing that bugs me is that other emulators do not seem to have the option to even get the aspect ratio this precise. They're either way too narrow or way too wide. The supposed "TV aspect ratio correction" is flat-out wrong.

Why not have an accurate value for TV ratio compensation in these emulators already? It seems a shame someone would have to Google to find an old thread where they could find that the answer is an input value that would equal (292/256) times the vertical scale factor. Why not just program these values in there in the first place? Instead of 1.25, 2.5, 3.75, and 5, which are clearly inaccurate, we'd have this:

1.141, 2.281, 3.422, and 4.563. These values make the screen look the way it did on a television set, and with the proportions the game designers most likely intended.

This is a really strong reason for me to prefer FCEUX over the others. Even though it's defaults are incorrect, at least we're able to correct it. And it helps that its default color palette is more accurate than the others' as well and that we get hq3x as an option (even though, sure, other emulators still have little things over FCEUX, like that weird bug in Mega Man 3, but they're relatively minor).

So ... I just figured I'd make this post so that anyone else coming along can get an idea what values *should* be used to get a TV aspect ratio, and maybe so some developers can consider making them more correct in the first place. It is a little frustrating to have so many NES emulation options, but all of them falling short on such a basic thing.
Re: Finding the exact correct aspect ratio for NTSC NES:
by on (#118667)
VideoGeemer wrote:
I've used this thread as a guide before, and came back to it now when calibrating emulators. It seems that FCEUX is the only one I have that will let me input the correct aspect ratio adjustment.

Others either keep everything 1:1, or they have an automatic adjustment that goes 1.25:1 (which is much too wide; at 3x it becomes 3.75:3). Even FCEUX has these as defaults and forces one to manually put in a different number in order to get anything resembling television proportions.

I have no idea why this is. At 3x, I input 3.422 in the "x" field. 3.422 is most accurate in stretching 256 pixels into 292, but a true 8x7 multiplier would be 3.428, which becomes one pixel too wide due to rounding.

The way the pixels scale, inputting 3.425 yields the same result as 3.422, and might be easier to remember. What's also noteworthy is that, in this range, no columns appear to flicker with no hardware acceleration or filters, whereas in other ranges they do.

The thing that bugs me is that other emulators do not seem to have the option to even get the aspect ratio this precise. They're either way too narrow or way too wide. The supposed "TV aspect ratio correction" is flat-out wrong.

Why not have an accurate value for TV ratio compensation in these emulators already? It seems a shame someone would have to Google to find an old thread where they could find that the answer is an input value that would equal (292/256) times the vertical scale factor. Why not just program these values in there in the first place? Instead of 1.25, 2.5, 3.75, and 5, which are clearly inaccurate, we'd have this:

1.141, 2.281, 3.422, and 4.563. These values make the screen look the way it did on a television set, and with the proportions the game designers most likely intended.

This is a really strong reason for me to prefer FCEUX over the others. Even though it's defaults are incorrect, at least we're able to correct it. And it helps that its default color palette is more accurate than the others' as well and that we get hq3x as an option (even though, sure, other emulators still have little things over FCEUX, like that weird bug in Mega Man 3, but they're relatively minor).

So ... I just figured I'd make this post so that anyone else coming along can get an idea what values *should* be used to get a TV aspect ratio, and maybe so some developers can consider making them more correct in the first place. It is a little frustrating to have so many NES emulation options, but all of them falling short on such a basic thing.


you can do it in nestopia too.
1.size=3x,options-preference-window postion
2.edit nestopia.xml ,find the "window-postion",right+108 or make sure right-left=888.
well ,the aspect will be 876*720.