Software Support > GroovyMAME

Switchres in RetroArch generating off-center modelines?

(1/1)

chinagreenelvis:
Sorry if I'm posting in the wrong place for help but I'm unable to start new topics at the libretro forums yet and it's my understanding that it uses the same implementation of switchres as of version 1.19.1.

I have an RCA TruFlat television connected to a Radeon 5450 through DVI > VGA > YPBPR Converter. Testing out an SNES through coax and a PS2 through component, the screen is horizontally centered. I've noticed that the presets in VMM create off-center modelines both vertically and horizontally, so through a combination of VMM, CRU, and ArcadeOS, I created my own preset for it:


--- Code: ---monitor "TruFlat", "TruFlat NTSC TV", "4:3"
        crt_range0 15740.00-15760.00, 50.00-70.00, 0.635, 7.619, 4.444, 0.381, 0.127, 0.889, 0, 0, 192, 293, 448, 480
--- End code ---

I added in the following modelines:


--- Code: ---"320x240_60 15.75KHz 60.11Hz" 6.30 320 324 372 400 240 246 248 262 -hsync -vsync
"640x480_30 15.75KHz 60.00Hz" 12.60 640 648 744 800 480 492 494 525 interlace -hsync -vsync
--- End code ---

And generated more (for testing) with a custom user-mode.ini:


--- Code: --- 320 x 240 @ 60.000000 240p
 256 x 240 @ 60.000000 nes
 256 x 224 @ 60.000000 snes_genesis
 320 x 224 @ 60.000000 genesis
 400 x 254 @ 54.710000 mk
--- End code ---

Everything is nice and centered for each resolution, almost perfectly. (I don't know if it's the TV or the adapter but I thought it was interesting that I'm able to play a butter-smooth Mortal Kombat in native resolution and refresh on a USA television set!).



If I fire up RetroArch prior to enabling switchres and manually set for 256x240 and load up a NES ROM, I get the desired results. The modeline copied from ArcadeOSD is as follows:


--- Code: ---modeline "256x240_60 15.73KHz 60.04Hz" 5.16 256 264 304 328 240 246 248 262 -hsync -vsync
crt_range 15721.71-15741.71, 50.00-60.00, 1.550, 7.752, 4.651, 0.381, 0.127, 0.890, 0, 0, 240, 293, 480, 586
--- End code ---



However, the moment I turn on switchres using "INI" and "native" (the same crt_range from VMM has been copied into switchres.ini and it has been set to "custom" with no other changes), it completely screws up the modeline:


--- Code: ---modeline "256x240_60 15.65KHz 59.96Hz" 5.18 256 266 290 331 240 242 245 261 -hsync -vsync
crt_range 15639.55-15659.55, 50.00-60.00, 1.931, 4.633, 7.915, 0.128, 0.192, 1.022, 0, 0, 240, 292, 480, 584
--- End code ---



This results in a good chunk of the graphics being shifted off-screen to the right. It's the same with any resolution I've tested, including firing up RA with switchres enabled when the desktop isn't 240p. Am I doing something wrong? If VMM can generate centered modelines from a custom preset, why isn't RA doing the same?

Any help is greatly appreciated!

Calamity:
Hi chinagreenelvis,


--- Quote from: chinagreenelvis on June 17, 2024, 04:28:41 pm ---However, the moment I turn on switchres using "INI" and "native" (the same crt_range from VMM has been copied into switchres.ini and it has been set to "custom" with no other changes), it completely screws up the modeline:


--- Code: ---modeline "256x240_60 15.65KHz 59.96Hz" 5.18 256 266 290 331 240 242 245 261 -hsync -vsync
crt_range 15639.55-15659.55, 50.00-60.00, 1.931, 4.633, 7.915, 0.128, 0.192, 1.022, 0, 0, 240, 292, 480, 584
--- End code ---

--- End quote ---


That modeline is certainly created based on the vanilla arcade_15 preset. So for some reason, your custom crt_range isn't being considered. Make sure you rename crt_range as crt_range0 inside switchres.ini (in other words, replace the "crt_range0 auto" in there with your custom values).

chinagreenelvis:

--- Quote from: Calamity on June 21, 2024, 12:07:55 pm ---So for some reason, your custom crt_range isn't being considered.

--- End quote ---

So I've finally determined that RetroArch is completely ignoring a root-directory switchres.ini file altogether and treating it as the default arcade_15 preset no matter what. Creating core overrides (corename.switchres.ini) and placing those in the proper config directories produces results consistent with what I'm getting from VMM. I've opened up a support ticket for it over at the Libretro GitHub so hopefully someone can figure out what's going wrong - but at least I have it working now after being forced to create a dozen or so override files...

Navigation

[0] Message Index

Go to full version