MiSTer Integer Custom Video Modes

Discussion about displays and related hardware including MiSTer filters and video settings.
User avatar
atrac17
Core Developer
Posts: 161
Joined: Sun May 24, 2020 10:51 pm
Has thanked: 31 times
Been thanked: 379 times

MiSTer Integer Custom Video Modes

Unread post by atrac17 »

MiSTer Integer Custom Video Modes.png
MiSTer Integer Custom Video Modes.png (118.44 KiB) Viewed 11353 times

https://github.com/atrac17/MiSTer_Integer_Modelines
User avatar
atrac17
Core Developer
Posts: 161
Joined: Sun May 24, 2020 10:51 pm
Has thanked: 31 times
Been thanked: 379 times

Re: MiSTer Integer Custom Video Modes

Unread post by atrac17 »

I've got the iPad display dialed in and will put together a pack for it shortly. It's driver board dependent. I've used three different one's so far.

Currently, VS-RTD09703-V1 has the most features. It's got overdrive and sharpness controls in the OSD. Screens immaterial, LG or Samsung.

Clocked it at less than 9ms against my 14M4U.
1_1.png
1_1.png (1.42 MiB) Viewed 12727 times
hideous
Posts: 6
Joined: Sun Jul 19, 2020 7:07 pm
Has thanked: 1 time
Been thanked: 1 time

Re: MiSTer Integer Custom Video Modes

Unread post by hideous »

A feast for the eyes!
Toya
Posts: 65
Joined: Tue Jun 08, 2021 9:59 pm
Has thanked: 5 times
Been thanked: 23 times

Re: MiSTer Integer Custom Video Modes

Unread post by Toya »

I can highly recommend Atrac17s modelines.
Yim
Posts: 125
Joined: Mon Jan 18, 2021 11:51 pm
Has thanked: 3 times
Been thanked: 87 times

Re: MiSTer Integer Custom Video Modes

Unread post by Yim »

I’m kinda confused by these. They provide integer scaled output from the MiSTer, but the final result on the screen will be non-integer scaled by the screen’s scaler unless you use a CRT, yeah?

Also why should the default resolution be set to 720p? Doesn’t the custom video mode override that?
User avatar
atrac17
Core Developer
Posts: 161
Joined: Sun May 24, 2020 10:51 pm
Has thanked: 31 times
Been thanked: 379 times

Re: MiSTer Integer Custom Video Modes

Unread post by atrac17 »

Yim wrote: Tue Aug 17, 2021 12:36 pm I’m kinda confused by these. They provide integer scaled output from the MiSTer, but the final result on the screen will be non-integer scaled by the screen’s scaler unless you use a CRT, yeah?
You keep saying this, have you even tried it? Did you know that setting full screen on the OSD sets the the image to the custom video mode? Then the displays scaler takes care of the rest. Also, using custom aspect ratios for DAR, PAR, or a straight integer scale set outside of what is coded in the core work.

Yes, I have calibrated CRT's. Yes, the image displayed on the panel is the same as the CRT.
Yim wrote: Tue Aug 17, 2021 12:36 pm Also why should the default resolution be set to 720p? Doesn’t the custom video mode override that?
Setting 720p as default is for hot swapping between cores. At one point, the framework didn't always display the custom video mode after hot swapping. I found that 720p as the default rectified this.

I get it, you wrote the horizontal scaler function and that's great... I've never said I don't understand that. But then again, I tried it first. There are plenty of people who'll attest to what I am working on. It's custom, but it works.
User avatar
atrac17
Core Developer
Posts: 161
Joined: Sun May 24, 2020 10:51 pm
Has thanked: 31 times
Been thanked: 379 times

Re: MiSTer Integer Custom Video Modes

Unread post by atrac17 »

morf77 is helping me out and building scripts to install custom settings for you iPad display folks... Here's an example of what things will look like.

129852977-f0aeaed6-f8a6-46a1-a84d-e91602317b90.jpg
129852977-f0aeaed6-f8a6-46a1-a84d-e91602317b90.jpg (3.27 MiB) Viewed 11354 times
Yim
Posts: 125
Joined: Mon Jan 18, 2021 11:51 pm
Has thanked: 3 times
Been thanked: 87 times

Re: MiSTer Integer Custom Video Modes

