Freeplay CM4 - Printable Version +- Freeplaytech Forum (https://forum.freeplaytech.com) +-- Forum: Freeplay Zero / Freeplay CM3 / Game Pie Advance (https://forum.freeplaytech.com/forumdisplay.php?fid=24) +--- Forum: Freeplay Zero/CM3 (AKA GPA) Hardware (https://forum.freeplaytech.com/forumdisplay.php?fid=25) +--- Thread: Freeplay CM4 (/showthread.php?tid=5392) |
Freeplay CM4 - smoscar01 - 07-12-2022 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 Full_Install.sh 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 RE: Freeplay CM4 - Flavor - 07-13-2022 The part that keeps it running once the system boots up is in the config.txt file. dtoverlay=gpio-poweroff,gpiopin=21,active_low 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. RE: Freeplay CM4 - smoscar01 - 07-13-2022 Thanks, Flavor! that worked! I was also going to get the Gumstix but I found this board https://geekworm.com/products/cm4-to-cm3-adapter 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 retropie.org.uk/download/ (the one for the Pi4/400) and ran your script (Freeplay-Support/Full_Install.sh) 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: Code: fbcpOld.service: Main process exited, code=exited, status=255/EXCEPTION 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. RE: Freeplay CM4 - Flavor - 07-14-2022 I think that fbcp should work. There are 2 versions of it. This one is unoptimized, but it should work just about anywhere. https://github.com/TheFlav/rpi-fbcp Take a look at the install script at https://github.com/TheFlav/rpi-fbcp/blob/master/install.sh 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 https://github.com/TheFlav/Freeplay-Support/blob/master/config.txt and see the dtoverlay=waveshare32b,speed=80000000,fps=60,rotate=270 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 https://github.com/TheFlav/Freeplay-Support/raw/master/waveshare32b-fp.dtbo In fact, you should take a look at https://docs.google.com/document/d/1jsMiFlVP3VeDBXceNmpgAKqP-99v2K9L3xj09K-zHSQ/edit# 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 https://drive.google.com/drive/folders/0B3u1iTJauWTneXFTTnlPS2M4czg?resourcekey=0-VtDUv32Fl_Ftdwp_RqwzsQ 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 https://github.com/juj/fbcp-ili9341 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 https://github.com/Mootikins/FreeplayILI9341 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. RE: Freeplay CM4 - smoscar01 - 07-14-2022 Thanks, Flavor! I feel like I'm getting closer I started with my current retropie image (the one downloaded from retropie.org.uk/download/) and noticed that the dtoverlay for waveshare32b was only under the pi0, pi2 and pi3 filters. I copied it directly from the README.md 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: Code: * 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 RE: Freeplay CM4 - Flavor - 07-14-2022 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. RE: Freeplay CM4 - smoscar01 - 07-15-2022 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: Code: pi@retropie:~ $ dmesg | grep fb 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: Code: pi@retropie:~ $ dmesg | grep fb Thanks again, Flavor RE: Freeplay CM4 - Flavor - 07-15-2022 If I had to guess, the Pi4 image maybe uses dtoverlay=vc4-kms-v3d 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 dtoverlay=vc4-fkms-v3d 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_group=2 hdmi_mode=87 hdmi_cvt=320 240 60 1 0 0 0 hdmi_force_hotplug=1 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. Code: framebuffer_width=320 RE: Freeplay CM4 - smoscar01 - 07-15-2022 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 Code: # For more options and information see RE: Freeplay CM4 - smoscar01 - 07-15-2022 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 (https://forum.freeplaytech.com/showthread.php?tid=5096). 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): Code: pi@retropie:~ $ sudo ./fbcpFilledN64 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? |