Scaler

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, Greenious, spiny, Sorgelig, Moderator Team

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5240
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scaler

Postby Sorgelig » Thu Dec 06, 2018 5:44 pm

It would be good if you would mention the game name so others could check it.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5240
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scaler

Postby Sorgelig » Thu Dec 06, 2018 5:50 pm

I've just re-checked the 240p suite on Genesis and didn't find mentioned issue.
What i think is that your TV cuts upper and bottom parts of visible area. It's possible the bezel of TV covers the edges of visible area.
So, it's just issue of your TV.
It's possible that OSSC has black borders on top and bottom, so picture doesn't cover full resolution. OSSC cannot do arbitrary scaling, so in most cases it adds either horizontal or vertical borders.

20181207_015146.jpg
You do not have the required permissions to view the files attached to this post.

Gamepimp
Atariator
Atariator
Posts: 29
Joined: Fri Nov 09, 2018 2:59 pm

Re: Scaler

Postby Gamepimp » Thu Dec 06, 2018 7:09 pm

The game is Monster Boy IV. I will load the 240p test suite this afternoon and see if it shows the patterned image being cut off. Assuming my TV is cropping what is being displayed, is there any way to reduce the size of the image created by MiSTer to get it to fit on the visible portion of the TV?

By the way, thank you for taking the time to research this issue and provide insight. Your work on MiSTer is phenomenal. The DE-10 nano is an amazing device that actually looks better to me than my original consoles running RGB through SCART. I am hopeful that I can resolve this issue because it would essentially make this a better solution for playing games right now than the consoles. :D

beermonkey
Atarian
Atarian
Posts: 4
Joined: Thu Dec 06, 2018 7:02 pm

Re: Scaler

Postby beermonkey » Thu Dec 06, 2018 7:20 pm

Gamepimp wrote:I have a weird issue. The top (and possibly the bottom) of the screen when running the Genesis core appears to be cut off. I'm using 50% scanlines through the custom filters, although I had the same result when i used the old CRT filter at 50%. I've attached a screenshot of MiSTer (top) and of my Genesis console running through OSSC (bottom) to illustrate the missing pixels. Is there a way to configure the scaler to get the entire image to display? This is a 4K LCD TV. I've adjusted the MiSTer resolution as 720p and 1080p in the config file and the result is the same. I'm not sure if that setting is strictly for the menus or if it affects the cores themselves. Any help on this would be greatly appreciated. I suspect that I'm having issues with other Genesis games and possibly other cores as well although I haven't had a chance to do additional testing. MiSTer.jpgOSSC.jpg



Gamepimp wrote:The game is Monster Boy IV. I will load the 240p test suite this afternoon and see if it shows the image being cut off. Assuming my TV is cropping the image, is there any way to reduce the size of the image created by MiSTer to get it to fit on the visible portion of the TV?


Sorgelig wrote:I've just re-checked the 240p suite on Genesis and didn't find mentioned issue.
What i think is that your TV cuts upper and bottom parts of visible area. It's possible the bezel of TV covers the edges of visible area.
So, it's just issue of your TV.
It's possible that OSSC has black borders on top and bottom, so picture doesn't cover full resolution. OSSC cannot do arbitrary scaling, so in most cases it adds either horizontal or vertical borders.


The Super NT had the same issue on my TV and others when it shipped. TVs aren't PC monitors and will often make their own decisions about scaling (and the resultant softening) images based on EDID content information.

The issue was addressed with a firmware update.

Added limited RGB mode checkbox. This is under the "scalers" menu. Also now outputting "underscan" flags, and "IT content" flags which should force some monitors/TVs to disable overscan, and any filtering/processing (IT mode).


OSSC also added an option to force "IT Content" in firmware 0.77. I am unsure how this currently defaults.

CEA 861 has quite a bit on controlling such behavior.

FWIW some TVs will actually engage 1:1 (dot by dot) display by renaming the input to 'PC'. But only some.

ghogan42
Atari maniac
Atari maniac
Posts: 92
Joined: Wed Oct 17, 2018 7:27 pm

Re: Scaler

Postby ghogan42 » Thu Dec 06, 2018 7:28 pm

This is maybe a dumb question. But hdmi_config.sv is where the content flag is set to PC mode (underscan) right? And that's still used with the new scaler?

I ask because in a changelog for Super NT kevtris referred to having to set both IT flags and underscan flags to get some TV's to disable overscan. If there are two different underscan flags can we set them both? Maybe something about the video stream now is causing some TV to detect it as a video source and not a PC source.

@gamepimp It's not the correct solution, but if you set "vscale_integer = 1" in mister.ini it may shrink the screen enough for you.

User avatar
alexh
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2756
Joined: Wed Oct 20, 2004 1:52 pm
Location: UK - Oxford
Contact:

Re: Scaler

Postby alexh » Thu Dec 06, 2018 7:29 pm

