RetroArch, CRT SwitchRes & Multiple Monitor Issue

Alphanu, I can’t thank you enough for you reply but I’m not able to solve. Audio workaround doesn’t seem to work (skew seems to be 0.05 by default). Audio is scrambled in NEC Turbografx too (I suppose it’s the difference between original vfreq of the games (U)(J) and my PC’s PAL vfreq.

Also wasn’t able to find vertical heights settings in core options (there are only 4 options: "Enable hardware shared context, Load Dummy on core shutdown, check for missing firmware, allow rotation). I managed somehow to reach 240p display with Mednafen PSX but RA is unstable (rGUI squeezes and becomes unreadable even in window mode)

You will not get the correct resolutions with PSx rearmed. You need to use Beetle PSx (Mednafen). if you end up with a squished screen it is because the resolution is not installed.

Load Retroarch, turn CRTswitchres off. Load Beetle/ Mednafen PSX witha ROM/ISO. Once loaded pres F1. choose options then change initial scanline and last scanline to match 240p or 224p. Also which I think I may have forgotten to say, disable overscan. TO be fair its a bit of black magic with windows.

I would and have always suggested that Linux is the best environment to run this on!

Did you disable audio sync? is so then maybe change it to 0.00 and then change the option below it to 0.5 instead.

All my work recently has been on Linux. So Windows has kind of been left behind due to its limitations. And its been a while since Ive used it.

How can I check native resolution for each core or at least vertical resolution? I have to adjust to my TV every single modeline via ArcadeOSD so i need to edit correct resolution. For example Genesis Plus GX core one? Also RGUI resolution? Thnak you.

RGUI should be 320x240. GenPlusGX varies by system/game, but Genesis/MD should be 320x240, as well.

Go to this link https://github.com/alphanu1/MME4CRT/blob/master/README.md

towards the bottom of the page is the most comonly used resolution. These will be the ones you need to change.

Change the first number to your supper resolution For the list below. and set your HZ to either 50 or 60 exact.

512 x 240 @ 50.006977 SNESpal

512 x 224 @ 50.006977 SNESpal

512 x 448 @ 50.006977 SNESpal

512 x 240 @ 60.098812 SNESntsc

512 x 224 @ 60.098812 SNESntsc

512 x 448 @ 60.098812 SNESntsc

256 x 240 @ 50.006977 SNESpal

256 x 448 @ 50.006977 SNESpal

256 x 240 @ 60.098812 SNESntsc

256 x 448 @ 60.098812 SNESntsc

320 x 240 @ 59.922745 MDntsc

320 x 448 @ 59.922745 MDntp

320 x 480 @ 59.922745 MDntsc

256 x 192 @ 59.922745 MDntsc

320 x 224 @ 59.922745 MDntsc

256 x 224 @ 59.922745 MDntsc

320 x 288 @ 49.701458 MDpal

320 x 576 @ 49.701458 MDpal

256 x 192 @ 49.701458 MDpal

320 x 224 @ 49.701458 MDpal

320 x 240 @ 49.701458 MDpal

320 x 448 @ 49.701458 MDpal

320 x 480 @ 49.701458 MDpal

256 x 224 @ 49.701458 MDpal

256 x 288 @ 49.701458 MSYSpal

256 x 240 @ 60.098812 NESntsc

256 x 240 @ 50.006977 NESpal

640 x 480 @ 60.130001 N64ntsc

640 x 237 @ 60.130001 N64ntsc

640 x 240 @ 60.130001 N64ntsc

640 x 480 @ 50.000000 N64pal

640 x 576 @ 50.000000 n64pal

640 x 288 @ 50.000000 n64pal

256 x 252 @ 49.759998 PSXpal

384 x 252 @ 49.759998 PSXpal

640 x 540 @ 49.759998 PSXpal

320 x 252 @ 49.759998 PSXpal

640 x 252 @ 49.759998 PSXpal

384 x 240 @ 59.941002 PSXntsc

256 x 480 @ 59.941002 PSXntsc

352 x 240 @ 59.820000 Saturn/SGFX_NTSCp

704 x 240 @ 59.820000 SaturnNTSCp

352 x 480 @ 59.820000 SaturnNTSCi

704 x 480 @ 59.820000 SaturnNTSCi

352 x 288 @ 49.701458 SaturnPALp

704 x 288 @ 49.701458 SaturnPALp

352 x 576 @ 49.701458 SaturnPALi

704 x 576 @ 49.701458 SaturnPALi

240 x 160 @ 59.730000 GBA

320 x 200 @ 60.000000 Doom

// Arcade

400 x 254 @ 54.706841 MK 384 x 224 @ 59.637405 CPS1

thank you. where can I find native resolution and vertical refresh for Freeintv, Fuse and Beetle PC Engine cores? i tried detecting resolutions with ArcadeOSD but retroarch can’t find correct resolutions in my pc and sets standard 640x480.

Is 59.941002 PSXntsc correct? in TASVideos is reported as 59.292862561956.

It’s 59.941002 PSXntsc

That’s mostly not true :slightly_smiling_face:

Almost everything playstation runs in progressive mode (240p) for which the correct rate is 59.83Hz. Only when in interlaced mode it’s 59.941Hz (seldom used in games, bar static loading pictures etc).

If you’re able to compile the core yourself you can fix this by changing the following line in rsx/rsx_intf.h

//#define FPS_NTSC 59.941

#define FPS_NTSC 59.83

You’ll also notice better audio balancing (it actually reaches 50% buffer saturation) and slight performance increase because there’ll no longer be unnecesary audio resampling going on when playing games. (Turn on “display statistics” from the “onscreen display -> onscreen notifications” menu).

The core is currently set to 59.941, if my monitor runs at 59.83Hz it will stretch the audio and slow down the pace (unless it’s already sped up within the core). I don’t have a compiling environment, is there a reason to keep that rate in core?

No there’s no good reason to keep that interlace rate as the default.

It’s probably a limitation of the libretro port to have only one “global” refresh rate specified. Ideally libretro core would support switching between the rates like e.g. the MAME PSX core does.

Until then it would make more sense to set the default in the core to the progressive rate of 59.83Hz, as pretty much all PSX software/games run in non-interlaced / 240p. Maybe HunterK or someone else could put in a pull request to have this updated?

Quote from Mednafen author:

Mednafen’s NTSC PS1 emulation outputs at 59.94 fps when in an interlaced mode, and 59.83 fps when in a non-interlaced mode

The core has to report the correct rate so RetroArch speeds up or down based on measured display refresh rate. As far as I know this is done dynamically with aspect ratio, so the same could be done with refresh rate.

Did some maths to get to the root of confussion, and I think it’s a matter of disparity in defining the GPU video clock. What is strange to me is how PAL doesn’t match mednafen’s 49.76 but 49.74 instead.

Based on mednafen post

source

source

(256x240)
945/176 MHz  = 5.369319MHz pixel clock
5.369319MHz / 341.25 dots per line = 15.73426573426573kHz horizontal rate
15.73426573426573kHz / 263 lines = 59.82610545 Hz

https://github.com/OpenEmu/Mednafen-Core/blob/master/mednafen/psx/gpu.cpp
5.3203425MHz pixel clock
5.3203425MHz / 340.6 dots per line = 15.62050058kHz horizontal rate
15.62050058kHz / 314 lines = 49.7468171566849 Hz

Based on no$psx docs

source

(256x240)
5.32224MHz pixel clock
5.32224MHz / 341.3 dots per line = 15.5940228kHz horizontal rate
15.5940228kHz / 263 lines = 59.2928625619 Hz

5.32224MHz pixel clock
5.32224MHz / 340.6 dots per line = 15.626071638285378kHz horizontal rate
15.6260716kHz / 314 lines = 49.76455935 Hz

It’s not that libretro/RetroArch can’t handle the refresh rate changes, but that it’s referenced several places in the codebase and is macroed, so it needs to be demacroed and put somewhere where the rest of the files can find it.

I’ve tried to do that in my fork, if you want to build it and see if that fixes anything:

I haven’t gotten to test it all, just made sure it builds. It could immediately segfault or something /shrug

EDIT: it seems to run at the proper 59.826~ framerate for NTSC but it’s not changing to 59.94 when interlaced content is loaded.

Indeed, it’s now at the progressive rate by default, but never switches rate on interlaced content. This can be seen on the display statistics screen (not sure if that switches dynamically?) but also on soundbuffer depletion when having interlaced content run for longer time. It rebalances properly to 50% buffer again when progressive content is running for longer.

Maybe @Alphanu has an idea why the rate doesn’t switch with your code? His CRT project should benefit from proper refresh rates switching too.

So, hz is not one of the detection methods to switch. This is because hz dont change in one resolution. This could be incorperated but it may cause slow and jarring resolution switching.

I would say that reason this is not happening at this point is because the new frequency is set after the CRT Switchres core has reserved the resolution. What needs to be done here is have the hz change just before the resolution or at the same time.

1 Like

If it’s like 99% of the library I think it’s fine, otherwise I pretty much would prefer to inject a fixed rate as a core setting. Continuous modeline switching is totally undesired. Looking forward to test it #509

Here’s a list of interlaced games (480i) which would require the 59.940 framerate to play at correct speed. The rest (98.60%) would play at 59.826 (menus might switch to interlaced 480i).

Hi all, first off a huge thanks to Alphanu for working on SwitchRes–it’s an amazing piece of code that has taken retro gaming to a whole new level.

I’ve been reading through this post for some time and finally got around to setting up a SwitchRes configuration myself. I can confirm the issue rafan was experiencing–RetroArch needs to be set as the main display using a progressive resolution (I’ve been using 2560x240 on my PVM) for switching to happen.

What’s really tough is making this work with a frontend where ideally you would have both screens running seamlessly. Every time you launch LaunchBox the window needs to be resized and moved over.

I can also confirm the other issue with the PSX core needing to be D3D11 but also it needs to be set in software mode…I was getting a blank screen with hardware mode (using Beetle PSX HW). Once I set my PVM to be the main monitor, it cleared up many other issues I’ve seen others having (e.g. crackling from vsync, weird scaling).

One thing that is still eluding me is super resolutions for some of the handheld systems: Game Boy, Game Boy Color, Wonderswan, Neo Geo Pocket, Lynx, DS, PSP…what are some recommended super resolutions to display those correctly? Any time I try to inject a super resolution lower than 200 it gets rejected by CRT Emudriver–I’ve tried static and dynamic with no luck.

Thanks!

This is an old topic, but seems like this is still a problem a year later and the thread already has a lot of background info in it, so I figured replying to it would be best.

Current Retroarch stable and nightly builds both are confusing which monitor it should switch resolutions for.

I have a setup with a modern LCD display on DVI and a TV on VGA (crt emudriver). VGA is set up such that it has 640x480(interlaced) and 2560x240 (and similar) super resolutions available.

If the LCD is enabled in windows, even if retroarch is full-screen on the TV, it will attempt to change the LCD resolution instead of the TV. When viewing the resolution list, it lists the available LCD resolutions and not the TV ones. If I disable the LCD in windows before launching retroarch then it works, listing the 2560x resolutions and switching the CRT res properly when they’re selected.

Hi @Modoh

CRTSwitchRes for RetroArch was never designed to work in a dual monitor environment. However, there are ways to get it working.

The simple and easy fix it to set you CRT to the primary monitor. All though this is not ideal for some people. There are simple scripts out there that you can run to make these changes for you. So you can switch your LCD back to primary when you have finished playing RetroArch.

The functionality to check all connected display. Switching only the one with resolutions will be added at some point in the future.

1 Like