Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switchres should use correct monitor type and alter between NTSC and PAL properly #14441

Open
cyberluke opened this issue Sep 26, 2022 · 11 comments

Comments

@cyberluke
Copy link

I found the bug and solution. Switchres is by default using monitor setting: ‘arcade_15’

Which results in this: [INFO] Switchres: Modeline “704x576_50i 15.677190KHz 50.006985Hz” 14.344628 704 733 800 915 576 583 589 627 interlace -hsync -vsync

If you create switchres.ini (from the doc link) and set monitor to ‘pal’ It will use this modeline and it will work: [INFO] Switchres: Modeline “704x576_50i 15.625000KHz 50.000000Hz” 13.531250 704 724 788 866 576 582 587 625 interlace -hsync -vsync

@cyberluke cyberluke changed the title Switchres should use monitor type Switchres should use correct monitor type and alter between NTSC and PAL properly Sep 26, 2022
@cyberluke
Copy link
Author

Mentioned here: libretro/fuse-libretro#137

@cyberluke
Copy link
Author

Documentation here: https://docs.libretro.com/guides/crtswitchres/

@cyberluke
Copy link
Author

@cyberluke
Copy link
Author

@cyberluke
Copy link
Author

Even generic_15, which looks from the settings that it should encapsulate ntsc and pal official timings does not work. You really need to switch between ntsc and pal or generic_15 must have exactly 15.625000KHz 50.000000Hz for PAL

@cyberluke
Copy link
Author

and it is even better to use:
interlace 0

@cyberluke
Copy link
Author

cyberluke commented Sep 26, 2022

monitor "pal", "PAL TV - 50 Hz/625", "4:3"
        crt_range0 15625.00-15625.00, 50.00-50.00, 1.500, 4.700, 5.800, 0.064, 0.160, 1.056, 1, 1, 192, 288, 448, 576

monitor "ntsc", "NTSC TV - 60 Hz/525", "4:3"
        crt_range0 15734.26-15734.26, 59.94-59.94, 1.500, 4.700, 4.700, 0.191, 0.191, 0.953, 1, 1, 192, 240, 448, 480

monitor "generic_15", "Generic 15.7 kHz", "4:3"
        crt_range0 15625-15750, 49.50-65.00, 2.000, 4.700, 8.000, 0.064, 0.192, 1.024, 1, 1, 192, 288, 448, 576

@cyberluke
Copy link
Author

Apart from Arcade support, there should be CRT TV support (such as Sony PVM profile)

  1. when core loads NTSC BIOS, switchres should go to NTSC
  2. when core loads PAL BIOS, switchres should go to PAL
  3. set interlace 0 for emulators using resolution lower that 640x480 enables to calculate and find much much better modeline and now everything is SHARP!!!

This took me two years to figure out, guys. This is definitely a bug.

@cyberluke
Copy link
Author

cyberluke commented Sep 26, 2022

I think another solution would be:
generic_15 and arcade_15 are now the same, which does not make any sense.

arcade_15 has different frequency range than regular NTSC/PAL

generic_15 should encapsulate regular NTSC/PAL frequencies, which it currently doesn't.

Acceptance criteria:
generic_15 profile will use 15.625000KHz 50.000000Hz for PAL resolutions and 15.73KHz 59.94Hz for NTSC

For completness:
PAL modelines:

