[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 2560x240@60 and 2560x480i@60 (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