MiSTer Custom Aspect Ratios for Horizontal Integer Scaling

Community created YouTube tutorials, interviews and helpful online information guides.
User avatar
BlockABoots
Posts: 14
Joined: Wed May 27, 2020 8:21 pm
Has thanked: 1 time

Re: MiSTer Custom Aspect Ratios for Horizontal Integer Scaling

Unread post by BlockABoots »

BlockABoots wrote: Tue Feb 16, 2021 8:54 pm
atrac17 wrote: Tue Feb 16, 2021 5:49 am
BlockABoots wrote: Mon Feb 15, 2021 8:43 pm

But i am getting an image on the screen just that it isnt fill the height of the TV screen and leaves borders at the top and bottom.
It's dependent upon the displays scaler. For instance Sony 4k televisions need the displays aspect ratio to be set to Wide Mode Full Screen 1. If not, the screen doesn't fill the bezel vertically at all. On an LG, you would need to set your displays aspect ration to Original for all aspect ratios listed in the MiSTer OSD/.ini to work. I don't own a Samsung nor do I know anyone with one to play around with the settings. Again, your display may not be compatible; when I say that it doesn't mean that it can't resolve the resolution.
Yeah that maybe the case.

The TV does allow a Custom picture setting where i can increase and decrease the screen size vertically and horizontally so there is that option but im not sure weather that would mess up the scaling or not for scanlines etc
Ok ive actual got this to work now correctly and get a full display that fills the top and bottom of the screen with no borders.

Im not sure if this is a bug or what not but the issue seemed to have been me having the following set in the MiSter.ini file.....

video_mode_ntsc=8

setting it back to the default....

video_mode_ntsc=0

then fixes the issue and gives me a full screen when using your modelines!!!!

Im not sure why setting 'video_mode_ntsc' to '8' (1920x1080) rather than the default '0' would make a difference but it does for some reason!
Yim
Posts: 57
Joined: Mon Jan 18, 2021 11:51 pm
Has thanked: 1 time
Been thanked: 39 times

Re: MiSTer Custom Aspect Ratios for Horizontal Integer Scaling

Unread post by Yim »

I find all this modeline stuff confusing, but if you haven’t got borders running a 224 line game on a 2160 line TV then you haven’t got vertical integer scaling. Unless that’s not what you’re aiming for and you’re just looking for horizontal integers?

Anyway, the reason you get smaller borders on video mode 0 (720 lines) is that the source resolution (224 lines) fits nine and a bit times into the final resolution (2160 lines). 9x224=2016. If your mister is set to 1080p, then it’ll multiply the source by four (to 896), and the TV’s upscaler will double that to 1792 (8x source rather than 9). If the mister is set to 720p, it’ll triple the source to 672 lines, and the TV will triple that again up to 2016, giving you a 9x final multiple.
User avatar
BlockABoots
Posts: 14
Joined: Wed May 27, 2020 8:21 pm
Has thanked: 1 time

Re: MiSTer Custom Aspect Ratios for Horizontal Integer Scaling

Unread post by BlockABoots »

Yim wrote: Sun Feb 21, 2021 1:55 amAnyway, the reason you get smaller borders on video mode 0 (720 lines) is that the source resolution (224 lines) fits nine and a bit times into the final resolution (2160 lines). 9x224=2016.
No no you miss understood, I'm not talking about the universal video mode option in the mister in file I'm talking about the secondary video option a few lines lower where you can set a video mode for Pal and NTSC modes.

Having the NTSC line changed to anything other than the default setting overrides Atrac17's modelines, hence they won't work as intended
User avatar
BlockABoots
Posts: 14
Joined: Wed May 27, 2020 8:21 pm
Has thanked: 1 time

Re: MiSTer Custom Aspect Ratios for Horizontal Integer Scaling

Unread post by BlockABoots »

So what is actually different from the 5x mode and the 5x compatibility mode???. As I have notice whilst I get a full display when using the 5x mode on some games I get odd graphic artifacts.