"240x192_50 15.60KHz 50.00Hz" 4.74 240 248 272 304 192 243 245 312 +hsync +vsync 
"256x192_50 15.60KHz 50.00Hz" 4.99 256 264 288 320 192 243 245 312 +hsync +vsync 
"256x224_50 15.60KHz 50.00Hz" 4.99 256 264 288 320 224 259 261 312 +hsync +vsync 
"256x240_50 15.60KHz 50.00Hz" 4.99 256 264 288 320 240 267 269 312 +hsync +vsync 
"256x252_50 15.60KHz 50.00Hz" 4.99 256 264 288 320 252 273 275 312 +hsync +vsync 
"256x288_50 15.60KHz 50.00Hz" 4.99 256 264 288 320 288 291 293 312 +hsync +vsync 
"256x448_50 15.62KHz 50.00Hz" 5.00 256 264 288 320 448 518 523 625 interlace +hsync +vsync 
"256x480_50 15.62KHz 50.00Hz" 5.00 256 264 288 320 480 534 539 625 interlace +hsync +vsync 
"320x200_50 15.60KHz 50.00Hz" 6.36 320 336 368 408 200 247 249 312 +hsync +vsync 
"320x224_50 15.60KHz 50.00Hz" 6.36 320 336 368 408 224 259 261 312 +hsync +vsync 
"320x240_50 15.60KHz 50.00Hz" 6.36 320 336 368 408 240 267 269 312 +hsync +vsync 
"320x252_50 15.60KHz 50.00Hz" 6.36 320 336 368 408 252 273 275 312 +hsync +vsync 
"320x288_50 15.60KHz 50.00Hz" 6.36 320 336 368 408 288 291 293 312 +hsync +vsync 
"320x448_50 15.62KHz 50.00Hz" 6.38 320 336 368 408 448 518 523 625 interlace +hsync +vsync 
"320x480_50 15.62KHz 50.00Hz" 6.38 320 336 368 408 480 534 539 625 interlace +hsync +vsync 
"320x576_50 15.62KHz 50.00Hz" 6.38 320 336 368 408 576 582 587 625 interlace +hsync +vsync 
"352x240_50 15.60KHz 50.00Hz" 6.86 352 368 400 440 240 267 269 312 +hsync +vsync 
"352x288_50 15.60KHz 50.00Hz" 6.86 352 368 400 440 288 291 293 312 +hsync +vsync 
"352x480_50 15.62KHz 50.00Hz" 6.88 352 368 400 440 480 534 539 625 interlace +hsync +vsync 
"352x576_50 15.62KHz 50.00Hz" 6.88 352 368 400 440 576 582 587 625 interlace +hsync +vsync 
"384x224_50 15.60KHz 50.00Hz" 7.36 384 400 432 472 224 259 261 312 +hsync +vsync 
"384x240_50 15.60KHz 50.00Hz" 7.36 384 400 432 472 240 267 269 312 +hsync +vsync 
"384x252_50 15.60KHz 50.00Hz" 7.36 384 400 432 472 252 273 275 312 +hsync +vsync 
"400x254_50 15.60KHz 50.00Hz" 7.86 400 416 456 504 254 274 276 312 +hsync +vsync 
"512x224_50 15.60KHz 50.00Hz" 9.86 512 528 576 632 224 259 261 312 +hsync +vsync 
"512x240_50 15.60KHz 50.00Hz" 9.86 512 528 576 632 240 267 269 312 +hsync +vsync 
"512x448_50 15.62KHz 50.00Hz" 9.88 512 528 576 632 448 518 523 625 interlace +hsync +vsync 
"640x237_50 15.60KHz 50.00Hz" 12.36 640 664 720 792 237 266 268 312 +hsync +vsync 
"640x240_50 15.60KHz 50.00Hz" 12.36 640 664 720 792 240 267 269 312 +hsync +vsync 
"640x252_50 15.60KHz 50.00Hz" 12.36 640 664 720 792 252 273 275 312 +hsync +vsync 
"640x288_50 15.60KHz 50.00Hz" 12.36 640 664 720 792 288 291 293 312 +hsync +vsync 
"640x480_50 15.62KHz 50.00Hz" 12.38 640 664 720 792 480 534 539 625 interlace +hsync +vsync 
"640x540_50 15.62KHz 50.00Hz" 12.38 640 664 720 792 540 564 569 625 interlace +hsync +vsync 
"640x576_50 15.62KHz 50.00Hz" 12.38 640 664 720 792 576 582 587 625 interlace +hsync +vsync 
"704x240_50 15.60KHz 50.00Hz" 13.60 704 728 792 872 240 267 269 312 +hsync +vsync 
"704x288_50 15.60KHz 50.00Hz" 13.60 704 728 792 872 288 291 293 312 +hsync +vsync 
"704x480_50 15.62KHz 50.00Hz" 13.62 704 728 792 872 480 534 539 625 interlace +hsync +vsync 
"704x576_50 15.62KHz 50.00Hz" 13.62 704 728 792 872 576 582 587 625 interlace +hsync +vsync 

