Freeplay CM4
tldr; It is possible to use a CM4 Lite (no eMMC) with an adapter board on the Freeplay CM3. The process involves using a fresh Retropie image and manually installing the changes required from the Freeplay-Support repo on top of it. The CM4 will not fit inside the GBA so a few mods to the case are also needed. Finally, the adapter board I used does not connect the pins required for the "L2R2 Dual Analog (4 ADC) Add-On Board" so individual wires must be rerouted in order for the analog joysticks and L2 and R2 to work. A low profile heatsink fits if it's carefully sanded off. 

The purpose of this post is to log my progress while I try to connect a CM4 Lite (no eMMC) to my Freeplay

So far I was able to make a fresh retropie image (buster) boot up on the Freeplay. There seems to be something missing that keeps sending current to the pi after holding the switch for 5 seconds.

I manually installed everything that's in the script that's in Freeplay-Support repo but it still won't stay on. And I found the script that does it when shutting it down but nothing similar for turning it on.

Any help would be greatly appreciated Smile

Attached Files Thumbnail(s)
The part that keeps it running once the system boots up is in the config.txt file.


That's to use GPIO21 to hold the power on when the OS is running.

I'm attaching a photo of the "Gumstix" adapter we used.  We had to modify it to use the SD card (instead of eMMC), but maybe yours doesn't need that.

I found the one you have on AliExpress.  Parts of it look like a clone of the Gumstix board, but some seems different.  

What SD image are you using, by the way?  You would likely want to use one from us.

Card Fighters' Clash 2 English Translation ( )
Neo Geo Pocket Flash Cart and Linker Project ( )
Avatar art thanks to Trev-Mun ( )
Thanks, Flavor! that worked!

I was also going to get the Gumstix but I found this board that would work with the CM4 lite without any modifications.

