Testing: Support for more HDMI resolutions and other changes.

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

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

Sorgelig
Atari God
Atari God
Posts: 1947
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Testing: Support for more HDMI resolutions and other changes.

Postby Sorgelig » Thu Dec 14, 2017 6:14 pm

I've just added more HDMI resolutions to ZX and BK0011M cores:
1280x720@60
1024x768@60
720x480@60
720x576@50
1280x1024@60
800x600@60
640x480@60
1280x720@50
Also DVI mode has been added for those monitors which don't like HDMI protocol. Note: audio is not supported in DVI mode. So either use digital optical audio or analog if DVI mode is used.

I need feedback about new additions before i will port new features to other cores.

Actually, adding different HDMI resolutions is not so trivial as it requires different pixel clocks. FPGA doesn't like variable clocks, especially Cyclone V with its crappy clock networks requiring a lot of workarounds on fitting stage. Somehow it works.

There is updated MiSTer.ini sample: https://github.com/MiSTer-devel/Main_Mi ... MiSTer.ini
There you will find short descriptions for each parameter.

Don't forget to update MiSTer binary.

NML32
Captain Atari
Captain Atari
Posts: 464
Joined: Tue Mar 11, 2014 1:54 am
Location: USA/Florida

Re: Testing: Support for more HDMI resolutions and other changes.

Postby NML32 » Thu Dec 14, 2017 7:04 pm

I'm not having any luck getting my HDMI resolution to change on my TV. I don't think I missed any steps.
I replaced Mister, tried both ZX Spectrum and BK0011M cores (latest build), and replaced Mister.ini in the config folder.
Edited video_mode=1 (tried other settings but tv always displays 1280X720 @60Hz)

My TV info shows 1280x720 @60Hz

NegSol
Captain Atari
Captain Atari
Posts: 211
Joined: Sat Dec 05, 2015 9:22 pm

Re: Testing: Support for more HDMI resolutions and other changes.

Postby NegSol » Thu Dec 14, 2017 8:05 pm

Same here no change noticeable - HDMI stays at 720P with my monitor no matter what number is set in the .ini. :shrug:

However, I like the idea of a large range of supported resolutions...

Sorgelig
Atari God
Atari God
Posts: 1947
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Testing: Support for more HDMI resolutions and other changes.

Postby Sorgelig » Thu Dec 14, 2017 8:34 pm

Weird.. My monitor shows different resolutions..

ijor
Hardware Guru
Hardware Guru
Posts: 3294
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: Testing: Support for more HDMI resolutions and other changes.

Postby ijor » Thu Dec 14, 2017 9:27 pm

Sorgelig wrote:Weird.. My monitor shows different resolutions..


This can't be the monitor. A monitor might not support a given resolution. But then you won't get any display at all, or some kind of message in the best case. If the monitor displays the core output at a given resolution it means that's the resolution the system is using.

It has to be that you has something in your setup that you changed and for some reason it is not updated and missing or different on the others.

But I agree with the general feedback. More resolutions is nice, 50Hz support is even better!

udo
Atariator
Atariator
Posts: 24
Joined: Fri Jun 02, 2017 10:47 am

Re: Testing: Support for more HDMI resolutions and other changes.

Postby udo » Thu Dec 14, 2017 10:48 pm

Sorgelig wrote:Weird.. My monitor shows different resolutions..


I just tried it using the new template MiSTer.ini and found that there must be some problem with the parser.
video_mode=0 is only evaluated when there are less comments (only max. 5 lines) above the video_mode line
otherwise MiSter says: "Incorrect amount of items in video_mode parameter: 0" and does not evaluate the line.

NML32
Captain Atari
Captain Atari
Posts: 464
Joined: Tue Mar 11, 2014 1:54 am
Location: USA/Florida

Re: Testing: Support for more HDMI resolutions and other changes.

Postby NML32 » Thu Dec 14, 2017 11:01 pm

udo wrote:I just tried it using the new template MiSTer.ini and found that there must be some problem with the parser.
video_mode=0 is only evaluated when there are less comments (only max. 5 lines) above the video_mode line
otherwise MiSter says: "Incorrect amount of items in video_mode parameter: 0" and does not evaluate the line.

Thanks, that worked for me too.

User avatar
Newsdee
Atari God
Atari God
Posts: 1134
Joined: Fri Sep 19, 2014 8:40 am

Re: Testing: Support for more HDMI resolutions and other changes.

Postby Newsdee » Thu Dec 14, 2017 11:19 pm

Somewhat related, would it be possible to have an option on the upscaler about how to stretch the image? I'd like to try forcing it to only 1x, 2x, 3x, 4x as a way to avoid filtering. Basically it will have black borders but should give a sharper image.

Sorgelig
Atari God
Atari God
Posts: 1947
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Testing: Support for more HDMI resolutions and other changes.

Postby Sorgelig » Fri Dec 15, 2017 4:06 am

