We start our adventure by installing an os onto our pi, this will require a minimum 4gb micro sd card. Click the download link that says "Raspberry Pi 2/3" Now after the image has downloaded, burn it to an sd card. If you do not know how, please google it their are a lot of tutorials on it and seeing that you were able to burn an omgimg file before I'm not going to go over it.
connect your raspberry pi to an HDMI or composite display and plug in a usb keyboard and mouse. Be sure to disconnect everything from your gpio pins before booting as the pi is only capable of driving a single display.
boot the pi
On first boot the system will ask you to configure an input device. it really doesn't matter which keys you use here as long as you remember them.
press
f4
on your keyboard to exit Emulationstation and to enter the command line.Now we will preform some basic system optimization/configuration. Enter
sudo rasps-config
into your terminal then press enter.in the prompt use your keyboard arrow keys to go to
Advanced options
then press enter.Inside Advanced options Set the following:
- Enable
SPI
(Serial Peripheral Interface) 2.DisableOverscan
(because your tft display does not have an overscan) - Enable
Device Tree
4.Force 3.5mm headphone jack foraudio
(because hdmi will be disconnected when you are using your tft display)
- Enable
Reboot your pi using
sudo shutdown
to shutdown completely. Only remove the power after all green led activity has ceased.First we’ll install fbcp (a live framebuffer mirroring tool) using directions from HERE
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 (You do not need to actually use the link or read any of it because all of the install code is above)
Now we will edit the boot file to allow fbcp to launch on boot the boot file is located at
/etc/rc.local
you may edit it by usingsudo nano /etc/rc.local
Before the last line that saysexit 0
you want to insert the following/usr/local/bin/fbcp &
which will launch fbcp on boot. Now save the changes and exit by using the keyboard shortcutcontrol x
Now edit the file
/boot/config.txt
and add the following 4 lines.hdmi_force_hotplug=1 #Pretends HDMI hotplug signal is asserted so it appears a HDMI display is attached hdmi_group=1 #defines the HDMI type as DMT hdmi_mode=87 #defines screen resolution in CEA or DMT format 87 being custom hdmi_cvt=320 240 60 1 0 0 0 # sets the following in the following order: hdmi_cvt=
with the file still open you will need to add one of the following lines to the end of the file depending on wether your display touchscreen is resistive or capacitive.
We start our adventure by installing an os onto our pi, this will require a minimum 4gb micro sd card. Click the download link that says "Raspberry Pi 2/3" Now after the image has downloaded, burn it to an sd card. If you do not know how, please google it their are a lot of tutorials on it and seeing that you were able to burn an omg file before I'm not going to go over it.
connect your raspberry pi to an HDMI or composite display and plug in a usb keyboard and mouse. Be sure to disconnect everything from your gpio pins before booting as the pi is only capable of driving a single display.
boot the pi
On first boot the system will ask you to configure an input device. it really doesn't matter which keys you use here as long as you remember them.
press
f4
on your keyboard to exit Emulationstation and to enter the command line.Now we will preform some basic system optimization/configuration. Enter
sudo rasps-config
into your terminal then press enter.in the prompt use your keyboard arrow keys to go to
Advanced options
then press enter.Inside Advanced options Set the following:
- Enable
SPI
(Serial Peripheral Interface) 2.DisableOverscan
(because your tft display does not have an overscan) - Enable
Device Tree
4.Force 3.5mm headphone jack foraudio
(because hdmi will be disconnected when you are using your tft display)
- Enable
Reboot your pi using
sudo shutdown
to shutdown completely. Only remove the power after all green led activity has ceased.First we’ll install fbcp (a live framebuffer mirroring tool) using directions from HERE
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 (You do not need to actually use the link or read any of it because all of the install code is above)
Now we will edit the boot file to allow fbcp to launch on boot the boot file is located at
/etc/rc.local
you may edit it by usingsudo nano /etc/rc.local
Before the last line that saysexit 0
you want to insert the following/usr/local/bin/fbcp &
which will launch fbcp on boot. Now save the changes and exit by using the keyboard shortcutcontrol x
Now edit the file
/boot/config.txt
and add the following 4 lines.hdmi_force_hotplug=1 #Pretends HDMI hotplug signal is asserted so it appears a HDMI display is attached hdmi_group=1 #defines the HDMI type as DMT hdmi_mode=87 #defines screen resolution in CEA or DMT format 87 being custom hdmi_cvt=320 240 60 1 0 0 0 # sets the following in the following order: hdmi_cvt=
with the file still open you will need to add one of the following lines to the end of the file depending on wether your display touchscreen is resistive or capacitive.
We start our adventure by installing an os onto our pi, this will require a minimum 4gb micro sd card. Click the download link that says "Raspberry Pi 2/3" Now after the image has downloaded, burn it to an sd card. If you do not know how, please google it their are a lot of tutorials on it and seeing that you were able to burn an img file before I'm not going to go over it.
connect your raspberry pi to an HDMI or composite display and plug in a usb keyboard and mouse. Be sure to disconnect everything from your gpio pins before booting as the pi is only capable of driving a single display.
boot the pi
On first boot the system will ask you to configure an input device. it really doesn't matter which keys you use here as long as you remember them.
press
f4
on your keyboard to exit Emulationstation and to enter the command line.Now we will preform some basic system optimization/configuration. Enter
sudo rasps-config
into your terminal then press enter.in the prompt use your keyboard arrow keys to go to
Advanced options
then press enter.Inside Advanced options Set the following:
- Enable
SPI
(Serial Peripheral Interface) 2.DisableOverscan
(because your tft display does not have an overscan) - Enable
Device Tree
4.Force 3.5mm headphone jack foraudio
(because hdmi will be disconnected when you are using your tft display)
- Enable
Reboot your pi using
sudo shutdown
to shutdown completely. Only remove the power after all green led activity has ceased.First we’ll install fbcp (a live framebuffer mirroring tool) using directions from HERE
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 (You do not need to actually use the link or read any of it because all of the install code is above)
Now we will edit the boot file to allow fbcp to launch on boot the boot file is located at
/etc/rc.local
you may edit it by usingsudo nano /etc/rc.local
Before the last line that saysexit 0
you want to insert the following/usr/local/bin/fbcp &
which will launch fbcp on boot. Now save the changes and exit by using the keyboard shortcutcontrol x
Now edit the file
/boot/config.txt
and add the following 4 lines.hdmi_force_hotplug=1 #Pretends HDMI hotplug signal is asserted so it appears a HDMI display is attached hdmi_group=1 #defines the HDMI type as DMT hdmi_mode=87 #defines screen resolution in CEA or DMT format 87 being custom hdmi_cvt=320 240 60 1 0 0 0 # sets the following in the following order: hdmi_cvt=
with the file still open you will need to add one of the following lines to the end of the file depending on wether your display touchscreen is resistive or capacitive.
Now when you save and reboot HDMI will probably not work on all monitors, and it is recommended that you disconnect the HDMI display before attempting to use the tft one.
If you don’t already have the PiTFT assembled and connected, do that now.
Now only one more piece of software called retrogame lets you connect buttons directly to the Raspberry Pi’s GPIO header and simulates key presses. It can be downloaded from the command line using:
Enter the directory by using the following command:
cd Adafruit-Retrogame
Edit the file
retrogame.c
by using the command below:sudo nano retrogame.c
A full list of available key codes can be found at
/usr/include/linux/input.h
look for the table called
ioStandard
i know that it says for HDMI only, but because we are using thatfbcp
software that we installed before. The pi actually thinks that it is outputting over HDMI in an attempt to trick it into using gpu based hardware acceleration. Whatever you do do NOT TOUCH THE IOTFT table. Your Your IoStandard table should look like the one below:ioStandard[] = { // This pin/key table is used when the PiTFT isn't found // (using HDMI or composite instead), as with our original // retro gaming guide. // Input Output (from /usr/include/linux/input.h) { 4, KEY_LEFT }, // Joystick (4 pins) { 19, KEY_RIGHT }, { 16, KEY_UP }, { 26, KEY_DOWN }, { 14, KEY_LEFTCTRL }, // A/Fire/jump/primary/RED { 15, KEY_LEFTALT }, // B/Bomb/secondary/YELLOW { 20, KEY_Z }, // X/BLUE { 18, KEY_X }, // Y/GREEN { 5, KEY_SPACE }, // Select { 6, KEY_ENTER }, // Start { 12, KEY_A }, // L Shoulder { 13, KEY_S }, // R Shoulder { 17, KEY_ESC }, // Exit ROM PiTFT Button 1 { 22, KEY_1 }, // PiTFT Button 2 { 23, KEY_2 }, // PiTFT Button 3 { 27, KEY_3 }, // PiTFT Button 4
After editing, compile and run the code with:
make retrogame sudo mv retrogame /usr/local/bin
To make retrogame start on boot as we did before open the
/etc/rc.local
file using the command below.sudo nano /etc/rc.local
now before the final
exit 0
line insert the line below, then save and exit./usr/local/bin/retrogame &
Now only one more step until your on your way, its so that Emulationstsation recognizes retrogame as a keyboard. All you need to do is open the file
/etc/udev/rules.d/10-retrogame.rules
using the commandsudo nano /etc/udev/rules.d/10-retrogame.rules
Then copy and paste the line below into the new file:
SUBSYSTEM=="input", ATTRS{name}=="retrogame", ENV{ID_INPUT_KEYBOARD}="1" Then save and close this file then reboot.
Enjoy! and be sure to post any problems you receive in the comments and I will try and debug with you.
Note: depending on your display, modifying the IOTFT table may be the right thing to do.(advised by @jimmyplaysdrums) just try both and see what works for you.
ioStandard[] = {
// This pin/key table is used when the PiTFT isn't found
// (using HDMI or composite instead), as with our original
// retro gaming guide.
// Input Output (from /usr/include/linux/input.h)
{ 4, KEY_LEFT }, // Joystick (4 pins)
{ 19, KEY_RIGHT },
{ 16, KEY_UP },
{ 26, KEY_DOWN },
{ 14, KEY_LEFTCTRL }, // A/Fire/jump/primary/RED
{ 15, KEY_LEFTALT }, // B/Bomb/secondary/YELLOW
{ 20, KEY_Z }, // X/BLUE
{ 18, KEY_X }, // Y/GREEN
{ 5, KEY_SPACE }, // Select
{ 6, KEY_ENTER }, // Start
{ 12, KEY_A }, // L Shoulder
{ 13, KEY_S }, // R Shoulder
{ 17, KEY_ESC }, // Exit ROM PiTFT Button 1
{ 22, KEY_1 }, // PiTFT Button 2
{ 23, KEY_2 }, // PiTFT Button 3
{ 27, KEY_3 }, // PiTFT Button 4
After editing, compile and run the code with:
make retrogame sudo mv retrogame /usr/local/bin
To make retrogame start on boot as we did before open the
/etc/rc.local
file using the command below.sudo nano /etc/rc.local
now before the final
exit 0
line insert the line below, then save and exit./usr/local/bin/retrogame &
Now only one more step until your on your way, its so that Emulationstsation recognizes retrogame as a keyboard. All you need to do is open the file
/etc/udev/rules.d/10-retrogame.rules
using the commandsudo nano /etc/udev/rules.d/10-retrogame.rules
Then copy and paste the line below into the new file:
SUBSYSTEM=="input", ATTRS{name}=="retrogame", ENV{ID_INPUT_KEYBOARD}="1" Then save and close this file then reboot.
Enjoy! and be sure to post any problems you receive in the comments and I will try and debug with you.
Now when you save and reboot HDMI will probably not work on all monitors, and it is recommended that you disconnect the HDMI display before attempting to use the tft one.
If you don’t already have the PiTFT assembled and connected, do that now.
Now only one more piece of software called retrogame lets you connect buttons directly to the Raspberry Pi’s GPIO header and simulates key presses. It can be downloaded from the command line using:
Enter the directory by using the following command:
cd Adafruit-Retrogame
Edit the file
retrogame.c
by using the command below:sudo nano retrogame.c
A full list of available key codes can be found at
/usr/include/linux/input.h
look for the table called
ioStandard
i know that it says for HDMI only, but because we are using thatfbcp
software that we installed before. The pi actually thinks that it is outputting over HDMI in an attempt to trick it into using gpu based hardware acceleration. Whatever you do do NOT TOUCH THE IOTFT table. Your IoStandard table should look like the one below:ioStandard[] = { // This pin/key table is used when the PiTFT isn't found // (using HDMI or composite instead), as with our original // retro gaming guide. // Input Output (from /usr/include/linux/input.h) { 4, KEY_LEFT }, // Joystick (4 pins) { 19, KEY_RIGHT }, { 16, KEY_UP }, { 26, KEY_DOWN }, { 14, KEY_LEFTCTRL }, // A/Fire/jump/primary/RED { 15, KEY_LEFTALT }, // B/Bomb/secondary/YELLOW { 20, KEY_Z }, // X/BLUE { 18, KEY_X }, // Y/GREEN { 5, KEY_SPACE }, // Select { 6, KEY_ENTER }, // Start { 12, KEY_A }, // L Shoulder { 13, KEY_S }, // R Shoulder { 17, KEY_ESC }, // Exit ROM PiTFT Button 1 { 22, KEY_1 }, // PiTFT Button 2 { 23, KEY_2 }, // PiTFT Button 3 { 27, KEY_3 }, // PiTFT Button 4
After editing, compile and run the code with:
make retrogame sudo mv retrogame /usr/local/bin
To make retrogame start on boot as we did before open the
/etc/rc.local
file using the command below.sudo nano /etc/rc.local
now before the final
exit 0
line insert the line below, then save and exit./usr/local/bin/retrogame &
Now only one more step until your on your way, its so that Emulationstsation recognizes retrogame as a keyboard. All you need to do is open the file
/etc/udev/rules.d/10-retrogame.rules
using the commandsudo nano /etc/udev/rules.d/10-retrogame.rules
Then copy and paste the line below into the new file:
SUBSYSTEM=="input", ATTRS{name}=="retrogame", ENV{ID_INPUT_KEYBOARD}="1" Then save and close this file then reboot.
Enjoy! and be sure to post any problems you receive in the comments and I will try and debug with you.
Now when you save and reboot HDMI will probably not work on all monitors, and it is recommended that you disconnect the HDMI display before attempting to use the tft one.
If you don’t already have the PiTFT assembled and connected, do that now.
Now only one more piece of software called retrogame lets you connect buttons directly to the Raspberry Pi’s GPIO header and simulates key presses. It can be downloaded from the command line using:
Enter the directory by using the following command:
cd Adafruit-Retrogame
Edit the file
retrogame.c
by using the command below:sudo nano retrogame.c
A full list of available key codes can be found at
/usr/include/linux/input.h
look for the table called
ioStandard
i know that it says for HDMI only, but because we are using thatfbcp
software that we installed before. The pi actually thinks that it is outputting over HDMI in an attempt to trick it into using gpu based hardware acceleration. Your IoStandard table should look like the one below:
Note: depending on your display, modifying the IOTFT table may be the right thing to do.(advised by @jimmyplaysdrums) just try both and see what works for you.
ioStandard[] = {
// This pin/key table is used when the PiTFT isn't found
// (using HDMI or composite instead), as with our original
// retro gaming guide.
// Input Output (from /usr/include/linux/input.h)
{ 4, KEY_LEFT }, // Joystick (4 pins)
{ 19, KEY_RIGHT },
{ 16, KEY_UP },
{ 26, KEY_DOWN },
{ 14, KEY_LEFTCTRL }, // A/Fire/jump/primary/RED
{ 15, KEY_LEFTALT }, // B/Bomb/secondary/YELLOW
{ 20, KEY_Z }, // X/BLUE
{ 18, KEY_X }, // Y/GREEN
{ 5, KEY_SPACE }, // Select
{ 6, KEY_ENTER }, // Start
{ 12, KEY_A }, // L Shoulder
{ 13, KEY_S }, // R Shoulder
{ 17, KEY_ESC }, // Exit ROM PiTFT Button 1
{ 22, KEY_1 }, // PiTFT Button 2
{ 23, KEY_2 }, // PiTFT Button 3
{ 27, KEY_3 }, // PiTFT Button 4
After editing, compile and run the code with:
make retrogame sudo mv retrogame /usr/local/bin
To make retrogame start on boot as we did before open the
/etc/rc.local
file using the command below.sudo nano /etc/rc.local
now before the final
exit 0
line insert the line below, then save and exit./usr/local/bin/retrogame &
Now only one more step until your on your way, its so that Emulationstsation recognizes retrogame as a keyboard. All you need to do is open the file
/etc/udev/rules.d/10-retrogame.rules
using the commandsudo nano /etc/udev/rules.d/10-retrogame.rules
Then copy and paste the line below into the new file:
SUBSYSTEM=="input", ATTRS{name}=="retrogame", ENV{ID_INPUT_KEYBOARD}="1" Then save and close this file then reboot.
Enjoy! and be sure to post any problems you receive in the comments and I will try and debug with you.
We start our adventure by installing an os onto our pi, this will require a minimum 4gb micro sd card. Click the download link that says "Raspberry Pi 2/3" Now after the image has downloaded, burn it to an sd card. If you do not know how, please google it their are a lot of tutorials on it and seeing that you were able to burn an omg file before I'm not going to go over it.
connect your raspberry pi to an HDMI or composite display and plug in a usb keyboard and mouse. Be sure to disconnect everything from your gpio pins before booting as the pi is only capable of driving a single display.
boot the pi
On first boot the system will ask you to configure an input device. it really doesn't matter which keys you use here as long as you remember them.
press
f4
on your keyboard to exit Emulationstation and to enter the command line.Now we will preform some basic system optimization/configuration. Enter
sudo rasps-config
into your terminal then press enter.in the prompt use your keyboard arrow keys to go to
Advanced options
then press enter.Inside Advanced options Set the following:
- Enable
SPI
(Serial Peripheral Interface) 2.DisableOverscan
(because your tft display does not have an overscan) - Enable
Device Tree
4.Force 3.5mm headphone jack foraudio
(because hdmi will be disconnected when you are using your tft display)
- Enable
Reboot your pi using
sudo shutdown
to shutdown completely. Only remove the power after all green led activity has ceased.First we’ll install fbcp (a live framebuffer mirroring tool) using directions from HERE
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 (You do not need to actually use the link or read any of it because all of the install code is above)
Now we will edit the boot file to allow fbcp to launch on boot the boot file is located at
/etc/rc.local
you may edit it by usingsudo nano /etc/rc.local
Before the last line that saysexit 0
you want to insert the following/usr/local/bin/fbcp &
which will launch fbcp on boot. Now save the changes and exit by using the keyboard shortcutcontrol x
Now edit the file
/boot/config.txt
and add the following 4 lines.hdmi_force_hotplug=1 #Pretends HDMI hotplug signal is asserted so it appears a HDMI display is attached hdmi_group=1 #defines the HDMI type as DMT hdmi_mode=87 #defines screen resolution in CEA or DMT format 87 being custom hdmi_cvt=320 240 60 1 0 0 0 # sets the following in the following order: hdmi_cvt=
with the file still open you will need to add one of the following lines to the end of the file depending on wether your display touchscreen is resistive or capacitive.
For capacitative touchscreen use:
dtoverlay=pitft28-capacitive-overlay,rotate=90,speed=80000000,fps=60
For resistive touch screens use:
dtoverlay=pitft28-resistive-overlay,rotate=90,speed=80000000,fps=60
For tft displays that do not support touch either line will work.
Note: that `dtoverlay` is a Device Tree function that is used to enable the SPI driver.
Now when you save and reboot HDMI will probably not work on all monitors, and it is recommended that you disconnect the HDMI display before attempting to use the tft one.
If you don’t already have the PiTFT assembled and connected, do that now.
Now only one more piece of software called retrogame lets you connect buttons directly to the Raspberry Pi’s GPIO header and simulates key presses. It can be downloaded from the command line using:
Enter the directory by using the following command:
cd Adafruit-Retrogame
Edit the file
retrogame.c
by using the command below:sudo nano retrogame.c
A full list of available key codes can be found at
/usr/include/linux/input.h
look for the table called
ioStandard
i know that it says for HDMI only, but because we are using thatfbcp
software that we installed before. The pi actually thinks that it is outputting over HDMI in an attempt to trick it into using gpu based hardware acceleration. Whatever you do do NOT TOUCH THE IOTFT table. Your IoStandard table should look like the one below:ioStandard[] = { // This pin/key table is used when the PiTFT isn't found // (using HDMI or composite instead), as with our original // retro gaming guide. // Input Output (from /usr/include/linux/input.h) { 4, KEY_LEFT }, // Joystick (4 pins) { 19, KEY_RIGHT }, { 16, KEY_UP }, { 26, KEY_DOWN }, { 14, KEY_LEFTCTRL }, // A/Fire/jump/primary/RED { 15, KEY_LEFTALT }, // B/Bomb/secondary/YELLOW { 20, KEY_Z }, // X/BLUE { 18, KEY_X }, // Y/GREEN { 5, KEY_SPACE }, // Select { 6, KEY_ENTER }, // Start { 12, KEY_A }, // L Shoulder { 13, KEY_S }, // R Shoulder { 17, KEY_ESC }, // Exit ROM PiTFT Button 1 { 22, KEY_1 }, // PiTFT Button 2 { 23, KEY_2 }, // PiTFT Button 3 { 27, KEY_3 }, // PiTFT Button 4
After editing, compile and run the code with:
make retrogame sudo mv retrogame /usr/local/bin
To make retrogame start on boot as we did before open the
/etc/rc.local
file using the command below.sudo nano /etc/rc.local
now before the final
exit 0
line insert the line below, then save and exit./usr/local/bin/retrogame &
Now only one more step until your on your way, its so that Emulationstsation recognizes retrogame as a keyboard. All you need to do is open the file
/etc/udev/rules.d/10-retrogame.rules
using the commandsudo nano /etc/udev/rules.d/10-retrogame.rules
Then copy and paste the line below into the new file:
SUBSYSTEM=="input", ATTRS{name}=="retrogame", ENV{ID_INPUT_KEYBOARD}="1" Then save and close this file then reboot.
Enjoy! and be sure to post any problems you receive in the comments and I will try and debug with you.