I couldn't find an image for the CM4 in the google drive, the ones shared for the CM3 wouldn't work so I started from scratch and downloaded a fresh image from (the one for the Pi4/400) and ran your script (Freeplay-Support/ on top of it.

I am now trying to figure out why the FBCP doesn't work. By using the default 'fbcpOld.service', I see errors in the daemon.log:

fbcpOld.service: Main process exited, code=exited, status=255/EXCEPTION
fbcpOld.service: Failed with result 'exit-code'.

I tried stopping the service and then running other options through ssh (fbcpFilled, fbcpCropped, etc) but all I got were lines like in the picture. (HDMI works fine though). Unsure if these should work with the CM4 or not.

Attached Files Thumbnail(s)
I think that fbcp should work. There are 2 versions of it.

This one is unoptimized, but it should work just about anywhere.
Take a look at the install script at and notice that it uses a .dtbo that needs to be copied in and added to config.txt
It also has a file called /boot/freeplayfbcp.cfg that it reads for configuration parameters.

You might want to look over and see the

The speed could be turned down if you're having problems. It's possible that the adapter board introduces noise/delays that might not play well with the speed setting.

You could also just grab the dtbo with this command.
sudo wget --output-document=/boot/overlays/waveshare32b.dtbo

In fact, you should take a look at to get a better idea of what all goes into the Freeplay SD .img.

After having said all that, I would assume that the SD image you tried before didn't work because the base Raspbian (it was built on) didn't include CM4 support. I have released a newer SD image that MAY just work for you. Check for "Freeplay_CM3-and-Zero2_Test_22061501.img.gz" and see if that just works.

Oh, and, I said there were 2 FBCP versions.
The other (very optimized) version is at and I would suggest reading/discussing things more there if you can't get it to work. They allow tuning the speed in different ways.

The other place to investigate is which contains some pre-built binaries of the juj fbcp-ili9341 and some install scripts.

I hope that all helps. I'm betting that the new SD image works, but I dunno.
Card Fighters' Clash 2 English Translation ( )
Neo Geo Pocket Flash Cart and Linker Project ( )
Avatar art thanks to Trev-Mun ( )
Thanks, Flavor! I feel like I'm getting closer

I started with my current retropie image (the one downloaded from and noticed that the dtoverlay for waveshare32b was only under the pi0, pi2 and pi3 filters. I copied it directly from the file in the repo (the actual config.txt file has it correctly under the `all` filter) but unfortunately there's still no image, the program no longer crashes and I don't see issues in daemon.log but the screen is still white on any of the fbcp options. Perhaps there's a speed or a DMA channel that's not supported in Buster?

I then flashed the suggested image (Freeplay_CM3-and-Zero2_Test_22061501.img.gz) and I saw that FBCP works fine. There's an image on the screen and through HDMI. The resolution is too high for me to be able to read anything but I see things on the screen. Unfortunately, emulation station will fail to start with this image.

If I ssh into it and try to execute emulation station manually it throws the following error:

* failed to add service - already in use?

Should I try to use a different version of emulation station on top of this image or would it be better to try to make FBCP work on the retropie image where emulation station works fine? hehe
Here's what I would try (with HDMI plugged in):
Boot up Freeplay_CM3-and-Zero2_Test_22061501.img.gz (maybe make a video or photos of how it looks) Where does it leave off?
SSH in and run 'ps aux | grep emul' That should show if emulationstation is actually running in the background or something.
If it is already running, kill it.
Run 'emulationstation' on the ssh command line. What do you see on the SSH window, the LCD, and HDMI?

You said "emulation station will fail to start with this image." Sometimes it's hard to tell if emulationstation is failing or if fbcp crashes. When fbcp crashes, the LCD will just stay "stuck" at the last screen, so it can seem like emulationstation failed. If you have HDMI connected, then you can better tell what's going on.

Also, you said that the HDMI resolution is too high but you see things on the screen. I'm wondering what that looks like. I don't think I've seen that. If the resolution is too high, fbcp may be having problems, as it copies the HDMI output to the LCD. It should be forcing the HDMI output to 1024x768 (IIRC offhand). That shouldn't be "too high," so I'm wondering what's wrong here.
Card Fighters' Clash 2 English Translation ( )
Neo Geo Pocket Flash Cart and Linker Project ( )
Avatar art thanks to Trev-Mun ( )
Oh my bad! here are more details:

When using the Pi4/400 image (where emulationstation starts correctly) I see the emulationstation process in ps but the following in dmesg for fbcp:

pi@retropie:~ $ dmesg | grep fb
[    1.103874] simple-framebuffer 3eb7c000.framebuffer: fb0: simplefb registered!
[    5.211647] fb0: switching to vc4drmfb from simple
[    5.463984] vc4-drm gpu: [drm] fb0: vc4drmfb frame buffer device
[    5.979534] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[    5.983522] fb_ili9340: module is from the staging directory, the quality is unknown, you have been warned.
[    5.984365] fb_ili9340 spi0.0: fbtft_property_value: buswidth = 8
[    5.984394] fb_ili9340 spi0.0: fbtft_property_value: debug = 0
[    5.984416] fb_ili9340 spi0.0: fbtft_property_value: rotate = 270
[    5.984447] fb_ili9340 spi0.0: fbtft_property_value: fps = 60
[    5.984473] fb_ili9340 spi0.0: fbtft_property_value: txbuflen = 32768
[    6.305863] graphics fb1: fb_ili9340 frame buffer, 320x240, 150 KiB video memory, 32 KiB buffer memory, fps=100, spi0.0 at 80 MHz

When I'm using the CM3/Zero2 image, emulationstation fails to start both at boot up and when I run it manually either from ssh or if I plug in a keyboard to try to run it from the same user session (it throws the error mentioned above and goes back to the prompt). I don't see any process running for emulationstation and this is what I see in dmesg for fbcp:

pi@retropie:~ $ dmesg | grep fb
[    1.103198] simple-framebuffer 3eb7c000.framebuffer: fb0: simplefb registered!
[    4.937840] fb0: switching to vc4drmfb from simple
[    5.229719] vc4-drm gpu: [drm] fb0: vc4drmfb frame buffer device

Thanks again, Flavor

Attached Files Thumbnail(s)
If I had to guess, the Pi4 image maybe uses
and I think that does not use dispmanx which the fbcp relies on.  If you have that dtoverlay line in the config.txt, you may want to comment it out and use this instead

In fact, I think you may want to try to force a different HDMI resolution for testing purposes.

Try adding these lines to that Pi4 image's config.txt file (in addition to changing vc4-kms-v3d to vc4-fkms-v3d).

hdmi_cvt=320 240 60 1 0 0 0

I would guess that MIGHT help the built-in LCD, but your HDMI will likely fail after that.  If so, try some different values for hdmi_cvt like
hdmi_cvt=640 480 60 1 0 0 0
hdmi_cvt=1024 768 60 1 0 0 0

OR switch to what we would use in the Zero/CM3 image.

hdmi_force_hotplug=1  #these HDMI lines will try to set up 1024x768 (you can remove them if you have problems playing via HDMI)
hdmi_drive=1          #Normal DVI mode (No sound) (2 for HDMI with sound)
Card Fighters' Clash 2 English Translation ( )
Neo Geo Pocket Flash Cart and Linker Project ( )
Avatar art thanks to Trev-Mun ( )
The DRM I see for the pi4 was already `vc4-fkms-v3d`

Using the hdmi mode and resolutions did not break hdmi just reduced the hdmi resolution, but still nothing was shown on the screen

This is the config.txt I have so far, perhaps you can spot an obvious mistake I made

# For more options and information see
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border

# uncomment to force a console size. By default it will be display's size minus
# overscan.

# uncomment if hdmi display is not detected and composite is being output

# uncomment to force a specific HDMI mode (this will force VGA)

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display

# uncomment for composite PAL

#uncomment to overclock the arm. 700 MHz is the default.

# Uncomment some or all of these to enable the optional hardware interfaces

# Uncomment this to enable infrared communication.

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)

# Enable DRM VC4 V3D driver on top of the dispmanx display stack


hdmi_force_hotplug=1  #these HDMI lines will try to set up 1024x768 (you can remove them if you have problems playing via HDMI)
hdmi_drive=1          #Normal DVI mode (No sound) (2 for HDMI with sound)
#Freeplay Zero
#Freeplay CM3
dtparam=i2c1_baudrate=400000 #makes a big speed difference
#Sometimes we test with Pi2
# Disable the ACT LED on the Pi Zero.
dtparam=watchdog=on # Enabling watchdog.
# remove # from following 2 lines to turn wifi and bluetooth off (if not needed, can Speed Up Pi Zero W)

dtparam=i2c1_baudrate=400000 #makes a big speed difference
Weird update:

I tried manually running the different options I had in the FreeplayILI9341 directory and I noticed all of them would crash with a DMA colllision error except for the `fbcpZeroNoDMA` option. Even though this version wouldn't crash immediately, I still wouldn't see anything on the screen.

A while ago I compiled my own version to be able to play N64 games that randomly had DMA collisions as well ( Using this version gave me an image on the screen but it was very buggy. It will show artifacts, invert colors and sometimes it just goes back to not showing anything on the screen.

This is what I saw in the prompt while running the custom version (until closing it with ctrl+c):
pi@retropie:~ $ sudo ./fbcpFilledN64
bcm_host_get_peripheral_address: 0xfe000000, bcm_host_get_peripheral_size: 25165824, bcm_host_get_sdram_address: 0xc0000000
BCM core speed: current: 266666666hz, max turbo: 500000000hz. SPI CDIV: 6, SPI max frequency: 83333333hz
Initializing display
Resetting display at reset GPIO pin 27
Creating SPI task thread
InitSPI done
Relevant source display area size with overscan cropped away: 1024x768.
Source GPU display is 1024x768. Output SPI display is 320x240 with a drawable area of 320x240. Applying scaling factor horiz=0.31x & vert=0.31x, xOffset: 0, yOffset: 0, scaledWidth: 320, scaledHeight: 240
Creating dispmanX resource of size 320x240 (aspect ratio=1.333333).
GPU grab rectangle is offset x=0,y=0, size w=320xh=240, aspect ratio=1.333333
All initialized, now running main loop...
^CSignal SIGINT(2) received, quitting

Could this be something fixable by reducing the speed in the dtoverlay?

Can DMA be configured/disabled through freeplayfbcp.cfg? or would I need to recompile all of them?

Attached Files Thumbnail(s)

Forum Jump:

Users browsing this thread: 1 Guest(s)