An example is Cadillacs and Dinosaurs, on the attract sequence when the character bio screen appears with the chequered background scrolling vertically that seems to glitch for a few frames and then on the next scene with the Cadillac driving across the desert the clouds seem to glitch every few frames. On the 5x Compatibility mode I don't get these glitches what so ever!.

So I'm just wondering what is altered between the 2 modes?
Yim
Posts: 57
Joined: Mon Jan 18, 2021 11:51 pm
Has thanked: 1 time
Been thanked: 39 times

Re: MiSTer Custom Aspect Ratios for Horizontal Integer Scaling

Unread post by Yim »

Looks like 5x compatibility mode has a wider resolution, and a higher pixel clock as a result. The other one I think makes the mister output resolution the same as the upscaled core resolution, the compatibility includes a border on each side to match wide screen displays.

I’ve already said that I don’t really get all the video mode stuff, so maybe I should back out of this discussion, but I don’t really understand what atrac17’s mode lines are for. I mean, getting a nice picture, obviously, and it seems they’re helping a lot of people to do that, but like on the patreon there’s:
Your display will then scale the resolution in integer increments and fill the bezel vertically. Utilizing the custom aspect ratio settings the MiSTer can control the horizontal resolution being displayed.
Which I don’t understand how it can be true in the context of an 1120p signal to a 2160p TV - the only way that signal can be displayed at an integer multiple on that TV without cropping is if the integer is 1. To fill the screen without cropping is a ~1.93x multiple. If the TV’s upscaler links its vertical and horizontal scaling then it would mess up horizontal integer scaling as well. I don’t mean this as an attack on atrac17 - I think I’m missing something here, so I’d like to understand it.

If the goal is to get a nice picture that fills the screen, then it makes perfect sense to have the mister send as large an integer upscaled image as possible so that the inevitable distortion involved in filling the screen is minimised. If the goal is integer scaling, the only way to do it on a fixed resolution screen so far as I can tell is with borders filling the gap between the integer scaled image and the edge of the screen, and for that you want a mister output resolution that’s an integer divisor of the screen resolution, like 1080p or 720p.
Insert Disk Two
Posts: 62
Joined: Sun May 24, 2020 7:59 pm
Has thanked: 5 times
Been thanked: 8 times

Re: MiSTer Custom Aspect Ratios for Horizontal Integer Scaling

Unread post by Insert Disk Two »

Yim wrote: Sun Feb 21, 2021 12:27 pm
Your display will then scale the resolution in integer increments and fill the bezel vertically. Utilizing the custom aspect ratio settings the MiSTer can control the horizontal resolution being displayed.
Perfectly agree. Can someone explain this please?
User avatar
meauxdal
Posts: 33
Joined: Mon Nov 23, 2020 3:28 am
Location: atlanta
Has thanked: 14 times
Been thanked: 8 times
Contact:

Re: MiSTer Custom Aspect Ratios for Horizontal Integer Scaling

Unread post by meauxdal »

General idea behind atrac17's custom modelines is to provide a display with a native resolution MiSTer's scaler does not support (e.g. 4K) with as crisp an image as possible in order to maximize the results after processing by the display's internal scaler (as well as providing compatibility with e.g. scanlines and LCD effects). They are worth a shot - I've found they look a lot better than you might expect if your monitor can resolve the resolution properly.
User avatar
BlockABoots
Posts: 14
Joined: Wed May 27, 2020 8:21 pm
Has thanked: 1 time

Re: MiSTer Custom Aspect Ratios for Horizontal Integer Scaling

Unread post by BlockABoots »

Yeah im still unsure why 5x Mode gives me graphically glitches on the CPS1 games but the 5x Compatibility Mode does not
User avatar
atrac17
Posts: 8
Joined: Sun May 24, 2020 10:51 pm
Has thanked: 1 time
Been thanked: 3 times

