Introduction
This guide contains all the information you will need to run the OSA Electronics RGBerry boards. WIP, we will add more OS compatibility by request.
Summary
- What we need
- Assembly
- Board Layout
- Quick install for Raspbian / Raspberry Pi OS based Systems
- Manual Installation
- Resolution Setup
- Retropie
- Retropie CRT Edition
- RGB-Pi
- Recalbox
What we need
- Raspberry Pi A+/B+/2/3/3B+/4B/400/5B or other with the 40-pin connector
- RGBerry SCART or RGBerry SMA
- A MicroSD Card
- SMA to BNC Cables or SCART to BNC cable or SCART cable
Assembly
For a proper assembly of the RGBerry board together with the Raspberry Pi, follow the next steps to avoid any board damage:
- Make sure to connect it correctly. Video connector(s) should match Pi connectors.
- Make sure all the 40 pins are aligned. Misalignment could cause a board / Pi malfunction or damage it.
Connect it as shown in the image below:
Depending on the type of CRT you have, you will need to connect the RGBerry board in a different way, see some examples:
Board Layout
RGBerry SMA and RGBerry SCART are almost the same, however the board layout is a littlbe bit different, in terms of connections. Please, take a look to the following images for your reference.
RGBerry SCART layout:
RGBerry SMA layout:
RGBerry GPIO use:
Quick Install for Raspbian / Raspberry Pi OS based Systems
Althought RGBerry is more intended for retrogaming use, you can use it on an existing Raspbian/Raspberry Pi OS system installation for other purposes.
To do that, open the Terminal, located on the top left corner:
Then, run the following code from your Raspberry Pi with Internet connectivity:
Follow the steps on the screen until the installation process has completed successfully. You may need to reboot once. After rebooting, everything should work and you should see some image in your CRT!
Manual Installation
If you want to install the driver/files manually into your current OS installation, please follow the next steps.
***IMPORTANT***: Prior editing any file of your system, we suggest you to do a full back up.
- BULLSEYE
- First off, you will need to download this (.dtbo file), and place the file onto “overlays” folder of your OS installation. The easiest way is to place the SD in your computer and drag & drop those files into it.
- Next, go to the terminal in your current OS installation and open the config.txt file. You can also do it with notepad++ at the same moment you copy the above files.
sudo nano /boot/config.txt
-
- Go to the end of the file and add the following lines (for Pi 2/3 only):
# Audio settings audio_pwm_mode=2 disable_audio_dither=1 dtoverlay=pwm-2chan,pin=18,func=2,pin2=19,func2=2 # DPI LCD settings dtoverlay=rgb-pi enable_dpi_lcd=1 display_default_lcd=1 dpi_output_format=6 dpi_group=2 dpi_mode=87 dpi_timings=450 1 26 50 63 240 1 10 1 15 0 0 0 60 0 9600000 1 # I2C settings dtparam=i2c_vc=on dtoverlay=i2c-gpio,i2c_gpio_sda=27,i2c_gpio_scl=26
- Go to the end of the file and add the following lines (for Pi 2/3 only):
-
- Go to the end of the file and add the following lines (for Pi 5/4/400 only):
# Replace dtoverlay=vc4-kms-v3d with dtoverlay=vc4-fkms-v3d # Total amount of GPU memory gpu_mem_256=128 gpu_mem_512=256 gpu_mem_1024=256 # Audio settings dtoverlay=pwm-2chan,pin=18,func=2,pin2=19,func2=2 audio_pwm_mode=2 disable_audio_dither=1 # DPI LCD settings dtoverlay=rgb-pi hvs_set_dither=0x210 dpi_group=2 dpi_mode=87 dpi_output_format=6 dpi_timings=480 1 26 50 63 240 1 10 1 15 0 0 0 60 0 9600000 1 enable_dpi_lcd=1 # I2C settings dtparam=i2c_vc=on dtoverlay=i2c-gpio,i2c_gpio_sda=27,i2c_gpio_scl=26
- Now reboot
sudo reboot
- Go to the end of the file and add the following lines (for Pi 5/4/400 only):
-
- That’s all! You should be able to see something in your CRT screen after reboot.
- BROOKWORM
- First off, you will need to download this (.dtbo file), and place the file onto “overlays” folder of your OS installation. The easiest way is to place the SD in your computer and drag & drop those files into it.
- Next, go to the terminal in your current OS installation and open the config.txt file. You can also do it with notepad++ at the same moment you copy the above files.
sudo nano /boot/firmware/config.txt
-
- Go to the end of the file and add the following lines (for Pi 2/3 only):
# Audio settings dtparam=audio=on dtoverlay=audremap,pins_18_19 # DPI LCD settings dtoverlay=rgb-pi enable_dpi_lcd=1 display_default_lcd=1 dpi_output_format=6 dpi_group=2 dpi_mode=87 dpi_timings=450 1 26 50 63 240 1 10 1 15 0 0 0 60 0 9600000 1 # I2C settings dtparam=i2c_vc=on dtoverlay=i2c-gpio,i2c_gpio_sda=27,i2c_gpio_scl=26
- Go to the end of the file and add the following lines (for Pi 2/3 only):
-
- Go to the end of the file and add the following lines (for Pi 5/4/400 only):
# Replace dtoverlay=vc4-kms-v3d with dtoverlay=vc4-fkms-v3d # Total amount of GPU memory gpu_mem_256=128 gpu_mem_512=256 gpu_mem_1024=256 # Audio settings dtparam=audio=on dtoverlay=audremap,pins_18_19 # DPI LCD settings dtoverlay=rgb-pi hvs_set_dither=0x210 dpi_group=2 dpi_mode=87 dpi_output_format=6 dpi_timings=480 1 26 50 63 240 1 10 1 15 0 0 0 60 0 9600000 1 enable_dpi_lcd=1 # I2C settings dtparam=i2c_vc=on dtoverlay=i2c-gpio,i2c_gpio_sda=27,i2c_gpio_scl=26
- Now reboot
sudo reboot
- Go to the end of the file and add the following lines (for Pi 5/4/400 only):
-
- That’s all! You should be able to see something in your CRT screen after reboot.
You may need to adapt dpi_timmings depending on the screen you are using, please check the next point about how to do it.
Alternatively, HERE(64bit-BROOKWORM) or HERE(32bit-BROOKWORM) you can download a Pi OS image ready to copy into your SD card with the RGBerry setup done.
Resolution Setup
Not all CRT screens are the same. Many brands, many models, many resolutions! In order to make RGBerry work properly with your screen, you may need to tweak resolution settings on your OS. The best way is to try and error until you are happy with the results.
***IMPORTANT***: Prior editing any file of your system, we suggest you to do a full back up.
To make some change, follow the next steps:
-
- Go to the terminal in your current OS installation and open the config.txt file
sudo nano /boot/config.txt
- Go to the end of the file and edit this line as you desire (we have found this one to be the best for our Sony PVM monitors):
hdmi_timings=450 1 26 50 63 240 1 10 1 15 0 0 0 60 0 9600000 1
- Go to the terminal in your current OS installation and open the config.txt file
How does it works? The hdmi_timmings setup is the responsible to handle resolution, H/Vsync and many more, it works as follows:
hdmi_timings=<h_active_pixels> <h_sync_polarity> <h_front_porch> <h_sync_pulse> <h_back_porch> <v_active_lines> <v_sync_polarity> <v_front_porch> <v_sync_pulse> <v_back_porch> <v_sync_offset_a> <v_sync_offset_b> <pixel_rep> <frame_rate> <interlaced> <pixel_freq> <aspect_ratio>
<h_active_pixels> = horizontal pixels (width)
<h_sync_polarity> = invert hsync polarity
<h_front_porch> = horizontal forward padding from DE acitve edge
<h_sync_pulse> = hsync pulse width in pixel clocks
<h_back_porch> = vertical back padding from DE active edge
<v_active_lines> = vertical pixels height (lines)
<v_sync_polarity> = invert vsync polarity
<v_front_porch> = vertical forward padding from DE active edge
<v_sync_pulse> = vsync pulse width in pixel clocks
<v_back_porch> = vertical back padding from DE active edge
<v_sync_offset_a> = leave at zero
<v_sync_offset_b> = leave at zero
<pixel_rep> = leave at zero
<frame_rate> = screen refresh rate in Hz
<interlaced> = leave at zero
<pixel_freq> = clock frequency (width*height*framerate)
<aspect_ratio> = *
*The aspect ratio can be set to one of eight values (choose the closest for your screen):
HDMI_ASPECT_4_3 = 1
HDMI_ASPECT_14_9 = 2
HDMI_ASPECT_16_9 = 3
HDMI_ASPECT_5_4 = 4
HDMI_ASPECT_16_10 = 5
HDMI_ASPECT_15_9 = 6
HDMI_ASPECT_21_9 = 7
HDMI_ASPECT_64_27 = 8
For more information, please check the reference documentation about HDMI Timmings from Raspberry Pi.
HERE you can find a list with multiple configurations depending on the emulator you are using. You can also use THIS online tool for custom resolutions to adjust it to your needs. HERE you can also calculate your timmings.
Retropie
Probably the most famous retro-gaming OS for Pi! However it’s not fully prepared to handle CRT as well as other existing systems.
***IMPORTANT***: Prior editing any file of your system, we suggest you to do a full back up.
Follow the next steps to properly setup the system to work with RGBerry.
-
- Download the latest Retropie image and install it following their installation guide steps: https://retropie.org.uk/download/
- Once installation is done, access to the terminal and run the following script:
curl https://www.osaelectronics.com/get/rgberry_retropie.sh | bash
-
- Reboot and if everything work as expected, you should see now image on your beloved CRT!
Alternatively, HERE(Pi4/400) or HERE(Pi2/3) you can download a Retropie image ready to copy into your SD card with the RGBerry setup done. These images handle automatically resolution change depending on the retro system is used and uses custom theme to match CRTs, so we suggest to download our custom images for a better experience.
*If you like this OS, please contribute to his owner!
Retropie CRT Edition
This Retropie based OS is designed to work specifically with CRT screens, so is a really good choice if you want a better user experience. It’s fully prepared to handle different CRT resolutions on the fly, what makes a perfect deal for playing different emulators. The only con is that it’s only available for Raspberry Pi 2B/3B/3A+/3B+.
***IMPORTANT***: Prior editing any file of your system, we suggest you to do a full back up.
Follow the next steps to properly setup the system to work with RGBerry.
-
- Download the latest Retropie CRT Edition image and install it following their installation guide steps:
https://github.com/krahsdevil/Retropie-CRT-Edition - Once installation is done, you will be prompted and you willl need to select option 2 (RGB-Pi).
- That’s all! The system will reboot, and it will be configured to work with RGBerry automatically! However, in case you missed to select 2nd option when booting, just do the following
sudo nano /boot/config.txt
- Download the latest Retropie CRT Edition image and install it following their installation guide steps:
-
- Copy those lines at the end of the file:
dtoverlay=audremap,pins_18_19 dpi_output_format=6
- Save and reboot, if everything work as expected, you should see now the corect image in your beloved CRT!
- Copy those lines at the end of the file:
Alternatively, HERE you can download a Retropie CRT Edition image ready to copy into your SD card with the RGBerry setup done.
*If you like this OS, please contribute to his owner!
RGB-Pi
Another OS that is designed to work specifically with CRT screens, so it’s also a good choice if you want a better user experience. It’s fully prepared to handle different CRT resolutions on the fly, what makes a perfect deal for playing different emulators. Like the above, it’s available for Raspberry Pi 2B/3B/3A+/3B+/4B/400.
***IMPORTANT***: Prior editing any file of your system, we suggest you to do a full back up.
Follow the next steps to properly setup the system to work with RGBerry.
-
- Download the latest RGB-Pi image and install it following their installation guide steps:
https://www.rgb-pi.com/#os - That’s all! Once the installation is done, everything should work fine as this system is fully working directly with RGBerry.
- Download the latest RGB-Pi image and install it following their installation guide steps:
Alternatively, HERE(Pi4/400) or HERE(Pi2/3) you can download a RGB-PI image ready to copy into your SD card with the RGBerry setup done.
*If you like this OS, please contribute to his owner!
Recalbox
Althought it’s not designed to work specifically with CRT screens, it’s also a good choice if you want a very good retro-OS. It has some configurations loaded for CRTs on the system. Available for Raspberry Pi 2B/3B/3A+/3B+/4B/400/5B.
***IMPORTANT***: Prior editing any file of your system, we suggest you to do a full back up.
Follow the next steps to properly setup the system to work with RGBerry.
PRIOR 8.0.1 VERSION
-
- Download the latest Recalbox image and install it following their installation guide steps:
https://www.recalbox.com/download/stable/rpi - Once the installation is done, go to the monuted SD card on your computer and edit with notepad++ the following file crt-config/rgbpi-config.txt to look like this:
#device=rgbpi audio_pwm_mode=2 disable_audio_dither=1 dtoverlay=pwm-2chan,pin=18,func=2,pin2=19,func2=2 dtoverlay=rgb-pi enable_dpi_lcd=1 display_default_lcd=1 dpi_output_format=6 dpi_group=2 dpi_mode=87 hdmi_timings=450 1 26 50 63 240 1 10 1 15 0 0 0 60 0 9600000 1 dtparam=i2c_vc=on dtoverlay=i2c-gpio,i2c_gpio_sda=27,i2c_gpio_scl=26
- Now, edit this other file /recalbox-crt-config.txt, it should look like this:
#For rgbpi adapter.type = rgbpi
- That’s all! Once the installation is done, everything should work fine as this system is fully working directly with RGBerry. If you need to adapt the resolution to your screen, go here.
- Download the latest Recalbox image and install it following their installation guide steps:
LATER 8.0.1 VERSION
-
- Download the latest Recalbox image and install it following their installation guide steps:
https://www.recalbox.com/download/stable/rpi - Once the installation is done, go to the monuted SD card on your computer and edit with notepad++ the following file crt/recalbox-crt-config.txt to look like this:
#device=rgbpi dtoverlay=recalboxrgbdual-thirdparty,mode6 audio_pwm_mode=2 disable_audio_dither=1 dtoverlay=pwm-2chan,pin=18,func=2,pin2=19,func2=2 dtparam=i2c_vc=on dtoverlay=i2c-gpio,i2c_gpio_sda=27,i2c_gpio_scl=26
- Now, edit this other file crt/recalbox-crt-config.cfg (if it does not exist, create it), it should look like this:
options.es.resolution = 240 adapter.type = rgbpi
- You can change resolution setup using the recalbox main menu, once it works.
- That’s all! Everything should work fine as this system is fully working directly with RGBerry. If you need to adapt the resolution to your screen, go here.
- Download the latest Recalbox image and install it following their installation guide steps:
Alternatively, HERE(Pi5 – 9.2.3) , HERE(Pi4/400 – 9.2.3) or HERE(Pi3 – 8.0.2) you can download a Recalbox image ready to copy into your SD card with the RGBerry setup done.
For more information about custom setup, take a look here.
*If you like this OS, please contribute to his owner!
Hello,
I get a yellow tint with both units I ordered. I have no such issue using the same cables with other equipment. How can I fix this?
Cheers,
Emil
Hello Emil,
I am checking some board of the last batch, just in case, but all work good. May I know your system setup? with 64bitts and Pi 5 still not full compatbile (need some manual tweaks). Please contact me via email.
Thanks!
Oriol.
I played with this some to get things working on my Rasoberry Pi 4B. A couple things I’d like to call out to make the nect person’s efforts easier.
1. It seems this is only supported by 32-bit versions of Pi OS currently.
2. The script referenced in the quickstart for installing on your existing OS has Windows line endings and won’t work as described. Only after comverting the line endings is the sh script executable.
3. The script also breaks with the latest version of Pi OS due to the method of architecture detection. I suggest just skipping it and doing a manual install.
4. comfig.txt is now located at /boot/firmware/config.txt
5. If performing a manual on the Pi 4, watch out for the first line indicating you should REPLACE an existing value in config.txt. The quick start’s instructions tell you to copy/paste on the end of the file, and that is mostly true, except forcreplacing the one indicated value.
Hello,
Letting you know the script seems to have windows style newline endings, which messes up bash?
Doing the curl command errors out with `bash: line 22: $’\r’: command not found`, so I did wget on the script, ran it through dos2unix, and then echo -> piped it to bash, which worked fine
(And by fine i mean it said hardware not supported because it’s a pi 5 I guess)
How does this compare to the recalbox rgb dual hat?
Hello,
It works more or less the same way, just different components and audio filtering. Make your personal choice!
Oriol.
The screen has a yellow tint colour and I can’t understand why
Hello Fabrizio,
It sounds like probably the cable is bad, and some of the channels is not working correctly, looks like missing blue channel. Give a try to another SCART cable.
Best,
Oriol.
Hi, I tried 2 different cables. Crt works perfectly with Wii connected via scart. Any suggestions? Any particular scart to use?
Hello, send me an email thru the website form and I will try to help you, here is a bit difficult.
Oriol.
Hi – do we need anything new or different to the above for PI 5, or should this still work ok? Specifically looking at RetroPie at the moment.
Hello Chris,
Everything will work as usual! I will update the pre-made images with the driver included for Pi 5 in any case, when available.
Best,
Oriol.
You are awesome! I have a 14M2U and a 20M2MDU. I’ll be tuning for both of those today.
If you can share the timmings once your testing is done, that would be great, so other users may find it helpful!
Thank you!
Oriol.
Hey Oriol,
Thank you SO MUCH! That absolutely worked. I’m working with the same 14″ Sony PVM that you are, so my screen looks identical. I’ll do a little dpi tuning but it already looks so much better than running over HDMI converters. Thank you again! 240p Plex and Steam Indie games now!!!
Hello,
You are welcome, I am glad it works now for you! Actually the picture is from a PVM 9L3, but I do have also a 14M2, 1450QM, 14N6, 20N6 and so on.. like more than 20 different CRTs in the office. I will spend some time searching for the best timmings for the ones I have over here and post it into the guide, maybe this will be helpful for someone!
Enjoy your retro configuration!
Oriol.
I’m struggling a bit with setting this up manually. My goal is to have RaspberryOS running on the Pi and outputting to a Sony PVM via SCART. Where I’m at now is that, after configuring the config.txt the Pi will boot up and flash a quick RaspberryOS logo on the CRT for a second then it just goes black. HDMI tuning seems to effect the size of that splash screen but nothing makes it stay on.
Hello!
The new updates of Pi OS makes everything goes wrong with analog output, I don’t know exactly why. the DPI config should be enough but there are some problems with KMS/DRM.
I will investigate it in deep and let you know!
Best,
Oriol.
Hello again,
Just made some changes and now works great, remember to put the rgb-pi overlay onto overlays folder! Then use this modified code on config.txt
# Replace dtoverlay=vc4-kms-v3d with
dtoverlay=vc4-fkms-v3d
# Total amount of GPU memory
gpu_mem_256=128
gpu_mem_512=256
gpu_mem_1024=256
# Audio settings
dtoverlay=pwm-2chan,pin=18,func=2,pin2=19,func2=2
audio_pwm_mode=2
disable_audio_dither=1
# DPI LCD settings
dtoverlay=rgb-pi
hvs_set_dither=0x210
dpi_group=2
dpi_mode=87
dpi_output_format=6
dpi_timings=480 1 26 50 63 240 1 10 1 15 0 0 0 60 0 9600000 1
enable_dpi_lcd=1
# I2C settings
dtparam=i2c_vc=on
dtoverlay=i2c-gpio,i2c_gpio_sda=10,i2c_gpio_scl=11
You will probably need to tweak the dpi_timmings to adapt it to your CRT, but at least it works now: