In this tutorial you will find the best recommendations for configuring the video to fit your screen.
There are three levels of configuration: system, emulator default video mode, emulator specific video mode.
Keep in mind that the screen resolution can have a significant impact on the frame rate, especially with CPU-intensive emulators (N64, PSX and others).
Most of this guide will focus on the HDMI output and will expose as often as possible the 3 cases: Pure HDMI, HDMI to DVI, HDMI to VGA.
First of all, you have to understand the basics of screen resolution: a number of pixels in width by a number of pixels in height at (@) a given refresh rate in Hertz.
For example: 1280x1024@60 which is a common screen resolution of 4x3 for 19" monitors.
Nowadays, TVs all display Full HD (FHD) at 1080p for example, like 1920x1080@60. We won't go through interlaced or progressive modes, that's beside the point. Please refer to your display manufacturer's manual for its native resolution.
There are two groups of video modes: CEA and DMT. All these modes are listed here or here.
Make sure the mode is compatible with your native screen resolution.
A simple rule of thumb: CEA is for TV mode, DMT is for all other modes.
In this tutorial, we will cover 3 cases:
Don't forget to check the tutorial for DVI screens here.
With what you already know about screen modes, these are the most common settings:
At startup, the Pi will ask your monitor for its preferred screen resolution.
Your monitor sends what is called its EDID (Extended Display Identification Data) and the Raspberry Pi selects the screen resolution noted as "preferred".
This is where the very first problem occurs:
Now that you know a little more about what can happen, here are some examples:
Since the screen detected at startup is the one that displays EmulationStation with its preferred resolution, the "720pVGA" will have an ugly display.
Fortunately, this can be fixed by editing the recalbox-user-config.txt
file.
Here are the lines you need to change:
#hdmi_group=1
#hdmi_mode=1
So for our "720pVGA", here is how we modify the recalbox-user-config.txt
file:
hdmi_group=1
hdmi_mode=4
The "#" sign is removed, the technical term for this is "uncommented". A line starting with a # is a comment, not a command:
hdmi_group=1
means CEA
hdmi_mode=4
means 720p
Now that we are done, our 3 screens are set, let's keep going!
Now that EmulationStation is running in full screen, your hand is eager to test a game. The main thing you need to know here is that the screen resolution is changed before launching an emulator.
But to what resolution?
global.videomode
parameter. Its default value is CEA 4 HDMI
. This means that the screen resolution will be changed to 720p just before starting the emulator.It's time to check some examples:
global.videomode
to its native video mode:global.videomode=DMT 35 HDMI
Feeling lucky, want to save yourself a change of screen resolution? By specifying
global.videomode=default
, Recalbox will not change the screen resolution before launching an emulator. But beware: this can have a considerable impact on performance.
Scaling an image from the emulator's native resolution to 1080p can be very CPU intensive and slow down the emulation. It is not recommended to use the default setting if your monitor can display a resolution higher than CEA 4.
Finally, the video mode can be set specifically for the emulator of your choice.
For example, if you look in the recalbox.conf file, you will notice that the n64.videomode
parameter is set to DMT 4 HDMI
, which means we are overriding the global.videomode
parameter for the N64 emulation.
I hope this guide has helped you understand how screen resolution is handled on Raspberry Pi and Recalbox. Feel free to ask questions on the forum or on Discord.
This tool is available on all Raspberry Pi except the Raspberry Pi 3/4.
The tvservice is an excellent tool to diagnose your output:
# tvservice --help
Usage: tvservice [OPTION]...
-p, --preferred Power on HDMI with preferred settings
-e, --explicit="GROUP MODE DRIVE" Power on HDMI with explicit GROUP (CEA, DMT, CEA_3D_SBS, CEA_3D_TB, CEA_3D_FP, CEA_3D_FS)
MODE (see --modes) and DRIVE (HDMI, DVI)
-t, --ntsc Use NTSC frequency for HDMI mode (e.g. 59.94Hz rather than 60Hz)
-c, --sdtvon="MODE ASPECT [P]" Power on SDTV with MODE (PAL or NTSC) and ASPECT (4:3 14:9 or 16:9) Add P for progressive
-o, --off Power off the display
-m, --modes=GROUP Get supported modes for GROUP (CEA, DMT)
-M, --monitor Monitor HDMI events
-s, --status Get HDMI status
-a, --audio Get supported audio information
-d, --dumpedid <filename> Dump EDID information to file
-j, --json Use JSON format for --modes output
-n, --name Print the device ID from EDID
-l, --list List all attached devices
-v, --device Specify the device to use (see --list)
-h, --help Print this information
The most commonly used switches:
tvservice -s
gets the current display information.tvservice -m CEA
or tvservice -m DMT
: list of supported CEA or DMT modes.