I got my hands on an old CRT computer monitor (VGA, 31 kHz) this past weekend and wanted to play around with pushing out native-res, “240p” signals from RetroArch.

RetroArch doesn’t have any built-in resolution switching capabilities, but we can use the operating system’s built-in tools to handle the task. In Windows, that means using CRT_EmuDriver and a compatible GPU, while in Linux we can use xrandr from the desktop environment. You can also theoretically force resolutions via KMS, but I haven’t had any luck getting it going.

Since I’m running Ubuntu 14.04 (Trusty Tahr, LTS), I could add my custom resolution modelines to my xorg.conf and then choose between them before launching a game, but instead I am using launch scripts that add and set the desired mode at runtime. So, on my desktop, I have a little bash script that reads like this for SNES (EDIT: forgot a couple of things):

#!/bin/bash
xrandr –newmode “snes” 5.979 320 332 368 380 240 242 246 263 +CSync
xrandr –addmode DVI-0 snes // replace DVI-0 with your active display; you can find it from ‘xrandr -q’
xrandr –output DVI-0 –mode snes
wait 5 // this will ensure that RetroArch doesn’t launch before the screen fully switches resolution
retroarch –menu –fullscreen -c ~/.config/retroarch/snes.cfg \  // points to my pre-configured SNES controls 🙂
&& xrandr –output DVI-0 –mode 1024×768 // this will take us back to a normal resolution upon exiting RA

Notice that the last line only goes off once RetroArch closes, since it’s hooked to the launch command with ‘&&’.

RGUI automatically scales to the resolution and looks great. Oddly enough, I had to set my in-game aspect ratio to 16:15 to get everything to map up properly. Regardless, the results speak for themselves (these pictures are huge; click to check out the glorious full-res shots):

Super Mario World, native resolution, unfiltered.

 

Super Metroid looking lovely.

The only problem I have right now is that RA is detecting a refresh rate of ~47 Hz instead of ~60, for some reason, so it’s playing a bit slowly/jumpy. I can get a normal game speed by turning on the ‘threaded video’ option, but that’s suboptimal and leads to jerky scrolling. Regardless, this is a good start and I’ll be working with Squarepusher to iron out the current issues. If anyone has any experience forcing resolutions in KMS, please leave a comment or drop by IRC at Freenode – #retroarch.

You can use the same process with arcade games, you just have to replace the script’s modeline with one that corresponds to the game’s native resolution.

5 thoughts on “RetroArch and 240p

  1. Nice….

  2. If you disable windowed_fullscreen option in config, RetroArch can mode switch for fullscreen in X11 just fine 🙂

  3. I’ve forced 240p resolutions with Winmodeline on XP, it looks great provided I turn sharpness down.

    I don’t quite understand the Xorg Snes mode you have there – why 320 instead of 256?

  4. Clearly the only thing missing in Retroarch: the resolution switching. If it was possible, that would just make it the best emulator for lcd AND crt!

  5. It is possible to set resolution of Retroarch running in CLI on Raspberry Pi?
    It seems that it ignores framebuffer and fbset options.

Comments are closed.