Possible to have MiSTer turn off scanlines when interlaced modes are used?

Discussion about displays and related hardware including MiSTer filters and video settings.
AtomicShroom
Posts: 170
Joined: Sun Mar 07, 2021 12:28 pm
Has thanked: 31 times
Been thanked: 48 times

Possible to have MiSTer turn off scanlines when interlaced modes are used?

Unread post by AtomicShroom »

Toying around with the PSX core, I noticed that the selected scanline filter sticks around even when games are outputting 480i, which makes no sense since interlaced modes, by definition, don't have visible scanlines.

Is there a way to make it so scanlines are automatically turned off/on depending on whether is outputting a progressive or interlaced resolution?
Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 194 times

Re: Possible to have MiSTer turn off scanlines when interlaced modes are used?

Unread post by Malor »

AFAIK, interlaced modes still have scanlines. At 480i, for instance, the device is outputting 240 even lines, and then 240 odd lines. Nothing about that changes the width of the scanlines; they should be about the same thickness as 480p, just displayed half as often. You get either scanlines, or scanlines plus flicker.

I believe all CRTs have scanlines, all the time. It's just how the technology works. When they're less noticeable, that means the pixels are blooming more, which means you're losing potential resolution.
FoxbatStargazer
Top Contributor
Posts: 994
Joined: Thu Dec 10, 2020 5:44 pm
Has thanked: 309 times
Been thanked: 228 times

Re: Possible to have MiSTer turn off scanlines when interlaced modes are used?

Unread post by FoxbatStargazer »

If you are going to use interlaced scanlines then they should be alternating their position every frame, which is not what happens with the current implementation. That kind of flickering might not be great on some LCD panels either which is why just turning them off would also be nice.

Trouble is that scanlines are basically just another scaling filter right now. So then you'd have to differentiate between what is a scanline and what isn't, what filter to use in place of the chosen scanline one...

Probably the easiest thing for the user to understand would be to have fully separate video settings for interlaced, and people create a few interlaced presets. Although to get the "true" interlaced filter we would need some new tech that lets you program the filter to alternate itself every other frame.
AtomicShroom
Posts: 170
Joined: Sun Mar 07, 2021 12:28 pm
Has thanked: 31 times
Been thanked: 48 times

Re: Possible to have MiSTer turn off scanlines when interlaced modes are used?

Unread post by AtomicShroom »

Malor wrote: Tue May 10, 2022 12:38 am AFAIK, interlaced modes still have scanlines. At 480i, for instance, the device is outputting 240 even lines, and then 240 odd lines. Nothing about that changes the width of the scanlines; they should be about the same thickness as 480p, just displayed half as often. You get either scanlines, or scanlines plus flicker.

I believe all CRTs have scanlines, all the time. It's just how the technology works. When they're less noticeable, that means the pixels are blooming more, which means you're losing potential resolution.
Yes I know this, but what the filter ends up doing is wrong anyway. MiSTer ends up drawing a full 480p picture anyway, but then half of the drawn lines appear dimmer because of… reasons? And this is because I’m using 70% scanlines. If someone is using a 0% scanline filter, then half the resolution is missing at all times!
User avatar
aberu
Core Developer
Posts: 1144
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 244 times
Been thanked: 388 times
Contact:

Re: Possible to have MiSTer turn off scanlines when interlaced modes are used?

Unread post by aberu »

I think most people are misunderstanding you. The scaler knows, and the Main MiSTer binary knows, when it receives an interlaced signal. It says so in the core in the video info that the signal is interlaced. There could potentially be an option added in the MiSTer.ini to disable filters upon detection of an interlaced signal, sure. But someone would have to want to implement it, and sorgelig would have to agree to it, so time will tell I guess. It's not really a bad idea though.
birdybro~
AtomicShroom
Posts: 170
Joined: Sun Mar 07, 2021 12:28 pm
Has thanked: 31 times
Been thanked: 48 times

Re: Possible to have MiSTer turn off scanlines when interlaced modes are used?

Unread post by AtomicShroom »