Re: MiSTer Custom Aspect Ratios for Horizontal Integer Scaling

Unread post by atrac17 »

BlockABoots wrote: Mon Feb 22, 2021 7:26 pm Yeah im still unsure why 5x Mode gives me graphically glitches on the CPS1 games but the 5x Compatibility Mode does not
What .rbf date? You've screen capped and submitted to github? Or you can post it here and I'll take care of it.
mindscan
Posts: 2
Joined: Sun Feb 21, 2021 5:51 am

Re: MiSTer Custom Aspect Ratios for Horizontal Integer Scaling

Unread post by mindscan »

hi, is there any way to add a thin aspect ratio for TG16 with 5x? 3:2 is a little fat to my liking, i prefer square pixels with 5x on other cores, but theres only one for R-Type on TG16.
if so what would be the ratio exactly.
User avatar
meauxdal
Posts: 33
Joined: Mon Nov 23, 2020 3:28 am
Location: atlanta
Has thanked: 14 times
Been thanked: 8 times
Contact:

Re: MiSTer Custom Aspect Ratios for Horizontal Integer Scaling

Unread post by meauxdal »

Square pixels with R-Type on that core is 5:3 (already listed in the 5x .txt file). You need to uncomment the ratio and comment out another one, as you can only have 2 active per core.

Also, 3:2 isn't integer scaling for R-Type. That only works on games with the most common PCE resolution. With 1080p using vertical crop, 4:3 is horizontally integer scaled for R-Type with close to correct aspect, and 5:3 is square pixels.
User avatar
BlockABoots
Posts: 14
Joined: Wed May 27, 2020 8:21 pm
Has thanked: 1 time

Re: MiSTer Custom Aspect Ratios for Horizontal Integer Scaling

Unread post by BlockABoots »

atrac17 wrote: Mon Feb 22, 2021 9:09 pm
BlockABoots wrote: Mon Feb 22, 2021 7:26 pm Yeah im still unsure why 5x Mode gives me graphically glitches on the CPS1 games but the 5x Compatibility Mode does not
What .rbf date? You've screen capped and submitted to github? Or you can post it here and I'll take care of it.
It might be hard to to screen grab as the glitch only appears for a few frames, ill try and take a short video of it to capture the issue
User avatar
BlockABoots
Posts: 14
Joined: Wed May 27, 2020 8:21 pm
Has thanked: 1 time

Re: MiSTer Custom Aspect Ratios for Horizontal Integer Scaling

Unread post by BlockABoots »

atrac17 wrote: Mon Feb 22, 2021 9:09 pm
BlockABoots wrote: Mon Feb 22, 2021 7:26 pm Yeah im still unsure why 5x Mode gives me graphically glitches on the CPS1 games but the 5x Compatibility Mode does not
What .rbf date? You've screen capped and submitted to github? Or you can post it here and I'll take care of it.
Before taking the below video i use the Update_all script so i have the latest .rbf files for the CPS1 games.

I took 2 videos with my phone showing the odd graphically glitch when using CPS1_5x mode.

This is CPS1_5x mode......

https://youtu.be/WWIKDZMYIqY

and then CP1_5x_Compatability_Mode....

https://youtu.be/iEtlJi5QTU4

Also any idea why having the following set to anything other than default causes your modelines not to display correctly for CPS games (get borders top and bottom)....

; These parameters have the same format as video_mode.
; You need to supply both PAL and NTSC modes if you want vsync_adjust to switch between
; predefined modes as a base. This will reduce the range of pixel clock.
video_mode_ntsc=0
video_mode_pal=9
User avatar
BlockABoots
Posts: 14
Joined: Wed May 27, 2020 8:21 pm
Has thanked: 1 time

Re: MiSTer Custom Aspect Ratios for Horizontal Integer Scaling

Unread post by BlockABoots »

Any ideas why I get the above issues???
Post Reply