Scanlines while scrolling

Discussion about displays and related hardware including MiSTer filters and video settings.
User avatar
clarkkent
Posts: 106
Joined: Sun Nov 21, 2021 1:59 pm
Has thanked: 1 time
Been thanked: 15 times

Scanlines while scrolling

Unread post by clarkkent »

I wonder why scanlines keep disappearing while scrolling. Shouldn’t scanlines be static? I can’t believe that it’s my monitor because with MAME I don’t have this weired behavior

That’s why I would prefer something like the MAME bgfx crt-geom or at least something similar with which every pixel could be converted into a specific shape (like round dots and not square). Not only a mask over the picture without any correlation to the resolution.
User avatar
Chris23235
Top Contributor
Posts: 867
Joined: Sun May 24, 2020 8:45 pm
Has thanked: 114 times
Been thanked: 180 times

Re: Scanlines while scrolling

Unread post by Chris23235 »

Which video filter settings do you use and at which resolution? I never experienced disappearing scanlines.
Hellz
Posts: 16
Joined: Fri Sep 04, 2020 2:35 pm
Been thanked: 8 times

Re: Scanlines while scrolling

Unread post by Hellz »

Scanlines dissapearing while scrolling has to do with the way your screen processes the image. If you turn on black frame insertion on a tv/monitor capable of this you'll see it gets less. Ive yet to find a good solution on the mister to keep the lines on screen while scrolling.
User avatar
Kitrinx
Core Developer
Posts: 185
Joined: Sat May 23, 2020 2:14 am
Location: NYC
Has thanked: 1 time
Been thanked: 147 times
Contact:

Re: Scanlines while scrolling

Unread post by Kitrinx »

Hellz wrote: Fri Feb 25, 2022 1:10 pm Scanlines dissapearing while scrolling has to do with the way your screen processes the image. If you turn on black frame insertion on a tv/monitor capable of this you'll see it gets less. Ive yet to find a good solution on the mister to keep the lines on screen while scrolling.
More technically it has to do with how your brain and eyes process the image when it is drawn all at once like that. The scanlines are there, but your eyes just blur it together in your brain.
User avatar
clarkkent
Posts: 106
Joined: Sun Nov 21, 2021 1:59 pm
Has thanked: 1 time
Been thanked: 15 times

Re: Scanlines while scrolling

Unread post by clarkkent »

I never ever had this problem with the effect filters in MAME.

And I always see the scanlines on my CRT - also while scrolling.
User avatar
neogeo81
Posts: 374
Joined: Fri Apr 16, 2021 1:52 pm
Has thanked: 32 times
Been thanked: 45 times

Re: Scanlines while scrolling

Unread post by neogeo81 »

clarkkent wrote: Fri Feb 25, 2022 1:48 pm I never ever had this problem with the effect filters in MAME.

And I always see the scanlines on my CRT - also while scrolling.
why should the scanlines disapear no a CRT? it's a fix part how a CRT works. :roll:
Lightwave
Posts: 232
Joined: Sun May 24, 2020 10:06 pm
Has thanked: 113 times
Been thanked: 68 times

Re: Scanlines while scrolling

Unread post by Lightwave »

neogeo81 wrote: Fri Feb 25, 2022 3:02 pm
clarkkent wrote: Fri Feb 25, 2022 1:48 pm I never ever had this problem with the effect filters in MAME.

And I always see the scanlines on my CRT - also while scrolling.
why should the scanlines disapear no a CRT? it's a fix part how a CRT works. :roll:
I think this is a response to the suggestion that it’s our eyes playing tricks on us that causes the scanlines to disappear, rather than the display technology.

Also of note for this discussion, we are talking about vertical scrolling. With purely horizontal scrolling you should not have this issue of course.
AtomicShroom
Posts: 170
Joined: Sun Mar 07, 2021 12:28 pm
Has thanked: 31 times
Been thanked: 48 times

Re: Scanlines while scrolling

Unread post by AtomicShroom »

What's interesting is that he mentions this doesn't happen with MAME, so this brings about the following questions:

