CRT output on Raspberry Pi
This guide only applies to Batocera v32. Batocera changed to using the Wayland compositor for most SBCs around v33 (differs depending on exact board), which does not support output from the composite port at all.
Using versions v33 and higher may be possible with active HDMI-to-analogue adapters but this has yet to be confirmed.
Batocera does not officially support CRT output on x86_64, but community efforts have made that possible. CRT output from the Raspberry Pi (and other SBCs) is even less official, but again community efforts have made this possible in some scenarios.
Note that since the GPU on the Raspberry Pi does not support lower dot clocks, if attempting to use it directly (such as by using its composite output) you will not have access to particular CRT-related features like switchres, swapping resolutions without rebooting, interlaced output, etc.
The automated script for using CRT on x86_64 does not work for any SBC.
Foreword
It should go without saying, but unlike digital signals, analogue signals and the devices that receive them tend not to have safety limitations on what they are capable of. This can result in breaking displays, blowing old fuses, overheating ancient capacitors, making things catch fire, etc. You should perform adequate research before attempting any of this with your old equipment.The safety of you and your equipment is solely your own responsibility.
It's recommended to read the glossary on the x86_64 to familiarize yourself with the CRT-specific terminology.
Prerequisites
To achieve a native analogue signal on your SBC, the following elements are needed:
- A Raspberry Pi with composite video output (the headphone jack)
- The three-pole A/V composite cable for Raspberry Pi
- A TV with composite inputs
- If using a TV that only has RF input, you will need a composite to RF modulator in addition to the transcoder
- A way to SSH into the Batocera machine (for Windows, PuTTY works fine)
- A way to edit files over the network (for Windows, WinScp and Notepad++ work fine)
If you need the three-pole A/V composite cable:
An Xbox 360E three-pole to A/V composite cable also works for the Raspberry Pi.
It may also be possible to use an active HDMI-to-analogue adapter, however this has yet to be confirmed.
A list of tested DACs by Kuro has been created and adapted by a community member guywith6magikrp to list adapters that have been tested with Batocera. This list is still under construction. https://docs.google.com/spreadsheets/d/15l2xu59ZzRUXuHvtkiI2IGhveLv1gMcB3KOP9EslRaA/edit?gid=0#gid=0
Preparation
All the necessary modifications can be done on the SD card before even turning on the Pi.
If using Windows, remember to use Notepad++ to edit files so as not to corrupt them. The built-in Notepad will corrupt them.
If not already done, flash Batocera to the micro SD card. Then, open up the boot partition on it labelled “BATOCERA” and open the cmdline.txt
file. Add the following to the beginning of the line:
video=Composite-1:720x480@60ie
Save the file (make sure not to accidentally add extra lines/spaces as it may interfere with Batocera booting). Then in that same folder, open config.txt
. Comment out any line that contains hdmi
by adding a #
in front of it.
#hdmi-yadda-yadda
In the main section (not inside any section like [RPI3]
), add the following lines:
max_framebuffer_width=320 max_framebuffer_height=240 framebuffer_width=320 framebuffer_height=240 enable_tvout=1 sdtv_mode=0 sdtv_aspect=1 audio_pwm_mode=2 disable_fw_kms_setup=1 enable_uart=1
Then the Raspberry Pi is set up to output to a CRT display via the composite output. Read the editing files section, and then skip forward to the section about EmulationStation.
RPi does not support switchres or standalone MAME. Hence, any configuration that applies to them would not be applicable to RPi. RetroArch does have its own configuration though.
If after doing this on a Pi 4, you get the menu working but no emulators launch correctly, try using the FKMS driver instead of the real KMS driver.
Under the [pi4]
header, comment out dtoverlay=vc4-kms-v3d-pi4
and uncomment dtoverlay=vc4-fkms-v3d
to do so.
If after doing this on a Pi 3, you get a black screen after the boot logo, try editing this line under the [pi3]
header:
dtoverlay=vc4-kms-v3d
so that it is instead:
dtoverlay=vc4-kms-v3d,composite=1
If having any issues, refer to the x86_64 guide as it has more information, however some behavior on that guide only applies to x86_64.
- batocera-and-crt-rpi.txt
- Last modified: 2 months ago
- by atari