Emulator with a "TV filter"?

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
User avatar
SusiKette
Posts: 147
Joined: Fri Mar 16, 2018 1:52 pm
Location: Finland

Emulator with a "TV filter"?

Post by SusiKette »

Everyone who has played on both emulator and on real NES probably has noticed how different they look visually. NES has some blurry edges, slightly inconsistent color (some colors changing slightly), contrast issues (might be the TV as well, but not sure), a bit of motion blur, scanlines not perfectly aligned and so on. Does any emulator have a filter that would at least try to make it look like what it would look like on NES?
Avatar is pixel art of Noah Prime from Astral Chain
User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2064
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: Emulator with a "TV filter"?

Post by FrankenGraphics »

I use nintedulator if i want to get close to something like an NTSC experience (or what i imagine it to be). For PAL, i just use my old unit because nothing i've tried emulator-wise looks quite like it. One thing you don't get in emulation so far is how different the APU + audio out actually sounds.

btw is there really motion blur? that's not something i've noticed.
NewRisingSun
Posts: 1510
Joined: Thu May 19, 2005 11:30 am

Re: Emulator with a "TV filter"?

Post by NewRisingSun »

Nestopia has had an NTSC filter for ages, based on accurately modelling the NTSC signal generation and decoding process.

So called "CRT filters" on the other hand are usually just toys, rarely-ever accurate to the characteristics of any real-life CRT, and so best avoided.
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: Emulator with a "TV filter"?

Post by lidnariq »

SusiKette wrote:NES has some blurry edges
"NTSC filters" are available in most modern emulators. As FrankenGraphics said, the artifacts look conspicuously different from PAL artifacts, but I think there was recent work in writing a PAL artifact generator in ... FCEUX?
slightly inconsistent color (some colors changing slightly)
Do you mean on horizontal edges? Or vertical edges?

Horizontal edges should be addressed by using an NTSC filter (or where-ever that PAL filter got off to)

For vertical edges, the NES's output is really lackluster, and would cause dramatic Hanover bars on PAL. A single horizontal scanline of color will shimmer up to ±15° hue if it's moved up and down one scanline at a time.
contrast issues (might be the TV as well, but not sure)
Probably the TV
a bit of motion blur
The phosphors used in CRT TVs since 1970 or so have a halflife somewhere around 4.5ms. While there is a little bit a motion blur, it should only be visible in the pixels that were anything but black and then are subsequently black.
scanlines not perfectly aligned
That sounds like the TV.
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Emulator with a "TV filter"?

Post by koitsu »

FCEUX has an NTSC filter option, and it looks quite good. I was just commenting on rainwarrior's most recent Twitch stream about NTSC filters. "Running on emulator or actual hardware? Hard to tell, looks pretty real". <brief chat on stream about it; he was using FCEUX>
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Emulator with a "TV filter"?

Post by rainwarrior »

Many emulators have an NTSC filter that reproduces how the NES' generated signal looks very well. FCEUX, Nestopia, Nintendulator DX, Bizhawk, PuNES, Mesen, etc. it's very commonly available.

Blargg wrote a version of it a while ago that has more or less become the reference implementation for it. A lot of the emulators that have it are directly using this library:
http://slack.net/~ant/libs/ntsc.html

Bisqwit wrote another version that was contributed to the wiki. Blargg's version was written for efficiency, but Bisqwit's is instead written to be a simple expression of the process that's easier to follow:
http://wiki.nesdev.com/w/index.php/NTSC ... 2B.2B_code


PAL signal generation, on the other hand, is not as widely implemented or documented in a very palatable form yet. There was a good thread here a while back:
https://forums.nesdev.com/viewtopic.php?f=3&t=12788


Anyhow, generating that signal is the first step of the process, and probably the most important one that has the greatest and most consistent impact on the image. The second step is how that signal appears on a television, which unfortunately varies a great deal from TV to TV. It's hard to give much reasonable advice about this.

CRTs which display interlaced alternating lines (480i at 30hz) when given an NES signal (240p at 60hz) end up skipping every second line, but having double brightness and double the framerate. This is sometimes simulated with an option that gets called "scanlines", but it's kind of impossible to simulate the appropriate brightness, and the actual spacing of the gap has hugely variable; some TVs have significant vertical blurring that can close that gap. (When simulating scanlines, it also becomes much more difficult to scale the image cleanly without introducing noticeable aliasing from the scanlines.)
FrankenGraphics wrote:btw is there really motion blur? that's not something i've noticed.
The brightness of the excited phosphor on the screen does not instantaneously change. There's an exponential curve where it falls off after being hit by the beam. This can create a fade/ghosting effect. Again very hard to simulate on anything but a CRT, mostly because it's very subtle and involves a very high dynamic range of contrast. It's hard to see without small bright objects moving across a mostly black CRT screen in a dark room, but it is real. Old thread about it here: https://forums.nesdev.com/viewtopic.php?f=3&t=10171

