For a general purpose PC CRT, you can pretty much do this:
[ul]
[li]Create custom resolution mode with the GPU driver’s custom resolution tool, or use Custom Resolution Utility if you want to use an EDID override. When you create the resolution resolution mode, the horizontal refresh in KHz must be within your monitor’s limits, so mind the vertical refresh rate and vertical resolution (e.g. 320x240 60Hz (15KHz) won’t work on a 31KHz+ PC CRT). Horizontal resolution only matters as far as the pixel clock limits of your video card go, so you actually drive it sky high without any complaints from the CRT . The ideal modes to use are 3840x480 60Hz or 3840x240 120Hz, either should work on most PC CRTs made since the 90s, and the high horizontal resolution will make them as general purpose as possible by allowing games that use different horizontal resolutions to scale losslessly.
[/li]
[li]In order for RetroArch to actually use the resolution, it must be configured to do so. The most important settings for doing this are the video_fullscreen_x, video_fullscreen_y, and video_refresh_rate, because those are used to set the video mode when using non-windowed fullscreen (i.e. when video_fullscreen is true and video_windowed_fullscreen is false); the fullscreen x/y settings are not exposed in the menu so you’ll have to edit or add them to your config file. With the superwide 3840 width modes listed above, you will also need to set the video_aspect_ratio to a value that makes it stretch to the full length of the video mode (x resolution divided by y resolution will do it), and set the aspect_ratio_index to 19 so the “Config” aspect ratio is used. The RGUI menu driver is the only one that will display correctly in this manner, so it should be used over XMB or GLUI. So if you use 3840x480 60Hz, your config file would need the following to start up in that display mode:
[/li]
video_fullscreen_x = 3840
video_fullscreen_y = 480
video_refresh_rate = 60.0
video_aspect_ratio = 8.0
aspect_ratio_index = 19
video_fullscreen = true
video_windowed_fullscreen = false
menu_driver = rgui
[li]If you want an optimal image, you’ll want to use pixel shaders that will interpolate horizontally, allow color adjustments, and/or blank out doubled lines. The shader presets in shaders_cg/cgp/tvout+interlacing will do this for 480p modes, with the simplest one being tvout+interlacing.cgp. The other presets in that folder have extra things like NTSC effects or dither pattern removal. If you are using a 240p mode, use the shader presets in shaders_cg/cgp/tvout instead which omit the interlacing shader. You can either load the shader preset in the menu using Load Shader Preset, or set video_shader to the path of the shader preset in your config file. The shader presets have settings for “signal resolution” (horizontal blur), colors, and other things like overscan cropping that you can adjust by going into Preview Shader Parameters which take effect instantly and Menu Shader Parameters which take effect when you use Apply Shader Changes and are saved into a working shader preset.
[/li][/ul]
When you have this set up, RetroArch should start up using your configured display mode with the selected shader, which will result in output that is 240p and will switch to 480i when needed.
Some extra considerations for CRT monitors:
[ul]
[li]If you choose to use a 120Hz mode, you will want to either use Black Frame Insertion or Vsync Swap Interval 2 (but not both), and set video_refresh_rate to 60. On the Windows version of RetroArch, either of those settings being enabled will automatically double the configured refresh rate before setting the video mode, which is done because the refresh rate setting is also used for audio synchronization. Black Frame Insertion will darken the image by 50% but will eliminate visible frame duplication and bring motion quality equal to that of 60Hz output, which can be doable if the CRT has enough brightness. On the other end, perfect frame doubling is achieved by using Vsync Swap Interval set to 2, so that Vsync swaps occur twice per frame. It is not recommended to use video_refresh_rate at 120.0 with both options disabled since that will disable audio synchronization due to the large timing skew needed to sync 60Hz games to 120Hz with no frame doubling, resulting in stuttering.
[/li][li]The video_refresh_rate setting can be set to a fractional number, but it will be rounded up when RetroArch chooses the display mode on Windows. You can create display modes in Windows with fractional vertical refresh rates but they will be reported as a whole number in the OS, so that is somewhat of a limitation. Linux xrandr modelines don’t have this limitation, from what I understood. RetroArch also uses the video_refresh_rate setting to synchronize the game’s refresh rate to your display’s refresh rate by resampling the game’s audio rate, it works best when you use the value reported by the Estimated Monitor Framerate after 2048 frames for an accurate sampling. If you are fine tuning the vertical refresh in your modeline, then you probably already know that value anyway.
[/li][li]Overscan cropping may need to be disabled in some cores for best results on CRTs, most cores these days are using core options for overscan cropping instead of the global “Crop Overscan” option. You can also use shaders to crop overscan, but it can only be done losslessly on the horizontal axis if using superwide display modes; lossless vertical cropping would require using the monitor’s physical controls.
[/li][li]You can create multiple configs or use per-core/per-game overrides to set different display modes for different situations. I generally use per-resolution configs in the config folder that can be hotswapped at runtime with the Load Configuration option or with a shortcut that uses --config commandline switch. Windows probably has a limit on the number of display modes that can be defined in the driver, so be careful about creating too many. From what I’ve read, Nvidia is limited to 30 custom modes, and AMD/ATI is limited to custom 60 modes with unmodded drivers.
[/li][li]Using 480p with inserted lines or 120Hz 240p with black frames will cut display brightness by 50%. You will probably want to use a CRT monitor that has an option to increase brightness without affecting black levels, by either increasing the color intensity to maximum or having a CRT that offers a SuperBright setting like the NEC Diamondtron.
[/li][/ul]
For the CRT resolution configs that I use, they’re all based on this template which includes all settings needed to run out of the box (for the Windows version at least) and can be quickly modified for a new resolution. Suggested timings for the 3840x480 60Hz mode can be seen here