Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Switchres in RetroArch generating off-center modelines?  (Read 2618 times)

0 Members and 1 Guest are viewing this topic.

chinagreenelvis

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 21
  • Last login:May 26, 2025, 12:51:05 am
Switchres in RetroArch generating off-center modelines?
« on: June 17, 2024, 04:28:41 pm »
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: [Select]
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

I added in the following modelines:

Code: [Select]
"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

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

Code: [Select]
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

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: [Select]
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



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: [Select]
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



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!
« Last Edit: June 17, 2024, 04:31:59 pm by chinagreenelvis »

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7461
  • Last login:May 23, 2025, 06:07:25 am
  • Quote me with care
Re: Switchres in RetroArch generating off-center modelines?
« Reply #1 on: June 21, 2024, 12:07:55 pm »
Hi chinagreenelvis,

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: [Select]
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


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).
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

chinagreenelvis

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 21
  • Last login:May 26, 2025, 12:51:05 am
Re: Switchres in RetroArch generating off-center modelines?
« Reply #2 on: June 24, 2024, 11:19:41 pm »
So for some reason, your custom crt_range isn't being considered.

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...