NTSC modelines:

"240x192_60 15.70KHz 59.94Hz" 4.65 240 248 272 296 192 220 223 262 +hsync +vsync 
"256x192_60 15.70KHz 59.94Hz" 4.90 256 264 288 312 192 220 223 262 +hsync +vsync 
"256x224_60 15.70KHz 59.94Hz" 4.90 256 264 288 312 224 236 239 262 +hsync +vsync 
"256x240_60 15.70KHz 59.94Hz" 4.90 256 264 288 312 240 244 247 262 +hsync +vsync 
"256x448_60 15.73KHz 59.94Hz" 4.91 256 264 288 312 448 471 477 525 interlace +hsync +vsync 
"256x480_60 15.73KHz 59.94Hz" 4.91 256 264 288 312 480 487 493 525 interlace +hsync +vsync 
"320x200_60 15.70KHz 59.94Hz" 6.28 320 336 368 400 200 224 227 262 +hsync +vsync 
"320x224_60 15.70KHz 59.94Hz" 6.28 320 336 368 400 224 236 239 262 +hsync +vsync 
"320x240_60 15.70KHz 59.94Hz" 6.28 320 336 368 400 240 244 247 262 +hsync +vsync 
"320x448_60 15.73KHz 59.94Hz" 6.29 320 336 368 400 448 471 477 525 interlace +hsync +vsync 
"320x480_60 15.73KHz 59.94Hz" 6.29 320 336 368 400 480 487 493 525 interlace +hsync +vsync 
"352x240_60 15.70KHz 59.94Hz" 6.78 352 368 400 432 240 244 247 262 +hsync +vsync 
"352x480_60 15.73KHz 59.94Hz" 6.80 352 368 400 432 480 487 493 525 interlace +hsync +vsync 
"384x224_60 15.70KHz 59.94Hz" 7.29 384 400 432 464 224 236 239 262 +hsync +vsync 
"384x240_60 15.70KHz 59.94Hz" 7.29 384 400 432 464 240 244 247 262 +hsync +vsync 
"512x224_60 15.70KHz 59.94Hz" 9.80 512 528 576 624 224 236 239 262 +hsync +vsync 
"512x240_60 15.70KHz 59.94Hz" 9.80 512 528 576 624 240 244 247 262 +hsync +vsync 
"512x448_60 15.73KHz 59.94Hz" 9.82 512 528 576 624 448 471 477 525 interlace +hsync +vsync 
"640x237_60 15.70KHz 59.94Hz" 12.19 640 664 720 776 237 242 245 262 +hsync +vsync 
"640x240_60 15.70KHz 59.94Hz" 12.19 640 664 720 776 240 244 247 262 +hsync +vsync 
"640x480_60 15.73KHz 59.94Hz" 12.21 640 664 720 776 480 487 493 525 interlace +hsync +vsync 
"704x240_60 15.70KHz 59.94Hz" 13.44 704 728 792 856 240 244 247 262 +hsync +vsync 
"704x480_60 15.73KHz 59.94Hz" 13.47 704 728 792 856 480 487 493 525 interlace +hsync +vsync 

@cyberluke
Copy link
Author

I have identified the issue in SwitchRes, including RetroArch dependency SwitchRes and recorded Youtube video.

Here I present the cause as well as solution!

But further development will be probably necessary to provide a better user experience and configuration properties.

https://www.youtube.com/watch?v=Xv5u-JPKDS0

@cyberluke
Copy link
Author

cyberluke commented Sep 30, 2022

These people here (mainly top two comments) might have similar experience. I found it by accident when searching for VGA to Scart (for PS1 modchip PAL60 to JVC 10'' PAL 50Hz) https://www.reddit.com/r/crtgaming/comments/twx0wj/help_how_to_get_240p_out_of_my_vga_to_scart/

User 1
"My advice is to not use CRT SwitchRes. People seem to be always having trouble with it."
User 2
"I got to that conclusion just now, no I can't make CRTSwitchRes work, all it did was mess up the aspect ratio of games in 240p so I completely disabled."

One of them has Sony PVM as well - it is really quite common for retrogaming people, who spend more time with it and go with home setup route (no arcade machine).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant