Page 1 of 1

Sonic 2 consistent screen size with integer scale for 240p

Posted: Fri Oct 02, 2020 1:04 pm
by ash2fpga
I have my mister setup for 720p integer scale.

I tried playing Sonic 2 the other day. When it came to showing the two player versus, it showed in a window. I am assuming a 480 window in the 720 screen.

I was wondering if there was a way to have a consistent experience across both single player (240p) and vs modes (480i). I vastly prefer scanlines on lower res content, and I think mister only has scanlines (via filter) at 3x (or higher?). My TV is (only) 1080p, and not 1440p capable, so that is a no-go.

Is there something I am missing to make this work?

Re: Sonic 2 consistent screen size with integer scale for 240p

Posted: Sun Feb 21, 2021 10:28 pm
by morgoth
I appear to be having a similar issue; any help would be much appreciated! Thank you

Re: Sonic 2 consistent screen size with integer scale for 240p

Posted: Sun Feb 21, 2021 11:27 pm
by Yim
If you want integer scaling with a 240 source on a 1080 screen, it can only be done in a window. 1080=240x4.5, so you can’t integer scale to fill the whole capacity. The closest you can do is a 4x upscale to 960. One advantage of going to 960 is it’s also a 2x upscale of 480, so it should be consistent for one and two player modes in Sonic 2.

The window in 720p is because 240 gets upscaled x3 to 720 but 480 remains at 480. Running at 1080 also gives enough space for the linedoubler to add scanlines.

Regarding integer scaling, if you’re running 720p into a 1080p TV, the final result won’t be integer scaled because the TV’s upscaler will have upscaled 1.5x to convert 720 to 1080. Whether that’s a problem or not is a matter of taste (and how good the TV’s upscaler is).

One other thing is that a lot of mega drive games run at 224p rather than 240, which doesn’t change much for vertical scaling at 1080 but does effect the aspect ratio needed for horizontal integer scaling. Not sure if the top of my head if Sonic 2 is one of them.

Re: Sonic 2 consistent screen size with integer scale for 240p

Posted: Sun Feb 21, 2021 11:53 pm
by morgoth
Yim,
Thanks for the quick reply. I am a total dunce when it comes to playing with the video settings of my mister. Would you be able to suggest a line or two in my mister.ini that would help resolve this (ie make Sonic 2 playable without the video toggling to black / resizing whenever the 2-player mode comes on)?

I attached my .ini (as a 7z). It is quite basic. And this is the monitor that I use, connected to my mister via HDMI:

43- inch UHD 4K (3840 x 2160) IPS Monitor

Specs:

https://www.lg.com/us/monitors/lg-43UD7 ... ed-monitor

I really appreciate any help you can offer!
Thanks,
Alex

Re: Sonic 2 consistent screen size with integer scale for 240p

Posted: Mon Feb 22, 2021 12:31 pm
by Yim
I’m posting on my phone, so I’m not able to see your ini file, but I think there are two approaches:

If you want integer scaling, then you want an 8x upscale from 224/240 to 1792/1920. There is actually room for a 9x upscale, but it’ll result in image size changes in two player mode because that has double vertical resolution so relative to single player mode it can only be a 2, 4, 6, or 8x upscale and fit. You also want a total resolution from the mister which is an integer multiple of your display - I’d suggest 1080p, which will fit a 4x multiple of single player and 2x of two player. That should be cleanly upscaled by the TV to 2160p, getting you the 8x upscale. This will result in a pretty big border above and below because you’re using 1792 or 1920 lines (depending on whether Sonic 2 puts out 224 lines or 240) out of the screen’s 2160, but it’s the only way to have integer scaling and a consistent size. For this, in your mister.ini you should have in the relevant places:

Code: Select all

vscale_mode=1
video_mode=8 

[genesis]
custom_aspect_ratio_1=10:7    ; gives integer scaled image for 224p
custom_aspect_ratio_2=4:3     ; gives integer scaled image for 240p
The vscale and video_mode bits should replace the existing setting in the ini and the custom aspect ratios go at the end. The first one gives integer horizontal scaling for 224 vertical resolution games and the second does the same for 240 line games. This will also give a consistent horizontal size because the two possible Genesis horizontal resolutions are both integer divisors of the final horizontal resolution this creates (1280 - 4x320 or 5x256).

The other option is not to worry about integer scaling and instead go for an image that fills the screen. I haven’t really tried this much myself, so I’m not sure what settings are good. You could try atrac17’s modeline settings. Some of those seem to change the mister’s output resolution to be an integer upscale of the core’s resolution, so there are no borders. This is then non-integer upscaled by the TV, so the final result isn’t integer scaled, but maybe at 4K the distortion from that is pretty subtle?

Re: Sonic 2 consistent screen size with integer scale for 240p

Posted: Tue Feb 23, 2021 12:52 am
by morgoth
Yim,
Thank you very much for the quick response and details.
I applied all of the settings you mentioned (the top 2 were already present in my ini; the second two allow me to toggle into custom ARs), however both of the custom ARs still result in the same behavior (ie Sonic 2 toggles to black / resizes whenever the 2-player mode comes on during the attract screen).

Does anybody else have similar issues? The way to test appears to be to let Sonic 2 run for a minute or two, until the 2-player mode starts during the attract screen. Whenever this happens, my monitor goes black for a moment and resizes.

Thanks!

Re: Sonic 2 consistent screen size with integer scale for 240p

Posted: Tue Feb 23, 2021 1:28 am
by zakk4223
I see the same behavior, but only if I am using EU region AND have 'border' set to 'on'.

No matter what region you use, it's probably still going to do the screen blink/black screen: it's a video mode change (to 448i/576i) so Mister recalculates video timings.

Try forcing to US or JP if you are using EU region.

Re: Sonic 2 consistent screen size with integer scale for 240p

Posted: Tue Feb 23, 2021 1:34 am
by morgoth
Thanks zakk4223; I am using US mode with border=off. I guess the screen blink/black screen just has to be lived with!!

Re: Sonic 2 consistent screen size with integer scale for 240p

Posted: Tue Feb 23, 2021 9:08 am
by Yim
morgoth, I had a look on my MiSTer and at your .ini file. For me, there is no size change when switching to two player, and no blink/black screen. I was able to replicate the problem by turning borders on, just like zakk4223 (I'm pretty sure I'm already running in PAL). The one thing that's obviously different in your ini file to mine is the vsync_adjust setting. I have it at zero, yours is at two. I tried changing it to see if I could replicate your problem that way. When I set it to 2 I got no picture besides the OSD (though I could hear the music and sound effects so I believe the game was running just fine). On 1 I got a picture and had no changes with the switch from one to two player modes. I'd suggest that you try changing the vsync_adjust to 0 or 1 (or try both) and see what happens. I don't see why it would work, but who knows? If that doesn't fix it, I'm out of ideas.

Re: Sonic 2 consistent screen size with integer scale for 240p

Posted: Wed Feb 24, 2021 11:40 pm
by morgoth
Thanks again for taking the time to check my ini and post a response! I appreciate it Yim.
Setting vsync_adjust = 0 and 1 didn't have any discernible effect. As Zakk mentioned, the temporary screen blink/black screen will just have to be lived with (at least with my current monitor).

Re: Sonic 2 consistent screen size with integer scale for 240p

Posted: Fri Mar 26, 2021 12:58 am
by darksakul
I just want to bring up Sonic 2 for the most part is "240p" for the single player game, but switches to 480i for two players.
For the EU/Pal game, it be 288p/576i .

This is how the game is program to be and how it runs on a real Sega Genesis/Mega Drive.