udo wrote:I just tried it using the new template MiSTer.ini and found that there must be some problem with the parser.
video_mode=0 is only evaluated when there are less comments (only max. 5 lines) above the video_mode line
otherwise MiSter says: "Incorrect amount of items in video_mode parameter: 0" and does not evaluate the line.

Ok. That should be easy to fix.

Newsdee wrote:I'd like to try forcing it to only 1x, 2x, 3x, 4x as a way to avoid filtering. Basically it will have black borders but should give a sharper image.

Although it sounds easy, it's not trivial. Actually it depends on core. Scaler has no multiplier setting, but output resolution. Some cores have variable original resolutions, so it should be properly caught to calculate output resolution or it will require assistance from core.
Another problem is aspect ratio. In Analog TV there was no such thing as pixel clock, Thus digital systems used any pixel clock where only time of line was matter. Some cores even provide fake pixel clock where pixel output several times, so effective horizontal resolution is 2-4 times higher than really is. Thus most retro systems didn't have 1:1 pixel size and 4:3 aspect ratio (in relation to pixel clock). Scaling by fixed multiplier will produce too narrow or too wide picture.

Not every core has HQ2x scaler, but actually this scaler gives a good looking picture even with VIP scaler on top of it. I think, adding HQ2x scaler to other cores is a good way to improve upscaled picture.

Another way to improve scaling is to find a good scaling coefficients like improved Lanczos algo. If someone is good in picture processing (no HDL knowledge is required) and want to help, then let me know.

P.S.: I don't think current scaling is bad. Some specific color combination may have not excellent scaling like ZX core gray startup screen. But other color combinations work better.

User avatar
Newsdee
Atari God
Atari God
Posts: 1134
Joined: Fri Sep 19, 2014 8:40 am

Re: Testing: Support for more HDMI resolutions and other changes.

Postby Newsdee » Fri Dec 15, 2017 6:22 am

I never expected it to be trivial :D Just looking at the prices of the XRGB and OSSC show that good quality upscaling is very difficult.

In theory 720p is an ideal ratio for 15khz because 240px3=720p. I wonder if I will get better results if I disable the scandoubler option, because maybe its upscaling 480p to 720p instead (I use both an HDMI and VGA display). Will try at home.

ex68k
Atari freak
Atari freak
Posts: 53
Joined: Sat Oct 26, 2013 11:13 am

Re: Testing: Support for more HDMI resolutions and other changes.

Postby ex68k » Fri Dec 15, 2017 9:13 am

Newsdee wrote:I never expected it to be trivial :D Just looking at the prices of the XRGB and OSSC show that good quality upscaling is very difficult.
In theory 720p is an ideal ratio for 15khz because 240px3=720p. I wonder if I will get better results if I disable the scandoubler option, because maybe its upscaling 480p to 720p instead (I use both an HDMI and VGA display). Will try at home.


I think it would be easy, if you always assume a 1920x1080 resolution of the tv, and "just" double/tripple/quadruple the pixels on the way to the screen...
Probably some x/y start value so you have black borders around the picture ...

User avatar
Newsdee
Atari God
Atari God
Posts: 1134
Joined: Fri Sep 19, 2014 8:40 am

Re: Testing: Support for more HDMI resolutions and other changes.

Postby Newsdee » Fri Dec 15, 2017 9:57 am

The thing is, as Sorgelig pointed out, it is using a more generic upscaler which (for good reasons) doesn't give you that kind of control. In most use cases you just want the image to fit the screen. I noticed that it also adapts when you add a black border as in the NES core, which actually is nice.

Sorgelig
Atari God
Atari God
Posts: 1947
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Testing: Support for more HDMI resolutions and other changes.

Postby Sorgelig » Fri Dec 15, 2017 10:38 am

Even 480p/576p are not native retro resolutions. You still have to double the amount of lines which is also process of scaling.
Actually, scaled scandoubled video looks better than scaling original 240/288 lines. So, simple scandoubler also can improve quality.

Lite revisions of ZX and BK0011M cores also have HDMI video. It uses simple scan doubling/tripling/quadrupling depending of original and screen resolutions using my new HDMI_Lite module. You can see a sharper picture in Lite revision but picture may not fill the full screen and can be narrower or wider depending on resolution.
Lite revision can be compiled in free Quartus version, so if you really want to have hassle with choosing correct resolutions and scaling - welcome :) It won't be in releases. It's pure for debug purpose because my VGA monitor doesn't always support core's video. So i've tried to avoid VGA output.

ex68k
Atari freak
Atari freak
Posts: 53
Joined: Sat Oct 26, 2013 11:13 am

Re: Testing: Support for more HDMI resolutions and other changes.

Postby ex68k » Fri Dec 15, 2017 2:26 pm

Sorgelig wrote:Lite revisions of ZX and BK0011M cores also have HDMI video. It uses simple scan doubling/tripling/quadrupling depending of original and screen resolutions using my new HDMI_Lite module. You can see a sharper picture in Lite revision but picture may not fill the full screen and can be narrower or wider depending on resolution.


