retropie and waveshare 32b?
-
Hey! I just bought a pi 3 and got a 3.2inch screen with it, its a waveshare 32b, I started by installing the img I got with the screen (raspbian-jessie-tft32v2 the one from 2016-02-26), it works great! but now I want to use it on retropie, so I installed retropie v3.7 and followed a guide from adafruit to install it, then another one... and another one after that and each time with a fresh install of retropie but nothing seem to work could anyone help me?
can you install retropie on raspbian jessie or is there a better way? -
Yes, you can put retropie on a jessie install, but it still won't get your tft working with retropie, it won't output to the tft. You need to mirror the framebuffer for that.
With the latest kernels it's a simple setup to get retropie up and running, provided there is a dt overlay for your tft controller. The adafruit guide works for their own pitft screens and all those other cheap tfts with the same controllers, although they can easily use dt overlays which are already built into the latest kernels. It's not a good idea to follow their guide. For reasons best known to adafruit, they lock you in to a proprietary bootloader that you can't ever update/upgrade without killing your setup. (they might have updated their guide now.)
With that being said, luckily your waveshare 32b tft has an overlay written for it, but it's not provided in the install. You'll have to get it copied over. I know there are a lot of outdated and confusing guides scattered all over, and how frustrating it can be to try getting one of these tfts working with retropie, so here's how to get your display set:
have your 32b tft screen plugged into your RPi3 (works with RPi2 too)
start with a fresh retropie sdcard and boot it up, let it do it's thing
when it starts up, make sure you have internet connection
drop to command line, or ssh in, input the following (best to copy and paste);git clone https://github.com/swkim01/waveshare-dtoverlays.git sudo cp waveshare-dtoverlays/waveshare32b-overlay.dtb /boot/overlays/
Note! If you're running the latest Retropie with linux 4.4 kernel or newer (check in terminal
uname -a
), use the following instead;git clone https://github.com/swkim01/waveshare-dtoverlays.git sudo cp waveshare-dtoverlays/waveshare32b-overlay.dtb /boot/overlays/waveshare32b.dtbo
now edit your config.txt
sudo nano /boot/config.txt
and add these two lines to the very bottom;
dtparam=spi=on dtoverlay=waveshare32b
ctrl+x then y then enter
sudo reboot
again quit ES drop to command line, check the existence of your new tft display by typing;
ls /dev/fb*
you should see dev/fb0 /dev/fb1
/dev/fb1 is your tftif you don't see /dev/fb1 you've messed up and need to start over
if all is good, now we get retropie output to your tft;sudo apt-get install cmake git clone https://github.com/tasanakorn/rpi-fbcp cd rpi-fbcp/ mkdir build cd build/ cmake .. make sudo install fbcp /usr/local/bin/fbcp
now to launch fbcp automatically we need to add;
sudo nano /etc/rc.local
Before, the final “exit 0” line, add the following:
/usr/local/bin/fbcp &
ctrl+x then y then enter
sudo reboot
you should now see retropie/ES on your tft screen!
you might need to further tweak orientation, spi speed, fps etc.
i never used the touch screen, not needed for retropie anywaygood luck, have fun and game on.
Edit to add:
If you're using waveshare 3.5" or 4" screens,
using the guide above substitute in the reference towaveshare32b-overlay.dtb
with this line instead:
sudo cp waveshare-dtoverlays/waveshare35a-overlay.dtb /boot/overlays/
But if your linux kernel is 4.4 or newer (check in terminal
uname -a
), use this instead:
sudo cp waveshare-dtoverlays/waveshare35a-overlay.dtb /boot/overlays/waveshare35a.dtbo
then in config.txt, add this instead:
dtoverlay=waveshare35a
-
@senkun please read the documentation for using markdown to format your posts - eg using code blocks etc
-
@BuZz thanks, and done.
-
@senkun thank you so damn much, works now thank you!!!
-
@Zulone said in retropie and waveshare 32b?:
@senkun thank you so damn much, works now thank you!!!
I'm glad it worked out for you! Have fun, and you're welcome ;-p
-
@senkun you are a legend. Been faffing around with this and trying different instructions from all over the place with no success until now.
The only thing that I had to do which isn't in your instructions was to download and unpack LCD-show.tar from the manufacturer in to my home dir and run the appropriate LCD-show relating to my screen, otherwise it would not create /dev/fb1. But now it works and I have a nice little portable emulator to keep in my car (obviously not for when I am driving)
Once again, thank you so much
EDIT: just followed these steps on my live system and didn't have to copy or run the LCD-show files so maybe it was just a problem with my test box!
-
Hey there. Glad you got your screen working. Yeah it shouldn't need lcd-show at all. Maybe your test box is running the latest kernels, i think there might be some changes to how the overlays are named. Should be the same except for the extension i think. Anyway good to know this still works as of June 2016.
-
Hi, i have a screen from Waveshare but its a 4 inch screen, will this work for me?
Please help really struggling here
-
@jamieclare Your best bet is to go to waveshare's site and follow method 1 to install the drivers for the screen. http://www.waveshare.com/wiki/4inch_RPi_LCD_(A)
-
@jamieclare said in retropie and waveshare 32b?:
Hi, i have a screen from Waveshare but its a 4 inch screen, will this work for me?
Please help really struggling here
Yes, absolutely. the guide I posted will work to run Retropie with your 4" screen.
You need to just need to copy over a different overlay as below;Following the guide above, In terminal, use the following lines instead
git clone https://github.com/swkim01/waveshare-dtoverlays.git
sudo cp waveshare-dtoverlays/waveshare35a-overlay.dtb /boot/overlays/
But if your linux kernel is 4.4 or newer, use this instead
sudo cp waveshare-dtoverlays/waveshare35a-overlay.dtb /boot/overlays/waveshare35a.dtbo
Then specify this overlay to the last line in your /boot/config.txt
dtoverlay=waveshare35a
Save and exit, then reboot. Follow the rest of the guide and you're good to go.
tl;dr
Change all waveshare32b references in the guide to waveshare35a -
@glennlake said in retropie and waveshare 32b?:
@jamieclare Your best bet is to go to waveshare's site and follow method 1 to install the drivers for the screen. http://www.waveshare.com/wiki/4inch_RPi_LCD_(A)
I would not advice anyone to do that as it will overwrite configs that one may have, custom or otherwise, in a retropie install.
-
I tried using this method on the pi Zero. I tried 3 times and I can't seem to make fb1 to show up. All I get is fb0. Is there any reason that this does not work on the raspberry pi zero? Oh, minor detail. I setup the pi to connect to my wifi network automatically on boot so I can SSH in to it without using a usb hub for the keyboard and wifi dongle.
I am setting up the screen over ssh if that's any help for more info. I would appreciate any helo I could get.
-
@winnetouch said in retropie and waveshare 32b?:
I tried using this method on the pi Zero. I tried 3 times and I can't seem to make fb1 to show up. All I get is fb0. Is there any reason that this does not work on the raspberry pi zero? Oh, minor detail. I setup the pi to connect to my wifi network automatically on boot so I can SSH in to it without using a usb hub for the keyboard and wifi dongle.
I am setting up the screen over ssh if that's any help for more info. I would appreciate any helo I could get.
assuming you installed the latest retropie and your display is a waveshare 32b;
instead of
sudo cp waveshare-dtoverlays/waveshare32b-overlay.dtb /boot/overlays/
use this line instead;sudo cp waveshare-dtoverlays/waveshare32b-overlay.dtb /boot/overlays/waveshare32b.dtbo
-
@senkun I have a waveshare 3.5inch screen and tried all sorts. Will this work for the screen I have or do I need to change "dtoverlay=waveshare32b" if so do you know what I need to change it to!
-
@rog585 OK.. Here is what I did and I know it works (in fact I just verified it again on my Pi3 this morning). First you need to make sure your RetroPie install works normally with your HDMI monitor and controller. Then go to " https://learn.adafruit.com/running-opengl-based-games-and-emulators-on-adafruit-pitft-displays/3-dot-5-pitft" and follow Phillip's instructions. It should work for you. To make it easier you should SSH into your Pi and then you can just copy and paste from the command line. I hopes this helps. PS. I am using RetroPie 4.0 beta 2.
-
@glennlake I will give it ago, just updating the latest image file with Jessie so I can install retropi for the 18th time haha. Will have a look at this and come back tomorrow with any questions.
Thank you!
-
@glennlake I have followed the instructions but once a reboot I am left with a white screen.
I have used the original image file from the waveshare website which is raspbian on wheezy I have then updated to Jessie using this command line:
update all packages except the bootloader, enter this at the command prompt:
sudo apt-mark hold raspberrypi-bootloader
sudo apt-get update
sudo apt-get upgradeTo update the bootloader:
sudo apt-get install rpi-update
sudo SKIP_KERNEL=1 rpi-updateI then installed retropi and followed the instructions but nothing.
Can you help!
-
@rog585 First I would forget about the waveshare website. Go to the RetroPie website and download the proper image for your Pi. Then make sure your install works and you can play a few games using a normal monitor. Now power down your Pi and install your 3.5 Pitft screen on the GPIO pins of your Pi. Now go to the Adafruit webpage I listed and follow the setup they spell out. Again, the best way is to ssh into your RetroPie and copy and past from their page onto the command line. It eliminates the chance of typos. If you left the HDMI monitor connected you will see an image but it will be distorted.
-
@glennlake Will try, I was using the waveshare for existing drivers for screen. but by the sound of it the adafruit does everything.
Will report back.
Thanks
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.