1. Is he using the same scanline thickness/intensity in both MAME and MiSTer?
2. Is he using the same screen resolution? For example if he's using a non-native resolution of the display for MiSTer, the monitor's upscaler might be doing something funky that blends the scanlines?
3. Could MiSTer's interpolation filters cause this? Like what if the scanlines are applied first, but then smoothed out when scrolling up/down by whatever interpolation filter is selected?
Flandango
Core Developer
Posts: 404
Joined: Wed May 26, 2021 9:35 pm
Has thanked: 42 times
Been thanked: 343 times

Re: Scanlines while scrolling

Unread post by Flandango »

In what core and game/rom do you experience this issue and what scanline settings are you using?
From my limited experience with cores such as SNES and Arcade games like 1943 using adaptive scanlines on a 55" 4k TV set at 1080p in Mister.ini I don't see any of these disappearing scanlines.
As a side note, on my TV I do have it in "game" mode otherwise it may be smoothing out the picture possibly causing those lines to disappear (and adds lag).
User avatar
Sigismond0
Posts: 339
Joined: Mon May 25, 2020 2:21 am
Has thanked: 1 time
Been thanked: 66 times

Re: Scanlines while scrolling

Unread post by Sigismond0 »

Yeah, definitely sounds like an issue with how the display is handling MiSTer's output. I've never seen this "disappearing scanline" phenomenon and have been using MiSTer for years. Given how many other users there are with many using scanlines, if this was an actual defect we'd have a lot more complaints.
Insert Disk Two
Posts: 192
Joined: Sun May 24, 2020 7:59 pm
Has thanked: 10 times
Been thanked: 24 times

Re: Scanlines while scrolling

Unread post by Insert Disk Two »

It varies form monitor to monitor. If you monitor has a slight blur on fast images the scanlines will obviously disappear.
akeley
Top Contributor
Posts: 1315
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 428 times
Been thanked: 415 times

Re: Scanlines while scrolling

Unread post by akeley »

AtomicShroom wrote: Fri Feb 25, 2022 4:09 pm What's interesting is that he mentions this doesn't happen with MAME, so this brings about the following questions:

1. Is he using the same scanline thickness/intensity in both MAME and MiSTer?
2. Is he using the same screen resolution? For example if he's using a non-native resolution of the display for MiSTer, the monitor's upscaler might be doing something funky that blends the scanlines?
3. Could MiSTer's interpolation filters cause this? Like what if the scanlines are applied first, but then smoothed out when scrolling up/down by whatever interpolation filter is selected?
This might well be the problem seeing as there are so many option permutations available for MiSTer atm. I'm a consumer CRT TV user but recently have tried the new shadowmasks/scanlines on my VGA monitor, and gave up very quickly since the results were rather messy.

Is there a write up and/or example somewhere, explaining how to get a basic shadowmasks/scanlines combo going? This could also be used as a reference point, because otherwise such discussion is a little bit pointless.
User avatar
Sigismond0
Posts: 339
Joined: Mon May 25, 2020 2:21 am
Has thanked: 1 time
Been thanked: 66 times

Re: Scanlines while scrolling

Unread post by Sigismond0 »

akeley wrote: Fri Feb 25, 2022 5:14 pm Is there a write up and/or example somewhere, explaining how to get a basic shadowmasks/scanlines combo going? This could also be used as a reference point, because otherwise such discussion is a little bit pointless.
Just load a preset from the video processing menu if you just want to get your feet wet. The PVM preset is a great starting point, and a nice way to ensure that people are comparing apples to apples.
akeley
Top Contributor
Posts: 1315
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 428 times
Been thanked: 415 times

Re: Scanlines while scrolling

Unread post by akeley »

Sigismond0 wrote: Fri Feb 25, 2022 5:52 pm Just load a preset from the video processing menu if you just want to get your feet wet. The PVM preset is a great starting point, and a nice way to ensure that people are comparing apples to apples.
Ok, I might try it tomorrow. Are you sure this is all that's needed though, ie nothing else to change in .ini or OSD? (assuming that I connect with a default mister.ini to a 1440p monitor via HDMI)
User avatar
Chris23235
Top Contributor
Posts: 867
Joined: Sun May 24, 2020 8:45 pm
Has thanked: 114 times
Been thanked: 180 times

