Connect your recalbox to a CRT with HDMI (EN)
WARNING : It's important to have the Recalbox version 4.1 for these changes to work.
To play with your Recalbox on a CRT screen connected in HDMI, you have several choices, depending of the connections on your CRT screen.
- Connection with HDMI using HDMI / VGA and VGA / BNC adapters
- Connection with HDMI using HDMI / VGA and VGA / PERITEL adapters
Connect your Recalbox on a CRT with RGB / BNC input, using HDMI
a lot of professionals CRT has RGB input with BNC plugs, like in this picture in Line 3:
We will have 3 wires for the 3 colors (Red, Green, Blue), as well as 2 wires for synchronization (vertical and horizontal)
- You will need an adapter like this one :
Once connected to the HDMI port of your Recalbox, you will have a VGA output and an audio jack. WARNING : You will need an external micro USB power source, 1A should be enough.
- You will need a VGA ==> BNC adapter like this :
- it's hard to find a VGA / BNC adapter with female BNC output, so i use 5 BNC connectors male / male found in a specialized electronics shop.
Configure the Recalbox boot
The resolutions accepted by this type of screen will not be the same according to the model but in general we want :
- 480i for EmulationStation (my screen don't support 480p, and the text is unreadable in 240p)
- 240p for the games (same output resolution for almost all old game systems)
This is what your file
/boot/config.txt should look like :
To edit this file you need to modify the boot partition by following this tutorial : https://github.com/recalbox/recalbox-os/wiki/Edit-the-config.txt-file-%28EN%29
Access this file with Winscp by following this tutorial : https://github.com/recalbox/recalbox-os/wiki/Network-access-with-WinSCP-%28EN%29
#Resolution of the mode custom DMT 87 HDMI for the games resolution hdmi_cvt=1920 240 60 1 1 0 0 #Ignore the EDID of your TV (the CRT can send wrong informations) hdmi_ignore_edid=0xa5000080 #Force the pixel encoding mode where 2 correspond to Full RGB hdmi_pixel_encoding=2 #Desactivate the safe boot mode avoid_safe_mode=1 #Allow overscan disable_overscan=0 #avoid interférences by boosting the HDMI signal config_hdmi_boost=4 #Force the sound on HDMI hdmi_drive=2 #Select the HDMI CEA group hdmi_group=1 #Define resolution to CEA 6 = 480 interlaced hdmi_mode=6 #Kernel kernel=zImage #Use the HDMI even if no cable is connected hdmi_force_hotplug=1 #Memory config gpu_mem_256=128 gpu_mem_512=256 gpu_mem_1024=512 #Audio config dtparam=audio=on #Delay boot boot_delay=3
The Raspberry pi boot in
hdmi_group=1 hdmi_mode=6, which is 480i (interlaced).
If we boot in 240p, texts and menus would be unreadable.
hdmi_cvt=1920 240 60 1 1 0 0 set a resolution of 1920 x 240 x 60 Hz which will not be used for the boot but will be registered as
DMT 87 HDMI. We will use this later for launching games.
Here some additional details on this line :
hdmi_cvt=<width> <height> <framerate> <aspect> <margins> <interlace> <rb> width width in pixels height height in pixels framerate framerate in Hz aspect aspect ratio 1=4:3, 2=14:9, 3=16:9, 4=5:4, 5=16:10, 6=15:9 margins 0=margins disabled, 1=margins enabled interlace 0=progressive, 1=interlaced rb 0=normal, 1=reduced blanking
recalbox.conf file configuration
Even if the Raspberry pi boot in CEA 6 video mode (in the config.txt) i use this configuration for EmulationStation :
system.es.videomode=CEA 6 HDMI
After we need to define the global resolution for games :
global.videomode=DMT 87 HDMI
All emulators will be launched in DMT 87 HDMI custom mode (1920 x 240 x 60Hz, like defined in the config.txt with the line hdmi_cvt).
About the 1920 pixels :
A CRT screen only need vertical pixels (240 here) and refresh ratel (60 Hz for us). We set 1920 pixels wide because 1920 is a multiple of 160, 320, 384... which are common number in resolution. For the others we need to calculate the overscan with Retroarch, the black borders needed to keep the original ratio.
- You can define a different resolution per game system with this line :
dreamcast.videomode=hdmi_cvt 320 240 60 1 1 0 0
Retroarch Viewport configuration (keep the original ratio)
Per system configuration
When you launch a game, the resolution of320 x 240 x 60 Hz pixels will be set. We can define a resolution per system, the display size and the offset if needed.
You need to create these files in the shared folder :
They must contain the name of the system (same name as in the roms folder), for exemple
Here is my nes config file
aspect_ratio_index = "22" video_smooth = "false" video_scale_integer = "false" video_threaded = "false" custom_viewport_width = "1680" custom_viewport_height = "224" custom_viewport_x = "118" custom_viewport_y = "17"
To set the offset of the screen you need to change the value custom_viewport_x and y, in game with the retroarch menu (Hotkey + B), then copy these values in the system.cfg file.
Here is the viewports width et height i use for my CRT:
nes.cfg custom_viewport_width = "1680" custom_viewport_height = "224" snes.cfg custom_viewport_width = "1792" custom_viewport_height = "224" gb.cfg gbc.cfg gamegear.cfg custom_viewport_width = "960" custom_viewport_height = "144" gba.cfg custom_viewport_width = "1440" custom_viewport_height = "160" megadrive.cfg neogeo.cfg segacd.cfg sega32x.cfg fba_libretro.cfg custom_viewport_width = "1920" custom_viewport_height = "224" mastersystem.cfg custom_viewport_width = "1536" custom_viewport_height = "192" psx.cfg n64.cfg custom_viewport_width = "1920" custom_viewport_height = "240" pcenginecd.cfg custom_viewport_width = "1760" custom_viewport_height = "240"
Per games configuration
For arcade, i use fba_libretro.
Almost each games use a different resolution so i defined one config file per game to keep the original ratio.
Same way than the system part, except for the folder :
The contents of the file is identical than per system. The name of the file need to be inthe form rom.zip.cfg So for exemple : 1944.zip.cfg
To manage the viewports on Nintendo 64 we need to use the retroarch core
Config file will be
n64.cfg and use the same structure than before.
For the Mame arcade games the AdvanceMame core calculate automaticaly the resolution for each games.
So we don't need to configure one file per game, we just need to find a good HDMI timing for our screen.
To be completed.
The theme need to be in 4/3 format. Here is a theme created by Supernature2K: https://forum.recalbox.com/topic/6580/release-wip-theme-recalbox-multi-help-needed
This theme is configurable and is perfect on a CRT.