aberu wrote: Tue May 10, 2022 2:21 am I think most people are misunderstanding you. The scaler knows, and the Main MiSTer binary knows, when it receives an interlaced signal. It says so in the core in the video info that the signal is interlaced. There could potentially be an option added in the MiSTer.ini to disable filters upon detection of an interlaced signal, sure. But someone would have to want to implement it, and sorgelig would have to agree to it, so time will tell I guess. It's not really a bad idea though.
Thanks! And regarding the bolded, ideally it should only disable scanlines, so keep the Horiz filter to keep interpolation on, but disable the Vert filter to turn scanlines off. Though I assume people with rotated screens might want the opposite to be possible?
FoxbatStargazer
Top Contributor
Posts: 994
Joined: Thu Dec 10, 2020 5:44 pm
Has thanked: 309 times
Been thanked: 228 times

Re: Possible to have MiSTer turn off scanlines when interlaced modes are used?

Unread post by FoxbatStargazer »

Personally I can't imagine when I would *ever* want to outright disable filtering though! The "internal filter" is pretty nasty, worse than the "no interpolation" option even if you really want no interpolation...

Another simple choice would be to have the vert filter revert to the horizontal one, which when creating scanlines with vert, the horz is likely some flavor of interpolation. So if you like your display sharp it would stay fairly sharp, or blurry if you prefer that too.
AtomicShroom
Posts: 170
Joined: Sun Mar 07, 2021 12:28 pm
Has thanked: 31 times
Been thanked: 48 times

Re: Possible to have MiSTer turn off scanlines when interlaced modes are used?

Unread post by AtomicShroom »

FoxbatStargazer wrote: Tue May 10, 2022 2:52 pm Personally I can't imagine when I would *ever* want to outright disable filtering though! The "internal filter" is pretty nasty, worse than the "no interpolation" option even if you really want no interpolation...

Another simple choice would be to have the vert filter revert to the horizontal one, which when creating scanlines with vert, the horz is likely some flavor of interpolation. So if you like your display sharp it would stay fairly sharp, or blurry if you prefer that too.
Yeah like I said I’d only want the scanlines to be disabled in that case, not the interpolation. I figure since it’s now separated between Horiz and Vert, simply turning off Vert would do.

Or perhaps better yet: Have the option to pick a set of filters for progressive resolutions, and another set of filters for interlaced resolutions. That way everyone can pick something that fits their preferences.
akeley
Top Contributor
Posts: 1303
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 416 times
Been thanked: 399 times

Re: Possible to have MiSTer turn off scanlines when interlaced modes are used?

Unread post by akeley »

AtomicShroom wrote: Mon May 09, 2022 11:13 pm Toying around with the PSX core, I noticed that the selected scanline filter sticks around even when games are outputting 480i, which makes no sense since interlaced modes, by definition, don't have visible scanlines.
The "visible" is the key word here. 480i relies on crude-tricking your brain into thinking that the image is uniform (at cost of flickering) even if the intrinsic shadowmask or aperture is still there.

A photo of a Trinitron + a 480i source taken with a slow shutter will show strong vertical lines from aperture grille. With a faster shutter it will be more of a normal 240p with some scanlines. But your eye viewing this on a CRT will see a quasi-uniform, scanline and aperture-free image, unless you stick your nose close to the screen and concentrate.
User avatar
aberu
Core Developer
Posts: 1144
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 244 times
Been thanked: 388 times
Contact:

Re: Possible to have MiSTer turn off scanlines when interlaced modes are used?

Unread post by aberu »

AtomicShroom wrote: Tue May 10, 2022 12:54 pm
aberu wrote: Tue May 10, 2022 2:21 am I think most people are misunderstanding you. The scaler knows, and the Main MiSTer binary knows, when it receives an interlaced signal. It says so in the core in the video info that the signal is interlaced. There could potentially be an option added in the MiSTer.ini to disable filters upon detection of an interlaced signal, sure. But someone would have to want to implement it, and sorgelig would have to agree to it, so time will tell I guess. It's not really a bad idea though.
Thanks! And regarding the bolded, ideally it should only disable scanlines, so keep the Horiz filter to keep interpolation on, but disable the Vert filter to turn scanlines off. Though I assume people with rotated screens might want the opposite to be possible?
Yes this would be better. It could be tied to the rotation of the screen somehow, but that would be harder as rotation is handled in the core.
birdybro~
Post Reply