RetroArch - Native CRT Support

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

6 Likes

Ok guys this is a alpha release for RetroArch_Switch_Res. It is for bug testing only and should not be used as a replacement. This is currently Windows only.

Be aware you will have to manually reset your desktop resolution. This will be made easier by loading a hi-res games before exiting RA.

There are two files in this zip. One of which is the current wrapper we are using to switch the windows resolution. The other being retroarch.exe. Please backup your retroarch.exe before going any further.

Extract the file to your retroarch install, replacing retroarch.exe.

Prerequisites Ctremudriver and modelines created by vmmaker.

We are currently working on frequency switching! it is half incorporated but not fully working yet.

Currently swithing to all resolution is posible progreesive and interlaced @60hz, some roslutions may swith to 50hz depending in your modeline setup.

We are currently building a modeline database to enable correct 50hz - 60hz switching.

A file will be created with your retroarch folder called ra_res_hz.txt this file will show you the resolution that it is trying to switch to, if these are not available switching will not happen. So, you may need to create these modelins.

Please message my any bugs crashes and such so we can wrap this up for release ASAP.

files can be found here.

4 Likes

Hi I just had a moment to test this alpha and want to update you so far. Here’s a short video of me testing it:

It absolutely is finding my CRT and switching the resolution at launch that works great. However once I launch a game with interlaced mode it sends my TV out of sync. I believe this is actually an issue on my end I’ve yet to find a fix for, for some reason 640x480i always sends my screen out of sync unless I’m switching to it from another already interlaced resolution (i.e using ArcadeOSD and switching from to 2560x480i works and then if I switch to 640x480i it will work). Also when the game displays in progressive it is stretched off screen, I believe that is because it’s reading the aspect ratio settings from my config that are set up for super resolutions as opposed to native resolution, here is an image of that to clarify!

