MiSTer Aspect Ratio Calculator

Community created YouTube tutorials, interviews and helpful online information guides.
Yim
Posts: 125
Joined: Mon Jan 18, 2021 11:51 pm
Has thanked: 3 times
Been thanked: 87 times

Re: MiSTer Aspect Ratio Calculator

Unread post by Yim »

The pixel_clock of video_mode=8 runs at 148.5. I calculated the minimum required pixel clock for 2048x960 to be 138.2547 mhz. So it seems the pixel clock is indeed not the cause in this scenario (or I'm calculating the required frequency wrongly).
I think you’re right if you’re looking to have the MiSTer output 2048x960, the problem is that unless you’re using a 2048x960 display (or a display that can have its internal scaling turned off and only use part of the screen) this will result in the display distorting the image by scaling it. The video mode controls the whole image, including the black borders that you get with integer scaling, so those extra pixels need to be factored in.

In terms of reducing the blanking period, I should have said transferring pixels from the blanking period to the active display. So if you wanted to modify mode 8 to give 2048 horizontal at the same pixel clock, you could reduce the back porch by 128 and increase the horizontal resolution by the same amount:

1920 2048, 88, 44, 148 20, 1080, 4, 5, 36, 148.5

I think (assuming removing the blanking doesn’t break anything) this would give a good 2048x960 active image within a 2048x1080 total image at the same pixel clock and frame rate, but then my 1920x1080 tv would downscale it to fit (or possibly crop, I guess) and distort the image again.
User avatar
morf77
Posts: 63
Joined: Fri Aug 28, 2020 1:42 pm
Has thanked: 12 times
Been thanked: 24 times

Re: MiSTer Aspect Ratio Calculator

Unread post by morf77 »

I tested the mode you posted and on my CRT it's running at 148.3 mhz pixel clock working fine, just a little distortion in the image and displacement. I guess for LCD users it would be too much.
Yim
Posts: 125
Joined: Mon Jan 18, 2021 11:51 pm
Has thanked: 3 times
Been thanked: 87 times

Re: MiSTer Aspect Ratio Calculator

Unread post by Yim »

Good outcome! I was only thinking of digital displays rather than CRTs, but if it works that’s good. I think more stuff gets done by the TV in the back porch than the front, so if there were problems it might make sense to take a few pixels away from the front porch and put them in the back (maybe 2048, 30, 44, 78).

Is it necessary to have so much upscaling on a CRT, though? I thought a CRT would do an analogue upscale to fill the screen, plus or minus borders that could maybe be tweaked with knobs on the set. Native core resolution should be enough. I haven’t touched a CRT in years though, so I could have it all wrong.
User avatar
morf77
Posts: 63
Joined: Fri Aug 28, 2020 1:42 pm
Has thanked: 12 times
Been thanked: 24 times

Re: MiSTer Aspect Ratio Calculator

Unread post by morf77 »

On a CRT it's a bad idea. Recommend to run with scandoubler on CRT's and use low resolutions. Only for some TATE arcade games this stuff can become useful (vertical scanlines). My mister is currently only hooked up to a PC Crt but it's nice to be able to test these upscales.
User avatar
meauxdal
Posts: 126
Joined: Mon Nov 23, 2020 3:28 am
Location: atlanta
Has thanked: 32 times
Been thanked: 75 times
Contact:

Re: MiSTer Aspect Ratio Calculator

Unread post by meauxdal »

Just an update regarding the 2560x1440 mode I posted earlier in this thread. I did a bit of testing on GBA with this video mode, the core with the most to gain from a 16:9 aspect ratio since it has a native 3:2 picture. Unfortunately, while this issue is not visible using 32:21 scaling in the SMS core, there is some kind of image issue around the left and right edges of the visible GBA picture. The game I used to test was Castlevania: Aria of Sorrow, and the text box at the bottom of the file select screen was rendering incorrectly at the horizontal edges.

Furthermore, at least on my monitor, I would get semi-random hiccups in the sync, which gave me a black screen for 1-2 seconds. Every few minutes it would lose sync momentarily. CRT still showed the correct image, and using the same aspect ratio at 720p over the HDMI scaler also showed no issue. Just wanted to add this in case anyone was thinking about using that mode I posted. I personally can't recommend it!
User avatar
meauxdal
Posts: 126
Joined: Mon Nov 23, 2020 3:28 am
Location: atlanta
Has thanked: 32 times
Been thanked: 75 times
Contact:

Re: MiSTer Aspect Ratio Calculator

Unread post by meauxdal »

I updated my earlier post in this thread with more information and ratios. Unfortunately the SMS core section is pretty confusing right now. We really need the latest commits released for that core :D
User avatar
meauxdal
Posts: 126
Joined: Mon Nov 23, 2020 3:28 am
Location: atlanta
Has thanked: 32 times
Been thanked: 75 times
Contact:

Re: MiSTer Aspect Ratio Calculator

Unread post by meauxdal »

Atari + MSX aspect ratios. This has been a chore, lol. I'm considering creating a separate thread to collect all of the custom aspect ratios calculated thus far. These really only need to be calculated once and then anyone can just copy them into their .ini files and comment/uncomment as needed.

720p

Code: Select all

[Atari2600]
;Use VBlank: Regenerate for these
custom_aspect_ratio_1=160:123  ; 160;205, BIOS
custom_aspect_ratio_2=400:303  ; 160:202, most games
;custom_aspect_ratio_2=80:69   ; 160:230, Air Raid
;custom_aspect_ratio_2=800:609 ; 160:203, Air Raiders
;custom_aspect_ratio_2=800:603 ; 160:201, Air-Sea Battle
;custom_aspect_ratio_2=800:591 ; 160:197, Airlock
;custom_aspect_ratio_2=800:543 ; 160:181, Artillery Duel
;custom_aspect_ratio_2=4:3     ; 160:200, Assault
;custom_aspect_ratio_2=200:153 ; 160:204, Astroblast
;custom_aspect_ratio_2=120:127 ; 160:254, Base Attack
;custom_aspect_ratio_2=800:573 ; 160:191, Boing!
;custom_aspect_ratio_2=14:9    ; 160:180, Buck Rogers
;custom_aspect_ratio_2=25:18   ; 160:192, Chase the Chuckwagon
;custom_aspect_ratio_2=800:621 ; 160:207, Chuck Norris Superkicks
;custom_aspect_ratio_2=800:597 ; 160:199, Cosmic Commuter
;custom_aspect_ratio_2=400:297 ; 160:198, Custer's Revenge
;custom_aspect_ratio_2=20:21   ; 160:252, Dancing Plate
;custom_aspect_ratio_2=800:663 ; 160:221, Desert Falcon title screen
;custom_aspect_ratio_2=40:33   ; 160:220, Desert Falcon gameplay
;custom_aspect_ratio_2=50:39   ; 160:208, Dice Puzzle
;custom_aspect_ratio_2=400:309 ; 160:206, Final Approach
;custom_aspect_ratio_2=800:627 ; 160:209, Go Go Home Monster
;custom_aspect_ratio_2=160:129 ; 160:215, Hole Hunter
;custom_aspect_ratio_2=400:291 ; 160:194, James Bond 007
;custom_aspect_ratio_2=10:11   ; 160:264, Motocross
;custom_aspect_ratio_2=800:567 ; 160:189, The Music Machine

[Atari5200]
custom_aspect_ratio_1=89:60    ; 356:240

[MSX]
custom_aspect_ratio_1=299:242  ; 598:242 @ 10.738635
1080p

Code: Select all

[Atari2600]
;Use VBlank: Regenerate for these
custom_aspect_ratio_1=288:205  ; 160:205, BIOS
custom_aspect_ratio_2=144:101  ; 160:202, most games
;custom_aspect_ratio_2=28:23   ; 160:230, Air Raid
;custom_aspect_ratio_2=288:203 ; 160:203, Air Raiders
;custom_aspect_ratio_2=96:67   ; 160:201, Air-Sea Battle
;custom_aspect_ratio_2=288:197 ; 160:197, Airlock
;custom_aspect_ratio_2=288:181 ; 160:181, Artillery Duel
;custom_aspect_ratio_2=36:25   ; 160:200, Assault
;custom_aspect_ratio_2=24:17   ; 160:204, Astroblast
;custom_aspect_ratio_2=140:127 ; 160:254, Base Attack
;custom_aspect_ratio_2=288:191 ; 160:191, Boing!
;custom_aspect_ratio_2=40:27   ; 160:180, Buck Rogers
;custom_aspect_ratio_2=3:2     ; 160:192, Chase the Chuckwagon
;custom_aspect_ratio_2=32:23   ; 160:207, Chuck Norris Superkicks
;custom_aspect_ratio_2=288:199 ; 160:199, Cosmic Commuter
;custom_aspect_ratio_2=16:11   ; 160:198, Custer's Revenge
;custom_aspect_ratio_2=10:9    ; 160:252, Dancing Plate
;custom_aspect_ratio_2=280:221 ; 160:221, Desert Falcon title screen
;custom_aspect_ratio_2=14:11   ; 160:220, Desert Falcon gameplay
;custom_aspect_ratio_2=18:13   ; 160:208, Dice Puzzle
;custom_aspect_ratio_2=144:103 ; 160:206, Final Approach
;custom_aspect_ratio_2=288:209 ; 160:209, Go Go Home Monster
;custom_aspect_ratio_2=288:215 ; 160:215, Hole Hunter
;custom_aspect_ratio_2=144:97  ; 160:194, James Bond 007
;custom_aspect_ratio_2=35:33   ; 160:264, Motocross
;custom_aspect_ratio_2=32:21   ; 160:189, The Music Machine

[Atari5200]
custom_aspect_ratio_1=89:80    ; 356:240

[MSX]
custom_aspect_ratio_1=299:242  ; 598:242 @ 10.738635
1440p

Code: Select all

[Atari2600]
;Use VBlank: Regenerate for these
custom_aspect_ratio_1=384:287    ; 160:205, BIOS
custom_aspect_ratio_2=960:707    ; 160:202, most games
;custom_aspect_ratio_2=80:69     ; 160:230, Air Raid
;custom_aspect_ratio_2=1920:1421 ; 160:203, Air Raiders
;custom_aspect_ratio_2=640:469   ; 160:201, Air-Sea Battle
;custom_aspect_ratio_2=1920:1379 ; 160:197, Airlock
;custom_aspect_ratio_2=1920:1267 ; 160:181, Artillery Duel
;custom_aspect_ratio_2=48:35     ; 160:200, Assault
;custom_aspect_ratio_2=160:119   ; 160:204, Astroblast
;custom_aspect_ratio_2=144:127   ; 160:254, Base Attack
;custom_aspect_ratio_2=1920:1337 ; 160:191, Boing!
;custom_aspect_ratio_2=13:9      ; 160:180, Buck Rogers
;custom_aspect_ratio_2=10:7      ; 160:192, Chase the Chuckwagon
;custom_aspect_ratio_2=800:621   ; 160:207, Chuck Norris Superkicks
;custom_aspect_ratio_2=1920:1393 ; 160:199, Cosmic Commuter
;custom_aspect_ratio_2=320:231   ; 160:198, Custer's Revenge
;custom_aspect_ratio_2=8:7       ; 160:252, Dancing Plate
;custom_aspect_ratio_2=800:663   ; 160:221, Desert Falcon title screen
;custom_aspect_ratio_2=40:33     ; 160:220, Desert Falcon gameplay
;custom_aspect_ratio_2=50:39     ; 160:208, Dice Puzzle
;custom_aspect_ratio_2=400:309   ; 160:206, Final Approach
;custom_aspect_ratio_2=800:627   ; 160:209, Go Go Home Monster
;custom_aspect_ratio_2=160:129   ; 160:215, Hole Hunter
;custom_aspect_ratio_2=960:679   ; 160:194, James Bond 007
;custom_aspect_ratio_2=12:11     ; 160:264, Motocross
;custom_aspect_ratio_2=640:441   ; 160:189, The Music Machine

[Atari5200]
custom_aspect_ratio_1=89:72      ; 356:240

[MSX]
custom_aspect_ratio_1=299:242    ; 598:242 @ 10.738635
custom_aspect_ratio_2=897:605    ; 598:242 @ 10.738635 
User avatar
morf77
Posts: 63
Joined: Fri Aug 28, 2020 1:42 pm
Has thanked: 12 times
Been thanked: 24 times

Re: MiSTer Aspect Ratio Calculator

Unread post by morf77 »

Amazing job, many people will benefit from this. A seperate post is a good idea or maybe even a github. I really hope we get a solution at some point for setting AR's per game though. Having to edit the ini file just to run a game should be an unnecessary step. It's great we have these custom AR settings available at the moment but I feel we need to push the idea one step further.
User avatar
meauxdal
Posts: 126
Joined: Mon Nov 23, 2020 3:28 am
Location: atlanta
Has thanked: 32 times
Been thanked: 75 times
Contact:

Re: MiSTer Aspect Ratio Calculator

Unread post by meauxdal »

Created both a GitHub repository and new thread for this, great idea!
Post Reply