Sorgelig wrote:What i think is that your TV cuts upper and bottom parts of visible area.

Panasonic TV's for example have an option they call "Overscan" and on my TV it was on by default when it shipped.

jim150
Atarian
Atarian
Posts: 7
Joined: Sun Sep 30, 2018 5:20 am
Location: Catalonia

Re: Scaler

Postby jim150 » Thu Dec 06, 2018 7:45 pm

My Sony KD-43XE8096 seems no be not compatible with this new opensource scaler.
When I start a core I get a grey grabled stripe on the top of the screen. If a boot.rom is present, the sound and controls plays ok but I got no image, just this stripe. Then I can blindly navigate through the OSD menu and load an older core.

With the same setup, if I hook up the MiSTer to an ASUS VG248QE all cores work perfectly.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5240
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scaler

Postby Sorgelig » Thu Dec 06, 2018 7:47 pm

This discussion is not related to scaler. So stop to post it here!
There will be an option to set the border in next MiSTer release.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5240
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scaler

Postby Sorgelig » Thu Dec 06, 2018 7:50 pm

jim150 wrote:My Sony KD-43XE8096 seems no be not compatible with this new opensource scaler.
When I start a core I get a grey grabled stripe on the top of the screen. If a boot.rom is present, the sound and controls plays ok but I got no image, just this stripe. Then I can blindly navigate through the OSD menu and load an older core.

With the same setup, if I hook up the MiSTer to an ASUS VG248QE all cores work perfectly.

I think i found the source of problem. New scaler uses exclusive values while it should use inclusive. So image width for example 1919 instead of 1920.
I will need to double confirm it. If it will be confirmed, then it's not hard to fix.

Gamepimp
Atariator
Atariator
Posts: 29
Joined: Fri Nov 09, 2018 2:59 pm

Re: Scaler

Postby Gamepimp » Thu Dec 06, 2018 8:30 pm

Sorgelig wrote:There will be an option to set the border in next MiSTer release.
I will try some of the suggestions posted above to see if I can address the issue in the current state. However, if that doesn't work, being able to set the border for the image would be awesome. This could very well be an issue with my TV and changing that would not really be an option unfortunately.

Grabulosaure
Atari maniac
Atari maniac
Posts: 91
Joined: Tue Sep 05, 2017 9:35 pm
Contact:

Re: Scaler

Postby Grabulosaure » Thu Dec 06, 2018 8:58 pm

I've re-tested in the test bench, the image size is as advertised. For 1920x1080:
HDISP=1920
VDISP=1080
HMIN=0
HMAX=1919
VMIN=0
VMAX=1079

There are a few timing violations in the scaler. Maybe that's the problem. I'm rewriting the "phase accumulator" part (more and more pipelining...).

For interleaved video glitches in Genesis/Megadrive, it is an issue with triple-buffering (updating an half-frame from the wrong buffer)
I've rewritten that part (to synchronize input resolution changes with buffer changes).

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5240
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scaler

Postby Sorgelig » Thu Dec 06, 2018 9:10 pm

Yeah, i've checked with external counters - resolution matches the one from VIP.
Actually i have no issues with this scaler.
Hope more pipelining will help.
So, i'm holding the releases til new version of scaler then.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5240
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scaler

Postby Sorgelig » Thu Dec 06, 2018 9:39 pm

Grabulosaure wrote:There are a few timing violations in the scaler. Maybe that's the problem. I'm rewriting the "phase accumulator" part (more and more pipelining...).

VIP scaler comes with SDC files. So, may be you can add SDC file to relax some tight places in scaler and help it compile more correctly?

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5240
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scaler

Postby Sorgelig » Thu Dec 06, 2018 9:55 pm

I don't know if that connected, but if TVs of some users go to "no sync" mode then it's not timing violations in accumulator. The basic sync should work even there is no actual picture. OSD on HDMI should work as long as HDMI timings are correct.
So, i'm still confusing why some TVs don't recognize the sync.

Grabulosaure
Atari maniac
Atari maniac
Posts: 91
Joined: Tue Sep 05, 2017 9:35 pm
Contact:

Re: Scaler

Postby Grabulosaure » Thu Dec 06, 2018 10:11 pm

Sorgelig wrote:I don't know if that connected, but if TVs of some users go to "no sync" mode then it's not timing violations in accumulator. The basic sync should work even there is no actual picture. OSD on HDMI should work as long as HDMI timings are correct.
So, i'm still confusing why some TVs don't recognize the sync.


You are right.

In ASCAL, output synchro. generation is done in the "OSWEEP" process, which is quite straightforward. I could add resets to counters, but I considered it not indispensable as counter would eventually overflow to correct values. The vcpt_pre/3/2 counters are are used for pre-loading two lines before start of display, for top border.

Maybe there are off-by-one differences with VIP on synchro positions.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5240
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scaler