Lastly after running your fork of retroarch and launching a game I’m still unable to find the ra_res_hz.txt file, it should be in the root retroarch directory right? Other than those issues though it is clear that the switch res functionality is working. My question is if you are able to make this support Super Resolutions widths like 2560x240p & 2540x480i? I was having this same issue with switch res sending my monitor out of sync on interlaced modes with the Emu4CRT Mednafen fork (located here: http://forum.arcadecontrols.com/index.php?topic=155264.0 if you’d like to look at it) but when the author added support for super resolutions it resolved that issue immediately, please let me know if this is possible. Also if there is any prior setup to the retroarch.cfg file that needs done please let me know, it may help you to know I use a frontend with individual .cfg files for every platform.

Is this a hard requirement? I’ve been using CRU (Custom Resolution Utility) to get 240p & 480i pushed to my CRT monitor. In some other context it seems to have done the jobs CRT_Emudriver is used for.

I’m very curious about this as well. It’s become my understanding that 3840/1920 x 240/480 are the go-to resolution settings for these setups.

– Not to detract from the awesome progress you are making here. Gave both your vids a thumbs up.

I may have uploaded a version that does not output this file. I will link to the latest version which definitely does. Your issue could be with your CRT. As you can see from one of my earlier videos PSX works fine. However, It could be your installed resolutions. Check the ra_res_hz.txt to see the resolutions being asked for. It will be the last resolution in the list.

This version still does not restore your desktop resolution so be aware.

When it comes to super resolutions I am hoping to eventually incorporate Calamity’s SwitchRes further down the line. I believe that I am collecting all the information needed to be passed to SwitchRes, however, I have not looked into it yet.

This latest version now switches your screen refresh rate between 50hz an 60hz if these frequencies are available for the resolution. I have someone working on building an ini for vmmaker to incorporate the correct resolutions and refresh rates. I know there is a lot of people interested in this so, my plan is to complete this version using the current methods before moving onto SwitchRes and incorporating Super resolutions.

@SkyHighGam3r Vmmaker creates modelines for windows so that an application can ask for the resolutions installed. I’m not sure about CRU, I know that it can force resolution However, I don’t think it can install modes for automatic switching!? Please correct me if I am wrong here.

Here is a video of the latest version, Switching resolution, P to I and screen frequency.

4 Likes

The new linked version does output the file for me and after switching the aspect ratio settings in my default config the progressive modes fill my entire screen perfectly! Unfortunately interlaced modes still send my screen out of sync, this shouldn’t be an issue with the TV itself, also I have the modes installed that ra_res_hz.txt asks for, something causes this program and Emu4CRT Mednafen to select the wrong refresh rate for 480i but seeing as how this is such a niche issue it’s hard to find why I experience this but not other people with CRT Emudriver GPU’s. I may take this issue to the CRT Emudriver forums that may be the only way to get on track to resolving it but in the meantime I’ll attempt to test any other builds you make just in case

1 Like

Hi man

I’ve quickly put together a superres version it is using the full scale, you will have to correct your ratios in RA as things may look squished. For example genesis will need 8:1 and Snes will need 5:1. if all goes well here I may incorporate auto scaling You mentioned before this fixed your interlaced issues. So I am intruded on how this will work.

Thanks for doing some testing for me during these early stages. Each machine seems to have slightly different setups which seem to cause some weird bugs.

Give it a try and let me know how you get on.

Cheers

Alpaha

3 Likes

Thanks so much! I actually managed to discover a fix to my initial issue as well and so I have information on both the native resolution and the super resolution builds as I’ve tested them both. So to start the Super resolution build worked nearly perfectly aside from one issue but it’s nothing you can fix it’s just a result of the way retroarch handles aspect ratios. There is no current aspect ratio setting that stretches to full screen regardless and because of this when using Super Resolutions the only good aspect ratio setting is custom, then you define static x and y values, this prevents the vertical size of retroarch from scaling correctly between resolutions, either 480i will be squished in half or 240p will be doubled off screen.

Because I was receiving that last issue I just mentioned, I downloaded your last release of the build for use with Native resolutions and now interlaced modes are working with that as well! However now I’m coming across another issue. For some reason when the horizontal resolution changes in game retroarch does not change the implied internal horizontal resolution of the game. For example I launched Castlevania Symphony of the night, the PS1 BIOS displays well, as well as the intro FMV, however when the game gets to the title screen to press start the screen resolution changes to 512x240p and this squishes the picture in to the center of the screen, going into the retroarch video menu shows that retroarch believes the games internal horizontal resolution is still 320 pixels wide. Here is a picture of the issue.

Same issue with Crash Bandicoot, immediately after the PS1 BIOS, which works properly, the resolution switches to progressive for the title screen but is not the correct aspect ratio. Something different happens with Ape Escape, this game starts with a couple 480i screens but when the game switches to the opening cutscene the game should switch into progressive mode however this time there is no resolution change, the game remains interlaced. All of these games I tested behave properly in the Emu4CRT fork of Mednafen. One game I tested however is working perfectly with native resolutions and that is Donkey Kong 64, the 2 interlaced splash screens as well as the switch into the progressive intro both display perfectly! So here is a short video of that in action!

If you use config as your aspect ratio and set integer scaling on it should fill the screen in all modes (except some lower 50hz modes, they will always have borders, as the real hardware would have).

I don’t even have a CRT and I think this bounty deserves far more than $50

3 Likes

I understand some games have borders on real hardware and naturally not all games will fit the entire screen but that’s not what I believe is the problem.

This is me forcing a custom viewport of 512x240 and running Castlevania SOTN at the title screen at that full screen resolution which is the resolution Alpapha’s build sets the screen to and it is the correct resolution for this screen.

Now here I’m going to show me forcing the fullscreen and viewport to 320x240 which is what Retroarch has reported to it as the native resolution instead and if you look closely you can see the artifacts from not being a clean interger scale

1 Like

Are these test in native or super resolution?

In native resolution you should not need to change any aspect ratio. The video driver should fills to the screen.

RetroRepair has been doing the core of my testing and has found that there are some cfg conflics. I sent iver my ra2 folder over to him instead of just the exe and things work brilliantly. Except hz swithing. If you could extract a fresh RA and then add my files to it. You should notice some differences. My cfg is passing 0 for fullscreen x and y. Some cores you need to change interlaced mode to double field and integer scaling.

I am looking into automatic ration changes as and when needed. May be a while till this is implemented though.

First of, a big thank you, amazing work. I’ve tried both the native and super builds and so far the native worked perfectly for me as long as the modeline is available. With the super build i’m having 2 issues, first one i’m not sure is actually an issue, but if i’m playing a game that changes the horizontal res midgame from 320 to 240 and vice versa, like splatter house 3 on the genesis, instead of simply scaling it seems to unnecessarily “refresh” the resolution. Using the official retroarch this doesn’t occur and the change of resolution is perfect without any sign of changes in the resolution, the same behavior as with groovymame. The second issue is that with the super build it seems no matter what i’m getting issues with vsync, the picture looks as if vsync is not enabled even though it is, with the official retroarch this doesn’t occur either.

If the game changes res at all then so will retroarch with this build. It should be correct behaviour. Check the ra_res_hz text file (delete it then load RA and test that rom). I have a feeing splatterhouse 3 is a lower res than most games at least on certain screens. If it does change, that file will log the mode it’s changed to. Mainstream RA won’t do that because it doesn’t change res mid game :wink:

Regarding super modes, it’s likely the refresh won’t match what RA is trying to sync to for the moment but this is being looked into. By the way, vsync shouldn’t need to be used once this build reaches maturity as it shouldn’t need it. If your resolutions are set up correctly megadrive in pal mode should already sync correcty for example.

Having next to no lag with the correct resolution on a CRT is something to behold :sunglasses:

I think i didn’t explain myself correctly, english isn’t my native language, so sorry for that. I know that the game changes resolution mid game and that this is correct behavior, i just think it’s unnecessary since it’s already using super resolution 2560 and basically changes the resolution to the same resolution, and the resolution change is only on the horizontal, not vertical. the game uses two resolutions, 320x224 and 256x224 (No overscan) so it would make more sense to simply scale the game without changing resolutions, eliminating the small hiccup that happens during the resolution change. This is how groovymame deals with super resolution and this is also what i was using up until now with retroarch 1.2.2, which worked perfectly with this setup. About the refresh, what do you mean vsync will not be needed? how would you sync the video to the monitor without tearing? And if i understand correctly, the super build should be avoided at the current moment do to the problem with the refresh? I checked again and it’s definitely an issue with vsync not working. If i disable audio sync then the game runs unthrottled as if vsync is off. Thank you.

I ran my tests using native mode. I installed a fresh retroarch but it is still the same thing with PS1 games, any horizontal resolution that is not a clean multiple of 320 gets borders incorrectly because the core still reports the native horizontal resolution as 320 pixels. In games where this isn’t the case and horizontal widths are either 320 or 640 all displayed perfectly, for instance I just tested the game Activision Classics for PS1 with no issues. So for games with oddball horizontal resolutions like 512 the only way to properly fill the screen horizontally is with the custom aspect ratio settings that set the horizontal viewport to the exact number of pixels those are the only working aspect ratio settings for those games I can find because retroarch seems to think that those games are an incorrect horizontal resolution as opposed to what they actually are

Super resolutions could potentially resolve the issue I just mentioned but interlaced and progressive modes don’t alternate to fit the screen in both modes with super resolutions and I’ll explain why. Interger scaling relies on the 2 values trying to match a specific aspect ratio, 320x240 and 640x480 are both 4:3 so with aspect ratio set to 4:3 they both fit. 2560x240 and 2460x480 even though due to the nature of a CRT they will be squished in to 4:3, when you look at just the demensions they are totally different aspect ratios so there is no good setting that matches both of those resolutions at once. Interger scaling would normally help but this case is different because I believe retroarch will only select even multiple interger scales (so for example if I select the config aspect ratio and set interger scale on at 2560 x 240, retroarch will pick 320x240 to scale to and not 2560x240 because it’s not a clean multiple of the entire native res. I think we are pushing the limits of what the current aspect ratio settings were designed for, it would really help to have some aspect ratio setting that just generally scales as far out on both demensions as possible

Lastly I ran one more test. Sonic 2 on Genisis does not yet switch to interlaced for 2p vs mode

I don’t thing the changes here are changing anything in core behavior.

What would need to happen is for cores to report the resolution change at all times but for practical reasons this doesn’t happen (it’s not required for the 99% of the userbase)

I’m pretty sure it can be done (there is a callback that allows a core to change geometry, and timing too) but it should be implemented per-core and should be optional and disabled by default in my opinion.

I think you are correct. I wonder where it pulls it’s information to switch modes from, I find it odd there are some instances where the interlace.cg shader on my CRT monitor knows to interlace but those same situations don’t trigger mode switches on my TV

1 Like

Abwezi, i also tried the psx core with the native build, and i tested castlevania sotn and i had no problem with borders or scaling artifacts, though the main menu used a weird resolution. Anything else you want me to try? as for sonic, make sure you have a 320x480i modeline and also make sure that you set the core (genesis plux gx) to output double field in the core options, the default is single field.

See that’s the thing, GPGX does change geometry on an internal resolution change. Mednafen PSX doesn’t