Unread post by Yim »

atrac17 wrote: Tue Aug 17, 2021 11:11 pm You keep saying this,
This is the second time I've said it, and you didn't respond to the first. I'm not trying to be hostile, when I say I'm confused I mean it. Am I missing something?
have you even tried it?
To be honest, no. I gave it a shot just now, but all the ones I tried my TV wouldn't display - it seems it's pretty picky about resolution. But I have no doubt that you're getting good results - I've seen many other people say as much. I'm just confused by the claim of integer scaling. I can see that your modes set the MiSTer to output an integer scaled image. If that is all you mean by Integer Custom Video Modes, then great, I get it. You output a clean image that winds up looking good on the screen. What I don't get is the idea that the final image displayed on the screen will be integer scaled. Your Street Fighter image up there is, I think, because it's displaying on a screen whose horizontal and vertical resolutions are integer multiples of the game's native resolution. If I were able to get it to display on my 1080p screen, and it filled the screen, it wouldn't be integer scaled any more because that 1536x896 image would be shrunk/stretched to 1440x1080 (or just stretched to 1920x1080, but I think the idea is you set the TV to make it 4:3?), which is not an integer multiplication.
Did you know that setting full screen on the OSD sets the the image to the custom video mode?
You're saying that if you set the OSD to full screen then the horizontal resolution of the image becomes whatever the horizontal resolution of the video mode is? If so, then yes.
Then the displays scaler takes care of the rest.
This is where you lose me. The previous time I asked about this I was responding to a claim on your patreon that the display would scale in integer increments to fill the bezel vertically, which unless I've misunderstood what you're saying is simply incorrect. A modern display with a fixed resolution cannot integer scale unless the screen's resolution is a multiple of the image resolution or it uses cropping or borders.

I am open to the possibility that I have just misunderstood what you're doing. If the goal is to have the MiSTer output a large, integer scaled image that will suffer minimal damage from the display's scaler, then I get it. If the goal is that the final image on the screen will both fill the screen and be integer scaled, I am missing something.
Setting 720p as default is for hot swapping between cores. At one point, the framework didn't always display the custom video mode after hot swapping. I found that 720p as the default rectified this.
Thanks for the explanation.
I get it, you wrote the horizontal scaler function and that's great... I've never said I don't understand that. But then again, I tried it first. There are plenty of people who'll attest to what I am working on. It's custom, but it works.
I'd like to claim credit for the horizontal integer scale, but the dodgy version I wrote was not used. Sorgelig wrote a better version and put that in.

I'm not trying to pick a fight or dismiss what you're doing. It's obviously giving good results to a lot of people. I just want to understand it (and I get that you have no responsibility to explain yourself to me. If you want to just say "here's a set of magic numbers that make the picture look nice, enjoy", that's fair enough).
FoxbatStargazer
Top Contributor
Posts: 994
Joined: Thu Dec 10, 2020 5:44 pm
Has thanked: 309 times
Been thanked: 228 times

Re: MiSTer Integer Custom Video Modes

Unread post by FoxbatStargazer »

My experience with LCD computer monitors is that their scalers are all trash so yeah, could probably lead with a note about intended use cases here.

I imagine if you want to fullscreen stuff on your 4K display, this can yield better results than sending a pre-scaled 1080p signal. There's also something a bit too blurry about the default "sharp interpolation" filter so if your display is scaling less than 2x from zero-interpolation it might yield better results.

There's also many cores lacking an HV integer scale setting so this can be a way to force that with display scaling disabled on a 1080p monitor or such.
User avatar
atrac17
Core Developer
Posts: 161
Joined: Sun May 24, 2020 10:51 pm
Has thanked: 31 times
Been thanked: 379 times

Re: MiSTer Integer Custom Video Modes

Unread post by atrac17 »

Yim wrote: Wed Aug 18, 2021 2:40 pm I'm not trying to pick a fight or dismiss what you're doing. It's obviously giving good results to a lot of people. I just want to understand it (and I get that you have no responsibility to explain yourself to me. If you want to just say "here's a set of magic numbers that make the picture look nice, enjoy", that's fair enough).
Sounds good. Caught the wrong vibe, apologies. I just remember seeing it before. I don't really come to the forum a lot, but I have a good memory.

