[Request] Multiples resolutions per system

Hi hunterk, any news concerning the possible integration of Switchres in Retroarch?

I have talk about it on some 15hzCRT-users forums and we are really looking forward to it! :wink:

I’m not sure it’s feasible, unfortunately. However, it’s been awhile since I first looked at it and I’ve forgotten exactly why I was pessimistic about it. I’ll try to revisit it in a couple of days and post back.

Thanks a lot Hunterk, I’m crossing fingers! :slight_smile:

Just an update and some questions about switchres. I’ve been talking with maister about this and while I don’t think it’s feasible to incorporate SwitchRes’ code and functionality directly, we might be able to smooth using it with RetroArch.

SwitchRes has a standalone utility that can be used to generate modelines that are native to a game yet safe for your monitor, correct? Can this utility be used in a batch mode? That would allow users to set up all of their modelines ahead of time (in xorg.conf and/or EDID, for example) and then RetroArch could set fullscreen resolution based on those modes (particularly when running in KMS mode).

Approaching from another angle, I see that SwitchRes standalone has a commandline option for --emulator where you can specify emulators other than MAME for it to work with. What other emulators are supported by this? What would RetroArch need to expose to be supported in this way?

What a great news, thanks a lot guys!

I contacted the guys behind Switchres, forwarding your questions and I’ll tell you right away when I’ll get an answer.

Here is the answer by Calamity :wink: :

I think that for the specific task you’re requesting this feature (basically being able to perform resolution switching within a game for PSX and such platforms) there’s really no point in incorporating SwitchRes into RetroArch. As Hunterk is explaining it is a better idea to just assume that the modelines are already available to RetroArch in the first place.

So let’s consider the scenario where you have properly configured a system with two modelines such as [email protected] and [email protected] (which is trivial to achieve in both Windows & Linux).

What you want the emulator to do is to be able to dynamically switch between both modelines, depending on the vertical resolution requested by the emulated hardware.

Without having the minimal knowledge of the internal details of RA, dynamic resolution switching may involve some refactoring of the DirectX full screen implementation. Basically you need to destroy the current device and create it again with the new resolution, with all the additional caution required if you’re running several threads for the video.

You also need to implement some logic for best mode picking, in case it’s not already included. This logic could operate on the whole mode list returned by the OS, or simply on an user defined mode list. I believe that like most emulators, RA only allows to specify a single resolution for full screen mode, by using the video_fullscreen_x & video_fullscreen_y options, so specifying an user mode list would involve implementing an array of these options.

A solution for not implementing that array would be using “resolution masks”, like this:

video_fullscreen_x = 2560 video_fullscreen_y = 0

Here “0” would be used like a wildcard. If “0” is already used to indicate the desktop resolution, another value could be used (“1”, or whatever).

Then, when the emulator detects a resolution switch request, it would decide which from the list of 2560x resolutions better fits the requested height.

As a note: a proper full screen configuration for any emulator should contain 3 values, not 2:

video_fullscreen_x = ? video_fullscreen_y = ? video_fullscreen_refresh = ?

That’s the only way to unambiguously target a certain video mode in the Windows OS.

Finally, answering Hunterk’s question, SwitchRes supports any emulator provided it takes command line options, it just launches the emulator with the specified options and performs a mode switch previously if specified, this is useful for emulators that are only capable of running at the desktop resolution. My understanding is that if the above or something similar was implemented then launching the games with SwitchRes wouldn’t be necessary.

Cool. Thanks for the info and for being the go-between :slight_smile:

It indeed sounds like the way to go, then, is to see about setting up a mask that ties into a game’s reported resolution and refresh rate. I believe we indeed have the video_fullscreen_refresh option already and the logic for choosing proper dimensions/refresh, as maister mentioned in another thread. He pointed me in the direction of the file that likely needs editing, as well, so I’ll see if it’s within my reach. If not, I’ll try to goad someone into helping out.

Thank you hunterk. Really!

I’m very happy about this news and I’m sure I will not be the only one.

I can’t wait to try it! Please let us/me know when it’s working. :slight_smile:

Any progress hunterk? =D Sorry I can’t wait to try it! :rolleyes:

Nothing to see yet, but I haven’t forgotten about it. Hopefully, we’ll have something soon. :slight_smile:

Thanks hunterk. :wink:

Any progress hunterk? =D

Unfortunately, no :frowning:

This looks like it’s going to be out of my skillset. However, if anyone else has interest in it, I’d be happy to try and point them in the right direction. Sorry, dude…

Thank you hunterk, I’ve let a message on Groovymame’s forum to see if anyone there is interested in making this happen. Let’s cross fingers! :wink:

Cool, fingers crossed :slight_smile:

It’s a feature I’d like to see, too, just none of the more capable folks here have CRTs for testing, so they’d pretty much be coding blind. Hopefully, someone at Groovymame will hook us up!

[QUOTE=hunterk;15588]Cool, fingers crossed :slight_smile:

It’s a feature I’d like to see, too, just none of the more capable folks here have CRTs for testing, so they’d pretty much be coding blind. Hopefully, someone at Groovymame will hook us up![/QUOTE]

Hey there hunterk, could you give me pointers to how you’d go around solving this on linux? I don’t have that much experience on Linux programming, but I’m eager. I have a Sony PVM plugged to my custom PC so I have the required tools. I don’t mind forking Retroarch eventually for this particular usecase, it’s just that 480i on 240p just grinds my gears.

Best regards!

This is my latest update on native resolution switching for Retroarch. Currently it working with on the fly switching. Still in early stages though.

1 Like

oh man, that’s looking awesome!

Another update for you guys to check out. This is Saturn switching between multiple resolutions, progressive and interlaced

1 Like

whoa, shit! I didn’t think progressive/interlaced switching was even on the table :open_mouth:

I hope you know: you’re making my wildest dreams come true.

1 Like