The NTSC filter gives incorrect output due to what looks like an attempt to force it to fit in a 512-wide window (which results in the wrong aspect ratio anyway). Patch against SVN r3198 attached to make the filter work correctly for the SDL port. I can't build for Win32 so I haven't looked at that side of the code.
Can you elaborate 'incorrect output'? The use of nes_ntsc in fceux is defined as "NTSC2x" which should be resulting in a 512-wide output. It isn't clear why this was chosen originally, but that's how it works. Is there something else incorrect about it? Unless it's 512x224 or somesuch on SDL, "wrong aspect ratio" is a matter of opinion. If you want NTSC1x then we should add a new filter that does that.
This patch also seems to fix nes_ntsc's deemph support.
This patch also breaks the windows port at runtime for reasons I haven't checked yet.
Last edit: zeromus 2016-02-24
"Incorrect" as in "does not look like what I see when I look at an NES plugged into a TV". The hacks added in nes_ntsc to force 512-wide output cause incorrect colors on some pixels; if you want 512-wide output, the right way to do it is to get the 602-wide image from the original nes_ntsc algorithm and rescale that into a 512-wide output buffer.
Aspect ratio is not a "matter of opinion".
I'll grant that aspect ratio is affected by pixel shape, but just about every display device in use these days has square pixels. If I had to guess, I'd say FCEU originally used 256x224 / 512x448 just because it's easier not to worry about fractional scaling, but if you have a filter whose intent is to show what the image would have looked like on a TV, aspect ratio should be part of that, IMO.
Also, yes, I added deemphasis support in this patch (forgot that was in there).
Last edit: Andrew Church 2016-02-24
OK, I can handle "resizing hacks breaks nes_ntsc". But unfortunately, you're wrong about aspect ratio and opinions. Whether the aspect ratio is faithful to any given criterion is an objective matter, but what that criterion should be differs. I could literally prepare a coffee table book "101 sensible aspect ratios for the NES with illustrated rationales." Please understand this is a very boring subject which can't be resolved by technical analysis, only giving users options.
Naturally, doing something to the aspect ratio should be a part of what nes_ntsc does, but there's only one possible thing: whatever nes_ntsc is prepared to do, which does seem to be 602x448. I have no idea what your SDL patch does or how the SDL port works, but judging from the windows port, (I can't make heads or tails of the configuration dialog, but apparently some people like it) it isn't clear what aspect ratio someone should pick to go along with a given filter (or that when using NTSC they should enable the force AR mode at the default 4:3). But a carefully chosen replacement name for "NTSC 2x" should help with that; and/or on my end, I can add text to the configuration dialog box to tell the user what to do for NTSC. I don't know how it looks on your end.
And--are you even able to get it to output 602x448 in SDL? What's your commandline?
Last edit: zeromus 2016-02-24
To be fair, I think we had a slight miscommunication; my point on aspect ratios being an objective matter is in the sense of asking whether a particular image size is appropriate for a desired target aspect ratio. I would stilll argue that the 4:3 display aspect ratio is well-defined for standard-definition NTSC video and thus should be used for the NTSC filter, at least as a default, but I agree that not everyone wants a 4:3 aspect ratio and I certainly wouldn't suggest forcing it for every filter.
With respect to command line options, none are needed (aside from --special 3); the patch takes care of getting SDL to select the proper window size, using a base width of 301 instead of 256 when the NTSC filter is selected.
Windows fixed and committed in r3201
I think this broke fullscreen mode for the filter. And HW acceleration option for windowed mode.
Last edit: feos 2016-07-10
It also messes up 4:3 aspect ratio for windows video config.
first of all, i dont see how it messed up 4:3 option. if you use the NTSC filter at any AR other than what NTSC wants to be, youre doing it wrong. as discussed here.
r3238 fixes HWaccel and fullscreen issues.
That covers all your complaints. Please elaborate the 1st
I fixed it anyway in [r3239]
Related
Commit: [r3239]