It really won't work with anything other than a 4K display. Some 1440p monitors work very well. I've only tried it on four or five LG monitors.

I've only had one 1080p display work. It's a six year old Samsung. What you're referring to with 1080p going to a 4:3 resolution from the 896... That isn't how this works.

I understand where the confusion is. If you had a display that was higher than 1080p you might be successful and running one of the ini files.

This really takes advantage of the AI upscaling from LG. Other displays do it too, it maybe called something different. For instance, the iPad display that everybody's got can take advantage of these. That's driver board dependent.

I'll try and follow up with some screenshots of an iPad display to give you an example tomorrow.
FoxbatStargazer
Top Contributor
Posts: 994
Joined: Thu Dec 10, 2020 5:44 pm
Has thanked: 309 times
Been thanked: 228 times

Re: MiSTer Integer Custom Video Modes

Unread post by FoxbatStargazer »

I will say this, if you want to use scanline filters and go top-to-bottom bezel without 5x cut, give this a try. They were quite passable on my "old" Sony 4K. Wheras its pretty obvious uneven garbage using mister's scaler to fill out to 1080p. Shame that this TV will not let me squish these higher resolutions to 4:3.
User avatar
atrac17
Core Developer
Posts: 161
Joined: Sun May 24, 2020 10:51 pm
Has thanked: 31 times
Been thanked: 379 times

Re: MiSTer Integer Custom Video Modes

Unread post by atrac17 »

FoxbatStargazer wrote: Thu Aug 19, 2021 12:07 am I will say this, if you want to use scanline filters and go top-to-bottom bezel without 5x cut, give this a try. They were quite passable on my "old" Sony 4K. Wheras its pretty obvious uneven garbage using mister's scaler to fill out to 1080p. Shame that this TV will not let me squish these higher resolutions to 4:3.
Did you try zoom 1 or 2? Sony's are weird. I'm glad they meet your approval.
FoxbatStargazer
Top Contributor
Posts: 994
Joined: Thu Dec 10, 2020 5:44 pm
Has thanked: 309 times
Been thanked: 228 times

Re: MiSTer Integer Custom Video Modes

Unread post by FoxbatStargazer »

atrac17 wrote: Thu Aug 19, 2021 12:38 pm Did you try zoom 1 or 2? Sony's are weird. I'm glad they meet your approval.
This is on an x850c. For 4x integer option, "Normal" seems to be 1:1 inside inside a 1080p frame (so, same black space you would see on a non-scaled 1080p display. "Full 1" extends it to the top and bottom bezel, while retaining the input AR (which is a bit wider than 4:3 on Genesis core). "Full 2" extends it also to the sides i.e. 16:9.

When I tried 6x, it was more like "full 1" didn't exist, so its not as usable. Still if you use "full 1" for 4x, and just stick to normal AR in mister menu (instead of full), you will get a proper aspect ratio, it just won't be scaled quite as nicely horizontally. But getting the vertical set up correctly is enough for the scanline filter to look a million times better.
User avatar
wark91
Core Developer
Posts: 334
Joined: Sun May 24, 2020 8:34 pm
Has thanked: 447 times
Been thanked: 94 times

Re: MiSTer Integer Custom Video Modes

Unread post by wark91 »

Thank you Atrac17.

Some screenshots with a LCD screen with the resolution 1280x1024 with Mode Lines (Integer Step-Scaled Custom Video Modes)

NeoGeo :
20210818_204018.jpg
20210818_204018.jpg (2.24 MiB) Viewed 12021 times
MegaDrive/Genesis:
20210818_212547.jpg
20210818_212547.jpg (2.88 MiB) Viewed 12021 times
GBC:
20210819_161632.jpg
20210819_161632.jpg (2.66 MiB) Viewed 12021 times
Arcade Shinobi :
20210819_175201.jpg
20210819_175201.jpg (2.27 MiB) Viewed 12021 times
Arcade Green Beret:
20210820_180752.jpg
20210820_180752.jpg (2.35 MiB) Viewed 12021 times
NES/Famicom (Overscan ON and Mask Edges set to both):
20210820_230354.jpg
20210820_230354.jpg (2.91 MiB) Viewed 11949 times
Arcade Battle Road in Tate Mode:
20210820_180935.jpg
20210820_180935.jpg (2.08 MiB) Viewed 12021 times
User avatar
atrac17
Core Developer
Posts: 161
Joined: Sun May 24, 2020 10:51 pm
Has thanked: 31 times
Been thanked: 379 times

Re: MiSTer Integer Custom Video Modes

Unread post by atrac17 »

wwark, try setting Famicom configs differently...

Code: Select all

Utilize the Secondary Modelines below if you enable Hide Overscan: Yes and Mask Edges: Auto in the MiSTer OSD. This simulates playing on a CRT with the overscan areas pushed out of the display horizontally and vertically.
Set this up, that ought to fix certain games on Famicom.
User avatar
wark91
Core Developer
Posts: 334
Joined: Sun May 24, 2020 8:34 pm
Has thanked: 447 times
Been thanked: 94 times

Re: MiSTer Integer Custom Video Modes

Unread post by wark91 »

It is how I setup but Super Mario 3 have some odd cases. thanks for the heads up and your time for this :)
User avatar
wark91
Core Developer
Posts: 334
Joined: Sun May 24, 2020 8:34 pm
Has thanked: 447 times
Been thanked: 94 times