Postby Sorgelig » Thu Dec 06, 2018 10:14 pm

i've measured times from beginning of DE til the end of DE, til HSync start, til HSync end and the HTotal in pixel clocks. They are matching the ones from VIP.
I didn't measure vertical timings in lines yet.

Although, it's possible that VSync position in Ascal is different against HSync than in VIP - not sure if this can be an issue.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5240
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scaler

Postby Sorgelig » Thu Dec 06, 2018 10:22 pm

Grabulosaure,
I have some private internal info about VIP which i can share with you if you want. May be it will help you to tune your scaler.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5240
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scaler

Postby Sorgelig » Thu Dec 06, 2018 10:30 pm

this how VSync is formed in VIP:

Code: Select all

assign vid_v_sync_p =  enable_synced_nxt && ( (v_count == f2_v_sync_start && h_count >= h_sync_start) ||
                     (v_count > f2_v_sync_start && v_count < f2_v_sync_end) ||
                     (v_count == f2_v_sync_end && h_count < h_sync_start));


so, it starts from HSync's start and ends on HSync's start as well.

faxesystem
Atarian
Atarian
Posts: 3
Joined: Sun Nov 04, 2018 4:52 pm

Re: Scaler

Postby faxesystem » Thu Dec 06, 2018 10:50 pm

I already posted an issue in the SNES Core GitHub regarding the display problems with the new scaler. No problems in my FullHD Philips TV but display problems on my 4k Philips TV.

When I start up MISTer and one of the cores with the new scalers I get the "split" screen. When I than do a cold restart and start one of the cores I just get a glitchy screen.

http://imgur.com/gallery/v1XbSxs

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5240
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scaler

Postby Sorgelig » Thu Dec 06, 2018 10:58 pm

Genesis.zip

Those who have problem with last Genesis release, please try this one.

I've made VSync the same way as in VIP. May be it will fix the problem.
You do not have the required permissions to view the files attached to this post.

faxesystem
Atarian
Atarian
Posts: 3
Joined: Sun Nov 04, 2018 4:52 pm

Re: Scaler

Postby faxesystem » Thu Dec 06, 2018 11:16 pm

Sorgelig wrote:Genesis.zip
Those who have problem with last Genesis release, please try this one.

I've made VSync the same way as in VIP. May be it will fix the problem.


Just tried the core and the problem is gone now on my 4k TV. :D Thank you for this fast fix. just awesome work!

Grabulosaure
Atari maniac
Atari maniac
Posts: 91
Joined: Tue Sep 05, 2017 9:35 pm
Contact:

Re: Scaler

Postby Grabulosaure » Thu Dec 06, 2018 11:16 pm

Sorgelig wrote:this how VSync is formed in VIP:

Code: Select all

assign vid_v_sync_p =  enable_synced_nxt && ( (v_count == f2_v_sync_start && h_count >= h_sync_start) ||
                     (v_count > f2_v_sync_start && v_count < f2_v_sync_end) ||
                     (v_count == f2_v_sync_end && h_count < h_sync_start));


so, it starts from HSync's start and ends on HSync's start as well.


Yes, it looks nicer when VS is aligned with HS.

For ASCAL, it can be written as :

Code: Select all

o_vs0<=to_std_logic((o_vcpt=o_vsstart AND o_hcpt>=o_hsstart) OR
                    (o_vcpt>o_vsstart AND o_vcpt<o_vsend) OR
                    (o_vcpt=o_vsend   AND o_hcpt<o_hsstart));

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5240
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scaler

Postby Sorgelig » Thu Dec 06, 2018 11:27 pm

Grabulosaure wrote:For ASCAL, it can be written as :

yeah, that's how i've wrote it :)

faxesystem wrote:Just tried the core and the problem is gone now on my 4k TV. :D Thank you for this fast fix. just awesome work!

good!
So wait for more reports from affected users to confirm.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5240
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scaler

Postby Sorgelig » Fri Dec 07, 2018 12:10 am

Grabulosaure wrote:For interleaved video glitches in Genesis/Megadrive, it is an issue with triple-buffering (updating an half-frame from the wrong buffer)
I've rewritten that part (to synchronize input resolution changes with buffer changes).

can you release this patch?
That would be good for new release with fixed VSync.

kikusui
Retro freak
Retro freak
Posts: 10
Joined: Sat Oct 13, 2018 8:45 pm

Re: Scaler

Postby kikusui » Fri Dec 07, 2018 12:20 am

Hi Folks,
I'm another who had issues with the Megadrive core yesterday, & Snes & Nes cores today using the new scaler. No picture on HDMI using 1080p.

I can confirm that the new Megadrive zip file posted about fixes the problem for me :D Thank you so much Sorgelig and Grabulosaure.


Return to “MiSTer”

Who is online

Users browsing this forum: No registered users and 4 guests