Re: Scanlines while scrolling

Unread post by Chris23235 »

akeley wrote: Fri Feb 25, 2022 6:12 pm
Sigismond0 wrote: Fri Feb 25, 2022 5:52 pm Just load a preset from the video processing menu if you just want to get your feet wet. The PVM preset is a great starting point, and a nice way to ensure that people are comparing apples to apples.
Ok, I might try it tomorrow. Are you sure this is all that's needed though, ie nothing else to change in .ini or OSD? (assuming that I connect with a default mister.ini to a 1440p monitor via HDMI)
Which resolution do you use. Best to use a 1440p 4:3 resolution as the higher the resolution the better the scanlines and shadow masks will look. This applies even more to the adaptive scanlines added lately. And be sure to use integer scaling. The 10bit coefficient filters added earlier this week should help with non-integer scaling and scanlines but it has to be implemented on each core individually.
akeley
Top Contributor
Posts: 1315
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 428 times
Been thanked: 415 times

Re: Scanlines while scrolling

Unread post by akeley »

Chris23235 wrote: Fri Feb 25, 2022 6:19 pm Which resolution do you use. Best to use a 1440p 4:3 resolution as the higher the resolution the better the scanlines and shadow masks will look.
Resolution? I thought MiSTer just syncs to the display's native one. On my PC that's 2560x1440.
And be sure to use integer scaling. The 10bit coefficient filters added earlier this week should help with non-integer scaling and scanlines but it has to be implemented on each core individually.
Black magic ;) Let's pretend I've only just got MiSter and am completely green (which is somewhat true for HDMI, I think I've only had it connected once like that in 1.5 years I have this box, and that was only for 5 minutes to check something).

I can go and load a preset, but if there's anything else that needs to be changed - even something really trivial - I'd need to be told. Imagine you're writing a wiki step-by-step guide...
User avatar
Sigismond0
Posts: 339
Joined: Mon May 25, 2020 2:21 am
Has thanked: 1 time
Been thanked: 66 times

Re: Scanlines while scrolling

Unread post by Sigismond0 »

akeley wrote: Fri Feb 25, 2022 6:36 pm Resolution? I thought MiSTer just syncs to the display's native one. On my PC that's .
MiSTer uses whatever resolution you set in your mister.ini file. If you've never touched that, it's probably defaulting to 720p.
User avatar
Chris23235
Top Contributor
Posts: 867
Joined: Sun May 24, 2020 8:45 pm
Has thanked: 114 times
Been thanked: 180 times

Re: Scanlines while scrolling

Unread post by Chris23235 »

The resolution for the MiSTer is set in the MiSTer.ini file. The MiSTer isn't able to display 2560*1440 because the pixel clock is beyond the range MiSTer can output, so you have to use 1920*1440 instead which is supported as one of the predefined resolutions in the MiSTer.ini file. You probably have to tell your display to switch to 4:3 to get the correct aspect ratio.

If you have an unmodified MiSTer.ini file your MiSTer will output 1280*720@60Hz which is not bad as it is exactly 50% of the resolution of your display in both directions so on your Monitor every pixel is simply doubled horizontally and vertically.

To change the resolution your MiSTer displays the screen change:

Code: Select all

video_mode=0
to

Code: Select all

video_mode=12
Note that this is a 60Hz output but as your MiSTer runs on 60Hz and you seem to be fine with it (NTSC user I presume) this should be fine.

Integer scaling: This means the scaling of the simulated system's resolution to the MiSTer resolution. Most 8 and 16 Bit systems output something like 320*240 this has to be scaled to the output resolution and it looks best if the output is something like 2 or 3 or 4 (integer) times of the original in opposition to something like 1.25, 2.7 or 3.4 (non integer) of the original resolution because with integer scaling the single pixel displayed on the original system always occupies the same ammount of pixels on your screen instead varying which would leads e.g. to uneven letters in text and swimming pixels in scrolling images. As the scanlines are added to the picture before scaling non-integer scaling means uneven scanlines.
As in some resolutions scaling leads to a smaller picture it is helpful to use resolutions that scale well integerwise for the system in order to get a fullscreen picutre. You can set the scaling in every core in the video settings. Try the different options to see what works best for you and the resolution the core runs in. Note that you can also set the resolution for every core in the ini if you want.

One last thing, if you never edited your MiSTer.ini you are running your MiSTer with the option

Code: Select all

vsync_adjust=0
The MiSTer has a single buffer low lag mode which is worth a try to see if your display can handle it. To activate it change it to:

Code: Select all

vsync_adjust=2
But it is possible that you Monitor will not sync it. In this case change it back to "0"
akeley
Top Contributor
Posts: 1315
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 428 times
Been thanked: 415 times

Re: Scanlines while scrolling

Unread post by akeley »

Thanks. I have edited the .ini countless times and have a few different ones, but this was all for CRTs. Here, I was thinking of just getting the default mister.ini and then connecting MiSTer to my current HDMI monitor (1440p), to see how it looks. But, tbh, I did not realize it's that complicated - after hearing I'd need to mess with different resolutions and integers, I'll pass. Been there before, it's a job for many hours of tweaking and I don't really need to use the scanlines and masks at this point in time, was just a little curious.

I'd maybe give it a quick go if you could give me a ready-made example for just one core, eg SNES or some such, ie what resolution/integer should I use for my particular scenario.

Going back to the topic at hand, seeing as different resolutions & integers are involved and thus there's even more variables which can be breaking things, OP'd definitely need to post their settings to establish a common ground first for this discussion to make sense.
User avatar
Chris23235
Top Contributor
Posts: 867
Joined: Sun May 24, 2020 8:45 pm
Has thanked: 114 times
Been thanked: 180 times

Re: Scanlines while scrolling

Unread post by Chris23235 »

Use video_mode=12 and load the preset for SNES. Switch the different integer settings to see what you find works best.
User avatar
clarkkent
Posts: 106
Joined: Sun Nov 21, 2021 1:59 pm
Has thanked: 1 time
Been thanked: 15 times

Re: Scanlines while scrolling

Unread post by clarkkent »

The original topic was the disappearing scanlines while scrolling. And yes, they only disappeare when scrolling vertically.

It could really be the interpolation filters. But without the filters the picture does not look that nice. I wonder if the filters could be programmed that way that they do not interfere with the scanlines.
User avatar
Chris23235
Top Contributor
Posts: 867
Joined: Sun May 24, 2020 8:45 pm
Has thanked: 114 times
Been thanked: 180 times

Re: Scanlines while scrolling

Unread post by Chris23235 »

clarkkent wrote: Fri Feb 25, 2022 9:33 pm The original topic was the disappearing scanlines while scrolling. And yes, they only disappeare when scrolling vertically.

It could really be the interpolation filters. But without the filters the picture does not look that nice. I wonder if the filters could be programmed that way that they do not interfere with the scanlines.
Can you tell us which filter settings you use and which resolution?
User avatar
Sigismond0
Posts: 339
Joined: Mon May 25, 2020 2:21 am
Has thanked: 1 time
Been thanked: 66 times

Re: Scanlines while scrolling

Unread post by Sigismond0 »

Chris23235 wrote: Fri Feb 25, 2022 8:11 pm Use video_mode=12 and load the preset for SNES. Switch the different integer settings to see what you find works best.
And if this doesn't work (TV displays nothing) just set video_mode-8 for 1080p for the highest standard resolution supported by MiSTer. That's what I have to use on my 4K display, and scanlines look great.

It's two quick tests, and even if you don't end up using scanlines you'll have much better looking output overall.
User avatar
clarkkent
Posts: 106
Joined: Sun Nov 21, 2021 1:59 pm
Has thanked: 1 time
Been thanked: 15 times

Re: Scanlines while scrolling

Unread post by clarkkent »

Native resolution of the monitor. Regular scan line files, no other filters or masks.
User avatar
Chris23235
Top Contributor
Posts: 867
Joined: Sun May 24, 2020 8:45 pm
Has thanked: 114 times
Been thanked: 180 times

Re: Scanlines while scrolling

Unread post by Chris23235 »

clarkkent wrote: Fri Feb 25, 2022 10:28 pm Native resolution of the monitor. Regular scan line files, no other filters or masks.
Try to use the scanline filters they work much better then the regular scanlines.
FoxbatStargazer
Top Contributor
Posts: 995
Joined: Thu Dec 10, 2020 5:44 pm
Has thanked: 309 times
Been thanked: 228 times

Re: Scanlines while scrolling

Unread post by FoxbatStargazer »

The default scanline filters are not going to be black lines, they are just slightly dimmed lines. So if you have white text slowly scrolling up on a black background, the scanline differential is probably percieved as smaller than the difference of white vs black. To mitigate this you might try playing with something more extreme like 125% brightness scanlines with a low scanline value (50 or below.) Another option would be to instead try the scandoubler at 25%. Never going to match a CRT but these settings might help some.
User avatar
aberu
Core Developer
Posts: 1161
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 244 times
Been thanked: 404 times
Contact:

Re: Scanlines while scrolling

Unread post by aberu »

LG G1 55" 4k OLED, running 1080p with the Genesis core, preset "Scanlines" loaded, 240p test suite, vertical scrolling test. Video is captured on my pixel 3XL at 1/8th speed.

https://youtu.be/sLEBzXnyon8

It's an illusion just like @Kitrinx said. You can change the way your tv handles it, but you can't change how your eyes and brain work.
birdybro~
User avatar
SuperBabyHix
Posts: 152
Joined: Sun May 24, 2020 8:26 pm
Has thanked: 44 times
Been thanked: 34 times

Re: Scanlines while scrolling

Unread post by SuperBabyHix »

Thanks Aberu for taking the time to record that. I was wondering if it was a function of the screen or of my eyes.

I personally always saw the black lines disappear even on CRT's. To my eyes it didn't so much look like they completely disappeared, but more that it took on the appearance of 480i content. I even remember the first time I noticed it when using a crt filter on an emulator thinking, oh it looks just like vertical scrolling on a real CRT.
User avatar
Wave
Posts: 130
Joined: Tue Jan 04, 2022 6:57 pm
Has thanked: 89 times
Been thanked: 40 times

Re: Scanlines while scrolling

Unread post by Wave »

SuperBabyHix wrote: Sat Feb 26, 2022 4:07 am I personally always saw the black lines disappear even on CRT's. To my eyes it didn't so much look like they completely disappeared, but more that it took on the appearance of 480i content. I even remember the first time I noticed it when using a crt filter on an emulator thinking, oh it looks just like vertical scrolling on a real CRT.
Yes, this is a perfect description of how 240p, vertically scrolling MiSTer content looks to me on my consumer CRT. And it's been long enough since I've played my real 240p hardware on it that I wasn't sure if the 480i-lookin', scanlines-going-swimmy, pixels-gettin'-unpleasantly-chunkier effect on vertical moving sprites/backgrounds was correct, or an artifact of MiSTer.

If 240p on CRTs has always been like this, it surprises me that I never really noticed until now! (And will just have to get used to it. ;)
she/her
User avatar
SuperBabyHix
Posts: 152
Joined: Sun May 24, 2020 8:26 pm
Has thanked: 44 times
Been thanked: 34 times

Re: Scanlines while scrolling

Unread post by SuperBabyHix »

I myself never actually used my Mister on a CRT, though I did use the original Mist with one for a long time. I also had a dedicated Genesis arcade cab setup for a long time and noticed the effect with real hardware on both consumer CRTs and PVM that I put in there at one point.

It was interesting to play some of the vertical shooters on Genesis that had static side bars. The side bars maintained the scanline look while the scrolling play fields looked interlaced.
Post Reply