I’m a big fan of old arcade games and hardware, i did even build a few cabinets myself (among a lot of other related things..) and always wanted to use my CRT TV, used for my retro consoles, as an “arcade monitor” with a Raspberry Pi. Time was missing (and probably motivation), but i did finally take a closer look, and found that it was pretty straightforward from what i have read.
So i ordered a Raspberry Pi 4 for this task as it’s the more powerful device in the family yet (and the same price as an rpi3 for the 2g version), and a Pi2SCART to hook up at my CRT TV. The Pi2SCART use the “vga666” overlay as many other adapter in the wild, so any adapter using the “vga666” overlay will work the same.
After a few days of waiting, i was able to assemble the thing, and do my first testing, just to see a black screen… Of course, i did follow the install instruction before, and i was sure of my steps. After a few research, i discovered that my RGB SCART cable was not fully wired… The next day I was able to find a working SCART cable, and it worked straight away… you’re warned 🙂
Now, to the real problem: i discovered, after some testing and probably like many other, that people were still using the pi3 for this task, because the (f)kms driver doesn’t handle resolution switching as the pi3 does, and it will never support vcgencmd timings commands to do so.
Fine, let’s try to modify the vc4 fkms kernel module to see if we can add/load custom timings (drm modes) to the drm backend! While this seemed to work at a first look (kms/drm apps where able to see the custom modes/timings and create the appropriate framebuffer), the TV resolution was in fact not switching at all… What a lost of time!
But, then, someone from the RGB-Pi team pointed me to a work from “sigmaris” about an “rpi dpi dac” (a dpi bridge, thanks him) for the pi3, which allow the vc4 kms (full kms, not fake kms) driver to correctly recognize the monitor (or the CRT TV in my case). After a very few changes and testing, the (my?) “Holy Grail” was here 🙂
This doesn’t solve the problem with CRT TV (and probably monitors) who doesn’t have an “edid”, so we still only have one possible resolution, or they have to be hard coded in the new vc4-vga666 overlay. The problem was solved by writing a custom mode loader in the rpi-dpidac module.
So, you’ll find below a link to a test version of recalbox (7.1) with the rpi-dpidac module and vc4-vga666 overlay (please, do not ask support to the recalbox team as this is not yet officially supported, but it’s in the work). Please note that the vc4 kms module was also patched to support interlaced modes, so 640x480i is possible!
Here are the steps to enable the dpi dac/bridge in this image, as it’s not enabled by default. You’ll need to modify two files (
/etc/modules.conf) and create your custom timings file (
/boot/timings.txt) which will be used for adding custom resolutions/modes/timings. While “hdmi_timings” are not a thing with the drm/kms driver, i did choose to keep this format as people are used to it (drm_display_mode is used, todo: use drm_display_mode for timings.txt?).
/etc/modules.conf(add the rpi-dpidac module)
/boot/timings.txt(adjust to your needs)
640 0 30 60 72 480 0 22 5 24 0 0 0 60 1 12800000 1 # 640 x 480i 320 1 12 32 44 240 1 6 10 6 0 0 0 60 0 6400000 1 # 320 x 240p 320 1 8 29 47 224 1 10 14 16 0 0 0 60 0 6400000 1 # 320 x 224p 1920 1 152 247 280 224 1 8 7 23 0 0 0 60 0 40860000 1 # 1920 x 224p 1920 1 52 208 260 240 1 6 10 6 0 0 0 60 0 38400000 1 # 1920 x 240p
When using the rpi-dpidac module and overlay, you won’t need the “crt_switch_resolution” stuff and such in retroarch configuration (nor “videomode” in recalbox.conf), just use this sort of configuration:
video_fullscreen = true video_fullscreen_x = 320 video_fullscreen_y = 224 video_refresh_rate = 60 aspect_ratio_index = 23 custom_viewport_x = 0 custom_viewport_y = 0 custom_viewport_width = 304 custom_viewport_height = 224
More information will be added here when i’ll find the time to do so, including direction to build and use the rpi-dpidac on Raspberry OS. In the meantime, you can download a compiled module and overlay on the github releases page.
I hope you’ll now enjoy your Raspberry Pi 4 as much as i (and my son) do! 🙂
2022 update: the recalbox team has now officially integrated my module (and much more)!