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

  1. What we need
  2. Assembly
  3. Board Layout
  4. Quick install for Raspbian / Raspberry Pi OS based Systems
  5. Manual Installation
  6. Resolution Setup
  7. Retropie
  8. Retropie CRT Edition
  9. RGB-Pi
  10. Recalbox

What we need


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:

curl https://www.osaelectronics.com/get/rgberry_pi.sh | bash

 

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.

    • 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
      hdmi_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=10,i2c_gpio_scl=11
    • Go to the end of the file and add the following lines (for Pi 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=10,i2c_gpio_scl=11
    • Now reboot
      sudo reboot
    • 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.

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

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.

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
    • 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!

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.

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.

***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=10,i2c_gpio_scl=11
    • 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.

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=10,i2c_gpio_scl=11
    • 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.

Alternatively, HERE(Pi4/400) or HERE(Pi3) 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!

7 thoughts on “RGBerry Quick Start Guide

    • Oriol Sanchez says:

      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.

  1. Blaine says:

    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!!!

    • Oriol Sanchez says:

      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.

  2. Blaine says:

    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.

    • Oriol Sanchez says:

      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.

    • Oriol Sanchez says:

      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:

Leave a Reply

Your email address will not be published.