August 5, 2025

RPI Zero 2 W Adafruit 1.3? Color TFT Bonnet for Raspberry Pi retro pi

Write the retropi image to the sdcard.

Mount the boot partition.

Setup ssh by creating a file on the boot partition called ssh

setup wifi by creating wpa_supplicant.conf with the following content

country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid=”YourNetworkName”
psk=”YourPassword”
}

Edit the config.txt file and add the following cdmi configuration lines

hdmi_group=2
hdmi_mode=87
hdmi_cvt=240 240 60 1 0 0 0
hdmi_force_hotplug=1

and then the following button mappings

dtoverlay=gpio-key,gpio=17,active_low=1,gpio_pull=up,keycode=103
dtoverlay=gpio-key,gpio=22,active_low=1,gpio_pull=up,keycode=108
dtoverlay=gpio-key,gpio=27,active_low=1,gpio_pull=up,keycode=105
dtoverlay=gpio-key,gpio=23,active_low=1,gpio_pull=up,keycode=106
dtoverlay=gpio-key,gpio=4,active_low=1,gpio_pull=up,keycode=28
dtoverlay=gpio-key,gpio=5,active_low=1,gpio_pull=up,keycode=48
dtoverlay=gpio-key,gpio=6,active_low=1,gpio_pull=up,keycode=30

Next put the card in the machine reboot, it will reboot twice as it resizes the partition.

Ssh in and we’re going to build the screen monitor.

cd ~
git clone https://github.com/juj/fbcp-ili9341.git

cd fbcp-ili9341/

edit config.h

comment out #define DISPLAY_OUTPUT_LANDSCAPE

//#define DISPLAY_OUTPUT_LANDSCAPE

uncomment //#define BACKLIGHT_CONTROL

#define BACKLIGHT_CONTROL

edit st7735r.cpp and find the following line.

#define MADCTL_ROTATE_180_DEGREES (MADCTL_COLUMN_ADDRESS_ORDER_SWAP | MADCTL_ROW_ADDRESS_ORDER_SWAP)

remove MADCTL_COLUMN_ADDRESS_ORDER_SWAP 

#define MADCTL_ROTATE_180_DEGREES (MADCTL_ROW_ADDRESS_ORDER_SWAP)

run the following

cmake -DST7789=ON -DGPIO_TFT_BACKLIGHT=26 -DARMV8A=ON-DBACKLIGHT_CONTROL=OFF -DSTATISTICS=0 -DSPI_BUS_CLOCK_DIVISOR=6 -DGPIO_TFT_DATA_CONTROL=25 -DDISPLAY_ROTATE_180_DEGREES=ON ./;make -j; sudo ./fbcp-ili9341

You should now see the welcome screen from retropi

if you want it to start at boot use the following

sudo install -t /usr/local/sbin fbcp-ili9341
sudo install -m 0644 -t /etc fbcp-ili9341.conf
sudo install -m 0644 -t /etc/systemd/system fbcp-ili9341.service
sudo systemctl daemon-reload
sudo systemctl enable fbcp-ili9341 && sudo systemctl start fbcp-ili9341

Leave a comment

You must be logged in to post a comment.