Other defects of the CRT image that you might simulate include things like: horizontal blur (filtering/bandwidth issues), variable colour controls (hue, tint, brightness, contrast), poorly adjusted deflection (e.g. barrel distortion), the 15kHz whine that these TVs produce, various chromatic aberrations, vertical/horizontal hold failures, other common modes of malfunction, etc. but this is all up to taste, mostly can't really be simulated on an LCD very faithfully, and there's no definitive version of how this should look.

Most "CRT" simulations end up really over-emphasizing some narrow aspect of a real CRT effect and ignoring a lot of others.


Edit: as usual here I'm a little bit redundant with some above posts that happened while I was typing.
Last edited by rainwarrior on Mon May 21, 2018 7:08 pm, edited 1 time in total.
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Emulator with a "TV filter"?

Post by tokumaru »

FrankenGraphics wrote:I use nintedulator if i want to get close to something like an NTSC experience
But... Nintendulator doesn't have any sort of video filtering... Last time I checked, it just used bilinear filtering if the window was scaled up, and even used square pixels.

I can't use emulators without using NTSC filters anymore, I really like the way they look.
User avatar
Dwedit
Posts: 4922
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Emulator with a "TV filter"?

Post by Dwedit »

Everything that runs on RetroArch can use a shader that tries to simulate a TV.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Emulator with a "TV filter"?

Post by rainwarrior »

tokumaru wrote:Nintendulator doesn't have any sort of video filtering...
thefox made a fork called Nintendulator DX that has an NTSC filtering option.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: Emulator with a "TV filter"?

Post by thefox »

rainwarrior wrote:
tokumaru wrote:Nintendulator doesn't have any sort of video filtering...
thefox made a fork called Nintendulator DX that has an NTSC filtering option.
I've started to call it NDX myself in a (vain?) attempt to avoid confusion.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
SusiKette
Posts: 147
Joined: Fri Mar 16, 2018 1:52 pm
Location: Finland

Re: Emulator with a "TV filter"?

Post by SusiKette »

FrankenGraphics wrote:btw is there really motion blur? that's not something i've noticed.
Not necessarily blur. I just didn't have a better name for it and that's what is looks at first. Some things that change every other frame such as bomb explosion in RECCA and air ship disappearing (at the very end) in SMB3 look like the current and previous frames are blurring together a bit. When I look closely it looks something like this. I'm not sure though how it should look if the pixels weren't scaled up on a TV, but I guess it could be impossible to know.
nes-blur.png
nes-blur.png (4.63 KiB) Viewed 10012 times
lidnariq wrote:Do you mean on horizontal edges? Or vertical edges?
I mean that sometimes when I play SMB the light blue background color changes in tone slightly. As far as I'm concerned this is not something that should happen within the game.
lidnariq wrote:Probably the TV
It's kinda annoying actually. In SMB at the "lives left" screen Mario is super bright like he is giving off light or something.
Avatar is pixel art of Noah Prime from Astral Chain
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Emulator with a "TV filter"?

Post by rainwarrior »

SusiKette wrote:Not necessarily blur. I just didn't have a better name for it and that's what is looks at first. Some things that change every other frame such as bomb explosion in RECCA and air ship disappearing (at the very end) in SMB3 look like the current and previous frames are blurring together a bit. When I look closely it looks something like this. I'm not sure though how it should look if the pixels weren't scaled up on a TV, but I guess it could be impossible to know.
The attachment nes-blur.png is no longer available
You might be describing interlacing? On most LCD TVs, the composite NES' 60fps 240p signal will get interleaved into a 30fps 480i image, so half the framerate with every second line from one frame or the other. This wouldn't normally have happened on a CRT, though, but you'd still get a transparency effect because the image persists in your vision anyway.

Here's an image I made a while ago, comparing a 480i capture from my Famicom with its de-interlaced 240p counterpart. (Click on the image, the GIF preview resizer on this forum is busted.)
gimmick_deinterlace.gif
User avatar
Sumez
Posts: 919
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: Emulator with a "TV filter"?

Post by Sumez »

NewRisingSun wrote:Nestopia has had an NTSC filter for ages, based on accurately modelling the NTSC signal generation and decoding process.

So called "CRT filters" on the other hand are usually just toys, rarely-ever accurate to the characteristics of any real-life CRT, and so best avoided.
Nestopia's filters is definitely my favourite. It has good looking scanlines, and an adjustable filter that allows you to recreate something looking like a good RGB signal.

I'm not a fan of filters that go out of their way to simulate horrible blurry composite video, which is just a side effect of all the interference in the video signal, and not really optimal. But a sensible RGB filter that gives a similar effect without going out of its way to simulate CRT oddities like curvature, bad geometry, overscan etc. has the intended effect of making games appear like they are created to look without just looking bad for the sake of looking bad.
Post Reply