Re: MiSTer Integer Custom Video Modes

Unread post by wark91 »

I have replaced the Super Mario 3 picture above with Mask Edge set to Both.
User avatar
BlockABoots
Posts: 43
Joined: Wed May 27, 2020 8:21 pm
Has thanked: 7 times

Re: MiSTer Integer Custom Video Modes

Unread post by BlockABoots »

Thanks for all the hard work put into creating these!!

So, are there no custom aspect ratios for arcade cores anymore as i just see custom video modes for arcade cores??
FoxbatStargazer
Top Contributor
Posts: 994
Joined: Thu Dec 10, 2020 5:44 pm
Has thanked: 309 times
Been thanked: 228 times

Re: MiSTer Integer Custom Video Modes

Unread post by FoxbatStargazer »

Not sure too many cores ever supported it. I stuck 4:3 as a custom resolution for the entire [arcade] and have yet to run a core that supports it...
User avatar
BlockABoots
Posts: 43
Joined: Wed May 27, 2020 8:21 pm
Has thanked: 7 times

Re: MiSTer Integer Custom Video Modes

Unread post by BlockABoots »

Well i know atrac17's older revisions of the modelines used to have custom aspect ratios for Jotego's arcade cores
User avatar
atrac17
Core Developer
Posts: 161
Joined: Sun May 24, 2020 10:51 pm
Has thanked: 31 times
Been thanked: 379 times

Re: MiSTer Integer Custom Video Modes

Unread post by atrac17 »

BlockABoots wrote: Sun Aug 22, 2021 1:45 pm Thanks for all the hard work put into creating these!!

So, are there no custom aspect ratios for arcade cores anymore as i just see custom video modes for arcade cores??
That's what this information is, I still have plenty of stuff left to do. This is still a work in progress. You can create it yourself in the interim. Here's an example.

Code: Select all

[jt1942]
video_mode=1024,48,32,80,896,3,10,13,65499
custom_aspect_ratio_1=45:44
2021-08-22 22_29_29-atrac17_MiSTer_Integer_Modelines_ This repository contains custom video modes FP.png
2021-08-22 22_29_29-atrac17_MiSTer_Integer_Modelines_ This repository contains custom video modes FP.png (163.8 KiB) Viewed 11704 times
User avatar
Phaedrus
Posts: 70
Joined: Mon May 25, 2020 12:57 am
Has thanked: 41 times
Been thanked: 13 times

Re: MiSTer Integer Custom Video Modes

Unread post by Phaedrus »

The 6x modelines were a huge help to me, as I was having troubles getting my 1440p 144hz screen to accept the default 1440 mode line without forcing 60hz. With these mode lines I get 1440p and no lag accurate refresh rate. Thanks atrac17
H6rdc0re
Posts: 52
Joined: Sat Feb 06, 2021 11:35 pm
Has thanked: 1 time
Been thanked: 9 times

Re: MiSTer Integer Custom Video Modes

Unread post by H6rdc0re »

