Retropie with 7'' Touch Screen

Learn to set up the touch functionality on 7'' touch screen for retro gaming

Written By: Cherie Tan

Dash icon
Steps icon
Retropie is a software library used to emulate retro video games and can be run on the Raspberry Pi. However, some of these games require the use of a touch screen. Our 7 inch LCD HDMI Display for Raspberry Pi has touch-screen functionality.

In this guide, learn to set up the 7 inch LCD HDMI Display for Raspberry Pi 3 with Retropie.

Complete this guide to play retro games using touch functionality!

Step 1 Setup Prerequisites

This guide is to be used after you have completed the Retropie with Raspberry Pi guide. 
While touch functionality will not work in the Retropie main menu, it will work on some of its emulators such as DraStic (for NDS emulation). 

Step 2 The 7 inch touchscreen screen kit

Right out of the box, there are three parts to the kit. 
The 7-inch LCD touch screen
A micro-usb cable
A short HDMI cable

Step 3 Add these lines to config.txt

Before connecting the touch screen to the Raspberry Pi, get out a microSD card reader and connect it to your computer
Insert the microSD card into the microSD card readerand it should show up under 'Devices' (On MacOS) or as a drive (On Windows OS). 

Edit the config.txt file with a text editor.
For the screen to display in landscape mode, add the following lines to the end of the config.txt file:




hdmi_cvt 800 480 60 6 0 0 0



Save the changes and remove it from the computer.

Step 4 Turn on the 'backlight' switch

Next, turn the backlight of the screen on by flicking the switch. 
This is located on the back side of the LCD screen.

Step 5 Connect HDMI cable

Connect HDMI Port of LCD to HDMI Port of Pi

Step 6 Connect microSD card and keyboard

Please insert the microSD card into the Raspberry Pi. Then connect a wired keyboard.

Step 7 Connect microUSB cable to 'Touch'

Next connect microUSB Port of LCD to USB Port of the Raspberry Pi.

Step 8 Power up the Raspberry Pi

Finally, power up the Raspberry Pi by connecting the Raspberry Pi with the power supply included in the kit.
The Retropie splash screen will display on the 7-in touchscreen.

Step 9 Touch screen

Now, access the terminal in Retropie by hitting the F4 button.
First, we will need to install libinput with the following code:
sudo apt-get install xserver-xorg-input-libinput
Now create an xorg.conf.d folder with the following command.
sudo mkdir /etc/X11/xorg.conf.d
The next step is to copy the file 40-libinput-conf to the folder which we just created. So use the following command: sudo cp /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/

Step 10 Configurations

Press 'M'  to bring up the menu as shown
Select 'Change Options' and set up any changes as you'd like
Select 'Configure Controls' to manually set up the controls for games running on DraStic
Connect a game controller and remove the keyboard if desired
Use a finger on the screen and start playing.
DraStic is an experimental emulator that does not support absolute pointer coordinates, this means the touch screen will work although you'll need to drag the cursor around to get it to where you want.

Step 11 Select NDS Emulator

Once a ROM has been added, the emulator will show up on the main menu.

Select the Nintendo DS emulator

Select the ROM of your choice

Step 12 Install DraStic

Some experimental emulators such as DraStic will need to be installed.
On the main menu, select 'Retropie' to view the settings menu where you will see Audio, Bluetooth, Configuration Editor etc.
Select 'Retropie Setup'
Select 'Manage packages'
Select 'Manage experimental packages'
Select 'drastic'
Select  'Install from binary'
Let the installation run to completion, this may take a few minutes.

Step 13 Modifications to the file

We will make several modifications to the file '40-libinput.conf' 
So run the following command: sudo nano /etc/X11/xorg.conf.d/40-libinput.conf
Once the file has been opened, scroll all the way down
Make sure there is a line that states 'Identifier 'libinput touchscreen catchall' '
Add the line 'Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
Save changes by hitting 'CTRL+X', then 'Y' and then 'Enter'.