Ah!!! I didn't think of that(yet). So for the best picture quality, we have to scale line & pixels by doubling/trippeling/etc.
Then throw them in the scaler. So you have full colors where they should be, and only the edges are a little "filtered"

And if somebody doesn't like the scaler, we can just put the result in the middle of the 1920x1080 screen ...

Sorgelig wrote:Lite revision can be compiled in free Quartus version, so if you really want to have hassle with choosing correct resolutions and scaling - welcome :) It won't be in releases. It's pure for debug purpose because my VGA monitor doesn't always support core's video. So i've tried to avoid VGA output.


That's my plan for the christmas time ;-)

Sorgelig
Atari God
Atari God
Posts: 1947
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Testing: Support for more HDMI resolutions and other changes.

Postby Sorgelig » Fri Dec 15, 2017 2:33 pm

Lite revision doesn't use VIP scaler. It uses simple 2x/3x/4x multiplier like scandoubler.

udo
Atariator
Atariator
Posts: 24
Joined: Fri Jun 02, 2017 10:47 am

Re: Testing: Support for more HDMI resolutions and other changes.

Postby udo » Fri Dec 15, 2017 2:37 pm

Sorgelig wrote:Lite revisions of ZX and BK0011M cores also have HDMI video. It uses simple scan doubling/tripling/quadrupling depending of original and screen resolutions using my new HDMI_Lite module. You can see a sharper picture in Lite revision but picture may not fill the full screen and can be narrower or wider depending on resolution.
Lite revision can be compiled in free Quartus version, so if you really want to have hassle with choosing correct resolutions and scaling - welcome :) It won't be in releases. It's pure for debug purpose because my VGA monitor doesn't always support core's video. So i've tried to avoid VGA output.


I noticed this already last week and build my own zx-lite.rbf with DVI-Support. This did work fine, but today I rebuid with the current release and now no matter which video_mode I set, I have never a correct picture on my monitor (the picture frame is stable, but the content looks like there is no sync). Setting different video_modes just resizes the stable frame the content of the frame keeps flickering.

Overall I like the idea that with Your new HDMI_Lite and video_mode I can build my own cores without having the full Quartus, but maybe I need to understand more how it is supposed to work.

And thanks for adding the DVI-Mode - You know I own serval of those DVI-Montiors that can be used after the cores are updated.

Sorgelig
Atari God
Atari God
Posts: 1947
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Testing: Support for more HDMI resolutions and other changes.

Postby Sorgelig » Fri Dec 15, 2017 3:20 pm

Not sure what you mean. Sometimes DE10-nano get screwed and needs cold reset or power cycle to get back to normal work.

udo
Atariator
Atariator
Posts: 24
Joined: Fri Jun 02, 2017 10:47 am

Re: Testing: Support for more HDMI resolutions and other changes.

Postby udo » Fri Dec 15, 2017 3:29 pm

Sorgelig wrote:Not sure what you mean. Sometimes DE10-nano get screwed and needs cold reset or power cycle to get back to normal work.

I did power cycle my board several times. I have the first version of my HDMI_Lite ZX (without video_mode) and this core still works. And the full ZX Core works too (in this core the video_mode did work as expected too).
Maybe You can send me a binary of a ZX-Lite core, I would like to try it. If You want I can send You my core for trial too.

Sorgelig
Atari God
Atari God
Posts: 1947
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Testing: Support for more HDMI resolutions and other changes.

Postby Sorgelig » Fri Dec 15, 2017 3:57 pm

give me your binary.

Sorgelig
Atari God
Atari God
Posts: 1947
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Testing: Support for more HDMI resolutions and other changes.

Postby Sorgelig » Fri Dec 15, 2017 4:19 pm

New release should fix INI problems.

udo
Atariator
Atariator
Posts: 24
Joined: Fri Jun 02, 2017 10:47 am

Re: Testing: Support for more HDMI resolutions and other changes.

Postby udo » Fri Dec 15, 2017 5:48 pm

Sorgelig wrote:give me your binary.

Attached is my zxspectrum core. I just pulled the repository and did not change anything before building.

Sorgelig
Atari God
Atari God
Posts: 1947
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Testing: Support for more HDMI resolutions and other changes.

Postby Sorgelig » Fri Dec 15, 2017 5:51 pm

I don't see an attachment

udo
Atariator
Atariator
Posts: 24
Joined: Fri Jun 02, 2017 10:47 am

Re: Testing: Support for more HDMI resolutions and other changes.

Postby udo » Fri Dec 15, 2017 6:04 pm

Sorgelig wrote:I don't see an attachment

Strange - maybe is was too big? I did not see an error message.

My Core is running now. I found the root cause. I had my setup running without the cooling fan. With the Fan running my self made core works fine.
It looks like the video_mode feature in HDMI_Lite needs better cooling that the same core with full HDMI-Scaler.


Return to “MiSTer”

Who is online

Users browsing this forum: No registered users and 2 guests