Is there a possibility to force a higher pixel clock than the current max 200MHz pixel clock? I want to force 1536x1080 @120Hz but currently it’s maxed out doing 1280x1080 @120Hz for integer 4x scaling of 384x224 and 384x240 games. Perhaps adding a small heatsink will allowing for additional overclocking.
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: MiSTer Integer Custom Video Modes

Unread post by jca »

Overclocking will only affect the ARM side, not the FPGA side.
H6rdc0re
Posts: 52
Joined: Sat Feb 06, 2021 11:35 pm
Has thanked: 1 time
Been thanked: 9 times

Re: MiSTer Integer Custom Video Modes

Unread post by H6rdc0re »

jca wrote: Mon Apr 04, 2022 8:12 pm Overclocking will only affect the ARM side, not the FPGA side.
No I’m talking about overclocking the HDMI clock chip beyond the current set maximum.
FoxbatStargazer
Top Contributor
Posts: 994
Joined: Thu Dec 10, 2020 5:44 pm
Has thanked: 309 times
Been thanked: 228 times

Re: MiSTer Integer Custom Video Modes

Unread post by FoxbatStargazer »

Anyone interested in these custom modes (resolution = exact integer scale) should also look at the new vscale_mode options (4,5,6) labeled "resolution scaling". Like the name vaguely implies, these actually lower the output resolution enough to match some kind of integer scale. So if you use say Wonderswan on 1920x1440 mode and vscale_mode=6, you will get 1792x1152 resolution, a perfect 8x scale in both directions and with zero border. So you might be able to get similar results now without having to put in a custom resolution for every single core.
User avatar
LamerDeluxe
Top Contributor
Posts: 1160
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 798 times
Been thanked: 257 times

Re: MiSTer Integer Custom Video Modes

Unread post by LamerDeluxe »

FoxbatStargazer wrote: Mon May 30, 2022 5:13 am Anyone interested in these custom modes (resolution = exact integer scale) should also look at the new vscale_mode options (4,5,6) labeled "resolution scaling". Like the name vaguely implies, these actually lower the output resolution enough to match some kind of integer scale. So if you use say Wonderswan on 1920x1440 mode and vscale_mode=6, you will get 1792x1152 resolution, a perfect 8x scale in both directions and with zero border. So you might be able to get similar results now without having to put in a custom resolution for every single core.
I haven't looked into it yet, but does this also finally allow horizontal integer scaling, while maintaining correct aspect ratio, for vertical arcade cores?
Toya
Posts: 65
Joined: Tue Jun 08, 2021 9:59 pm
Has thanked: 5 times
Been thanked: 23 times

Re: MiSTer Integer Custom Video Modes

Unread post by Toya »

If someone can please produce an ini file that takes this into account that would be a heroic act. I have an LG CX btw
FoxbatStargazer
Top Contributor
Posts: 994
Joined: Thu Dec 10, 2020 5:44 pm
Has thanked: 309 times
Been thanked: 228 times

Re: MiSTer Integer Custom Video Modes

Unread post by FoxbatStargazer »

LamerDeluxe wrote: Mon May 30, 2022 11:05 am I haven't looked into it yet, but does this also finally allow horizontal integer scaling, while maintaining correct aspect ratio, for vertical arcade cores?
No, the resolution is generated before the flip happens. So Pac-Man(Midway) is originally 288x224, and generates a 1728x1344 resolution, a 6x perfect scale. THEN the flip happens and is stuck inside that window, resulting in uneven scaling.
User avatar
LamerDeluxe
Top Contributor
Posts: 1160
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 798 times
Been thanked: 257 times

Re: MiSTer Integer Custom Video Modes

Unread post by LamerDeluxe »

FoxbatStargazer wrote: Mon May 30, 2022 6:09 pm
LamerDeluxe wrote: Mon May 30, 2022 11:05 am I haven't looked into it yet, but does this also finally allow horizontal integer scaling, while maintaining correct aspect ratio, for vertical arcade cores?
No, the resolution is generated before the flip happens. So Pac-Man(Midway) is originally 288x224, and generates a 1728x1344 resolution, a 6x perfect scale. THEN the flip happens and is stuck inside that window, resulting in uneven scaling.
Ah, okay, thanks for explaining! Too bad, it is so odd that there's vertical integer scaling, but not horizontal.
Post Reply