Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

Switchres for nonstandard refresh rates on a LCD



  • One of the more interesting, lesser known features of Groovymame is the ability to use nonstandard refresh rates even on a LCD monitor, with any video card and without having to use freesync or gsync.

    The way it works on Windows is that some custom video modes are generated with the video card control panel, keeping the native LCD resolution but with custom refresh rates at 50, 54, 55, 57, 58, 59 and 61 hertz. LCDs only support integer rates. Most can do at least 55hz to 61hz, many even more.

    Upon launching Mortal Kombat for example at 54.7hz Switchres engages the closest available mode on the LCD, 55hz in this case.

    Since the deviation from the correct refresh is never more than half a hertz the speed is right, the scrolling is perfect (arcade-like smooth, not like the juddering mess of 55hz games running at 60hz for example) and the audio stays at the right pitch. It’s the next best thing to the full Switchres on CRT setup, but immensely more practical. All the PAL roms from any system run at the correct speed, etc.

    Is it possible to do the same with Retropie? It does improve the emulation quality immensely. I know it’s possible to boot Retropie at a custom refresh rate, but it needs to be done on the fly for each different game. Advmame can do it on a full CRT setup, but it would be much better to use the Retroarch cores, and on a LCD monitor it should be a lot simpler.


  • Global Moderator

    @Amplifuzz i think so. see https://github.com/raspberrypi/firmware/issues/637

    the retropie runcommand script only supports preset video modes, so i think if you wanted to use per-game custom videomodes, you'd have to get your hands dirty with bash launch scripts.

    the best solution is to use a freesync videocard (ie, a PC), and then i think retroarch will do it all automatically.



  • On a PC it's a solved issue, you can use GroovyMAME for that, and CRT Switchres under retroarch is more advanced. I'd like to do it on a Raspberry Pi with Retropie. There's no variable refresh rate, so freesync is overkill.

    You don't really need a ton of custom video modes, since the resolution stays the same, and you only have seven or so different refresh rates at maximum to deal with. Two config lines like "lcd_native_res=1920x1080" and "lcd_range=50-60" or whatever the monitor supports would cover it.

    I'd take a crack at writing the scripts, but I'm not expert enough. I'm afraid that the whole 'snap to the closest available refresh rate once the native ROM refresh is detected' part is best handled by the emulator itself, as well.


  • Global Moderator

    @Amplifuzz

    You don't really need a ton of custom video modes, since the resolution stays the same, and you only have seven or so different refresh rates at maximum to deal with. Two config lines like "lcd_native_res=1920x1080" and "lcd_range=50-60" or whatever the monitor supports would cover it.

    on groovymame, sure, but raspberry pi only understands discreet videomodes. you have to tell it when you want to use a new videomode. in retropie, using the runcommand, you would have to add each videomode to the list, and when selected they would have to call the api command i linked above (since these aren't videomodes in the raspberry pi's limited list of videomodes)

    I'm afraid that the whole 'snap to the closest available refresh rate once the native ROM refresh is detected' part is best handled by the emulator itself, as well.

    agreed, but for that to happen someone woudl have to update CRT switchres (or something similar) in retroarch such that it can communicate with the pi's custom videocore API calls (see the link above).

    i'm told that you can get crt switch res to work with pi, but only under X. we don't use X in retropie. there's some info on this on the (huge) crt switch res thread over at libretro: https://forums.libretro.com/t/retroarch-native-crt-support



Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.