NTSC borders in emulators

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
User avatar
thefox
Posts: 3139
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

NTSC borders in emulators

Post 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?
User avatar
koitsu
Posts: 4203
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Post 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).
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Post 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.
Useless, lumbering half-wits don't scare us.
User avatar
koitsu
Posts: 4203
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Post 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?
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post 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).
User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper »

I'd say overscan. No emulator displays such yellow bars.
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Post 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.
Useless, lumbering half-wits don't scare us.
User avatar
rainwarrior
Posts: 8062
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Post 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.
User avatar
thefox
Posts: 3139
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Post 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.
Bisqwit
Posts: 248
Joined: Fri Oct 14, 2011 1:09 am

Post 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
Last edited by Bisqwit on Tue Jun 05, 2012 12:38 pm, edited 2 times in total.
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Post 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.
Useless, lumbering half-wits don't scare us.
Grapeshot
Posts: 85
Joined: Thu Apr 14, 2011 9:27 pm
Contact:

Post 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.
Bisqwit
Posts: 248
Joined: Fri Oct 14, 2011 1:09 am

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