Page 1 of 1

NTSC borders in emulators

Posted: Tue Jun 05, 2012 3:35 am
by thefox
NTSC NES has borders on left and right sides of the screen. The color of the borders is the current background color. For an example see Mickey's Adventure in Numberland (background color is yellow on the top part and black on the bottom part).

Are there any emulators that render these borders?

Posted: Tue Jun 05, 2012 4:55 am
by koitsu
To me those look like overscan, at least the borders on the right/left. I don't think these are "borders" on the console itself per se, meaning they're a result of how CRTs work. Note that this slightly differs (but is related) to the overscan wiki document. The bottom border (where the "NESGuide" overlay is printed) is probably the same.

I don't have the Mickey's Adventures cart, but I do have a Sony Trinitron CRT that allows for service mode (see 4-3-1) where I can adjust all the low-level parameters of the display, thus see overscan if need be. So I do have a way to view it if need be. :-)

I mention this because it looks like the display ends up just rendering colour 0 (background colour) or possibly the last colour chosen in the overscan area. And if that's the case, I imagine it would be possible to set this colour to something unique (per scanline if need be) right before HBlank begins by using the "background palette hack". If that worked, one could effectively use the overscan area to represent how much CPU time something took -- we used to do this on the Apple IIGS but via a border colour register (bits 3-0 of $C034), and the PC in native VGA mode (320x200) since it has a border colour register as well (0x3C0 function 0x11).

Posted: Tue Jun 05, 2012 5:29 am
by Bregalad
No, it's not overscan, the NTSC PPU actually render palette entry #0 colour at the edges of the screen, while this never happens with a PAL unit, which always cuts off the leftmost and rightmost 2 pixels.

Posted: Tue Jun 05, 2012 5:55 am
by koitsu
Bregalad, in the reference video there is significantly more than 2 pixels on the right and left which are colour #0. Did I misunderstand what you wrote?

Posted: Tue Jun 05, 2012 6:17 am
by tokumaru
koitsu wrote:Bregalad, in the reference video there is significantly more than 2 pixels on the right and left which are colour #0. Did I misunderstand what you wrote?
That video is from an NTSC console, which does render a few pixels of background color before and after the image. The 2-pixel thing is a PAL issue (I haven't confirmed it myself though).

Posted: Tue Jun 05, 2012 6:18 am
by Zepper
I'd say overscan. No emulator displays such yellow bars.

Posted: Tue Jun 05, 2012 6:40 am
by Bregalad
koitsu wrote:Bregalad, in the reference video there is significantly more than 2 pixels on the right and left which are colour #0. Did I misunderstand what you wrote?
Yes, you misunderstood me (you know I'm no a native English)

On NTSC :
The PPU renders MORE than 256 "pixels" each scanline, the additional "pixels" are colour palette #0 - or BG colour.

On PAL:
The PPU renders only 252 "pixels", the leftmost and rightmost 2 pixels are systematically hidden, and the border area is always black, no matter the BG colour.

Posted: Tue Jun 05, 2012 9:26 am
by rainwarrior
Yes, this border is part of the signal on both NTSC NES and Famicom, in my experience.

Actually, it's one of the ways I can tell a video on YouTube is using real hardware or not, since I've never seen an emulator do it.

Posted: Tue Jun 05, 2012 10:18 am
by thefox
OK, so emulators don't do it. I would like to extend this to a feature request to any emulator authors who're listening: please consider rendering them. :)

It's a small thing, but as you can see from the video I linked, the borders do affect the "feel" of the visuals (IMO), especially in games with midscreen palette changes.

Posted: Tue Jun 05, 2012 10:39 am
by Bisqwit
thefox wrote:OK, so emulators don't do it. I would like to extend this to a feature request to any emulator authors who're listening: please consider rendering them. :)
Already doing it in my emulator (git://bisqwit.iki.fi/nesemu1), in one of the branches anyway.
And yes, I kind of love the fact that in Super Mario Bros., the blue background extends to the screen edges as well.

EDIT: Added screenshot (also contains experimental scanline effect, and mild chroma-dotting):
Image

Posted: Tue Jun 05, 2012 11:21 am
by Bregalad
And yes, I kind of love the fact that in Super Mario Bros., the blue background extends to the screen edges as well.
Personally I think it looks weird and for this reason I'd stick to black background whenever I can.

This is especially distrubing for, say, Ninja Gaiden's cinema scenes where the blue borders are extremely obvious and the screen looks just like a giant H letter.

Posted: Tue Jun 05, 2012 12:03 pm
by Grapeshot
My emulator HalfNES renders a few pixels of border on either side when the NTSC filter is on. (Sampling at a multiple of the subcarrier and rendering at 704x480 to match the NTSC clean aperture seems to result in this.) Some TVs show this area (it's obvious in the Ninja Gaiden story segments), but not all.

This emulation is currently too slow for practical use on most computers, but I think it's about as accurate to an older TV as possible.

Posted: Wed Jun 20, 2012 3:10 am
by Bisqwit
On my NTDec PAL famiclone, it looks like it draws some 6-8 pixels of border (not exactly sure) on the left side and 0 pixels on the right side. I haven't analyzed yet whether any pixels of the 256x240 content are missing, but it does not look like they are.