-
1Step 1
Getting the screen working in retropie
using raspi-config, enable spi, enale ssh, disable overscan
in /etc/modules, add
spi-bcm2835 fbtft_device
in /etc/modprobe.d/fbtft.conf add
options fbtft_device name=fb_ili9163 gpios=reset:25,dc:24 speed=40000000 bgr=1 rotate= custom=1
fps=60reboot and its all done!
-
2Step 2
The screen by default wont actually run retropie on its own. So we need to run some code which copies the current screen into the tft. we need to download and install the code
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 we just need to add into /etc/rc.local (just make sure its before the exit)
fbcp&
now when you reboot, you will have a screen working!
-
3Step 3
So you may notice that things are not perfect with the screen! The ili9163 driver is hard coded to work with the chip at the top of the screen (upside down compared to mine) and using the rotation adds corruption into the screen. I have mentioned it to notro and he mentioned that it is a known issue, so once i get chance to play with the fbflex driver, i might have a change to this step.
Other than the screen being upside down, the pi is actiually trying to run on a standard 4:3 aspect ratio, so when things start on the screen, they wont look right. So we need to add some code into the config.txt. Firstly to force the resolution, and secondly to rotate the screen from the pi front
so if we edit config.txt, and add in
hdmi_force_hotplug=1 hdmi_cvt=128 128 60 1 0 0 0 hdmi_group=2 hdmi_mode=1 hdmi_mode=87 display_rotate=2
that should now give us a nice working screen :)
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
I'm trying your trick with rotating the display in config.txt instead of the buggy rotate option for the fbtft, but it doesn't seem to be affecting the db display. Sure, the HDMI image is rotated, but what's displayed on the module is still the same. Could it be because I'm using an ssd1351 instead of ili9163?
Are you sure? yes | no
Ah, got it, I wasn't using fbcp, just the con2fbmap, that's why it wasn't working.
Are you sure? yes | no
oooh OLED! I do like the brightness and contrast of a good OLED! It's just a shame they need so many extra bits on the pcb
Are you sure? yes | no
Yeah, they need relatively high voltage. But I'm using a ready module, so that's not a problem for me. I decided to use an OLED mostly because it has much better viewing angles.
Are you sure? yes | no
yeah, the biggest problem with the cheap TFT is the viewing angles. Hold it the wrong way and the colours totally flip!
Are you sure? yes | no