Difference between revisions of "GamePi20"

From Waveshare Wiki
Jump to: navigation, search
 
(24 intermediate revisions by 3 users not shown)
Line 14: Line 14:
 
=Overview=
 
=Overview=
 
==Features==
 
==Features==
*2inch IPS screen, 320×240 resolution.
+
*Support Raspberry Pi Zero/Zero W/Zero WH
*60 frame experience, smooth display, no more frame loss.
+
*2inch IPS screen, 320 × 240 resolution
*Support RetroPie game system and Recalbox game system, supporting thousands of classic games, as long as the TF card is big enough, you can add your favorite games arbitrarily.
+
*60-frame experience, smooth display, no more frame loss
*With charging circuit, built-in 14500 lithium battery power supply, easy to carry and play at any time.
+
*Support RetroPie game system and Recalbox game system, supporting thousands of classic games, as long as the TF card is big enough, you can add your favorite games arbitrarily
*Battery capacity indicator.
+
*With a charging circuit, and a built-in 14500 lithium battery <font color="#FF0000">(not included)</font> power supply, easy to carry and play at any time
*Onboard speaker and earphone jack, listen to the familiar BGM from the old days.
+
*Battery capacity indicator
==Support Raspberry Pi==
+
*Onboard speaker and earphone jack, listen to the familiar BGM from the old days
*Raspberry Pi Zero
 
*Raspberry Pi Zero W
 
*Raspberry Pi Zero WH
 
  
 
=How to use it=
 
=How to use it=
Line 30: Line 27:
 
==Hardware connection==
 
==Hardware connection==
 
*Attach Raspberry Pi Zero/Zero W to GamePi20 extension board. '''Note that you need to first set up SD card according to the instruction below, before you assemble it.'''
 
*Attach Raspberry Pi Zero/Zero W to GamePi20 extension board. '''Note that you need to first set up SD card according to the instruction below, before you assemble it.'''
*Mount the extension board to the metal box
+
*Mount the extension board to the metal box.
 
*Place conductive rubber mats and buttons on it, finally assemble the front panel.
 
*Place conductive rubber mats and buttons on it, finally assemble the front panel.
  
 
To use the GamePi20, you can use the pre-configured image or install driver to a fresh image yourself.
 
To use the GamePi20, you can use the pre-configured image or install driver to a fresh image yourself.
 
===Method 1: Pre-configured Images===
 
===Method 1: Pre-configured Images===
*Here we provide a pre-configured image, you can download and test
+
*Here we provide a pre-configured image, you can download and test.
 
{|class="wikitable"
 
{|class="wikitable"
 
|-
 
|-
Line 42: Line 39:
 
|Recalbox || 6.0-DragonBlaze || Raspberry Pi 1/Zero/Zero W || root/recalboxroot || [https://drive.google.com/file/d/1Zb-OWGpumGvSh9xUUb2zIeURndKMqBwm/view?usp=sharing Google Drive]
 
|Recalbox || 6.0-DragonBlaze || Raspberry Pi 1/Zero/Zero W || root/recalboxroot || [https://drive.google.com/file/d/1Zb-OWGpumGvSh9xUUb2zIeURndKMqBwm/view?usp=sharing Google Drive]
 
|-
 
|-
|Recalbox || v7.1.1||Raspberry Pi 1/Zero/ZeroW ||root/recalboxroot|| [https://1drv.ms/u/s!At1XVmt1PVrlgSo_eGCECuhKN5fE?e=YHhdmK One drive]
+
|Recalbox || v7.1.1||Raspberry Pi 1/Zero/ZeroW ||root/recalboxroot|| [https://drive.google.com/file/d/1Iw-SEnZK4lwXIxs-4zwJIVrqfuOQYs1O/view?usp=share_link Google drive]
 
|-
 
|-
 
|Retropie || v4.4 || Raspberry Pi 1/Zero/Zero W || pi/raspberry || [https://drive.google.com/file/d/1p0ZP9lnxIu-2mvGVU91y_Z_Z0VdJC7oV/view?usp=sharing Google Drive]
 
|Retropie || v4.4 || Raspberry Pi 1/Zero/Zero W || pi/raspberry || [https://drive.google.com/file/d/1p0ZP9lnxIu-2mvGVU91y_Z_Z0VdJC7oV/view?usp=sharing Google Drive]
 
|-
 
|-
|Retropie || v4.7.1 || Raspberry Pi 1/Zero/Zero W || pi/raspberry || [https://1drv.ms/u/s!At1XVmt1PVrlgSuwxNF-H3g1jsKg?e=Q01Ghv One Drive]
+
|Retropie || v4.7.1 || Raspberry Pi 1/Zero/Zero W || pi/raspberry || [https://drive.google.com/file/d/1rAIbYdBbZjHDoOVRDpHzx72Mbm0kusbI/view?usp=sharing Google Drive]
 
|-
 
|-
|Retropie || v4.8 || Raspberry Pi Zero 2W || pi/raspberry || [https://drive.google.com/file/d/1-xv0mms2Xbey6ffqUCJ-CbkgWXofnSwZ/view?usp=sharing Gogle Drive]
+
|Retropie || v4.8 || Raspberry Pi Zero 2W || pi/raspberry || [https://drive.google.com/file/d/1-xv0mms2Xbey6ffqUCJ-CbkgWXofnSwZ/view?usp=sharing Google Drive]
 
|}
 
|}
*Download image file, unzip and write it to SD card
+
*Download the image file, unzip and write it to the SD card.
*Insert the SD card to Raspberry Pi, assemble GamePi20 as [[#Hardware connection]]
+
*Insert the SD card to Raspberry Pi, assemble GamePi20 as [[#Hardware connection]].
*turn the switch into ON. Generally, LCD is light on and Raspberry Pi is booting. It may cause about 2 minutes for Raspberry Pi 1/zero/zero W to starting.
+
*turn the switch to ON. Generally, LCD is light on and Raspberry Pi is booting. It may cause about 2 minutes for Raspberry Pi 1/zero/zero W to start.
**Raspberry Pi is failed to start if the battery is low. In this case, you can connect 5V/2A power adapter to the Power interface for charging. Capacity indicators  
+
**Raspberry Pi is failed to start if the battery is low. In this case, you can connect 5V/2A power adapter to the Power interface for charging. Capacity indicators.
 
**If the buttons cannot work normally, please add a line to the /boot/config.txt file, then reboot and try again.
 
**If the buttons cannot work normally, please add a line to the /boot/config.txt file, then reboot and try again.
 
<pre>
 
<pre>
Line 63: Line 60:
  
 
*Retropie
 
*Retropie
*#After booting, you can select emulators by direction buttons on the left, then press "A" to confirm. For example, choose "A" and then "Start"
+
*#After booting, you can select emulators by direction buttons on the left, then press "A" to confirm. For example, choose "A" and then "Start".
*#Choose the games and press "A" to play
+
*#Choose the games and press "A" to play.
*#Press "Start"+"Select" buttons to exit games
+
*#Press "Start"+"Select" buttons to exit games.
*#You can adjust the potentiometer to adjust the volume. Or Press "Start" and choose "SOUND SETTINGS" to adjust volume
+
*#You can adjust the potentiometer to adjust the volume. Or Press "Start" and choose "SOUND SETTINGS" to adjust the volume.
 
*Recalbox
 
*Recalbox
 
*#After booting, you can select emulators by direction buttons on the left, then press "B" to confirm.
 
*#After booting, you can select emulators by direction buttons on the left, then press "B" to confirm.
*#Choose the games and press "A" to play, press "A" or "Start" to start games
+
*#Choose the games and press "A" to play, press "A" or "Start" to start the games.
*#Press "Start"+"Select" buttons to exit games
+
*#Press "Start"+"Select" buttons to exit games.
*#you can adjust the potentiometer to adjust volume. Or Press "Start" and choose "SOUND SETTINGS", press "B" confirm, then adjust "SYSTEM VOLUME" by direction buttons.
+
*#you can adjust the potentiometer to adjust the volume. Or Press "Start" and choose "SOUND SETTINGS", press "B" confirm, then adjust "SYSTEM VOLUME" by the direction buttons.
  
 
==Method 2: Install driver==
 
==Method 2: Install driver==
 
'''Install driver on Retropie'''
 
'''Install driver on Retropie'''
  
Download Retropie image from [https://retropie.org.uk/download/ Retropie website]
+
Download the Retropie image from [https://retropie.org.uk/download/ Retropie website].
  
 
[[File:Game-HAT-Manual01.jpg|600px]]
 
[[File:Game-HAT-Manual01.jpg|600px]]
Line 82: Line 79:
 
1) Download the image file to the computer and unzip it to get the .img file.
 
1) Download the image file to the computer and unzip it to get the .img file.
  
2) Connect the TF card to the computer, open the [http://www.waveshare.com/w/upload/7/76/Win32DiskImager.zip Win32DiskImager.exe software], select the .img file prepared in step 1, and click write to burn the image.
+
2) Connect the TF card to the computer, open the [https://files.waveshare.com/upload/7/76/Win32DiskImager.zip Win32DiskImager.exe software], select the .img file prepared in step 1, and click write to burn the image.
  
3) Connect SD card, keyboard and a HDMI display to Raspberry Pi, Turn the switch into ON side to power on Raspberry Pi. Press F4 (Keyboard) after booting. You may require an [https://www.waveshare.com/eth-usb-hub-hat.htm ETH/USB HUB HAT in this steps]
+
3) Connect the SD card, keyboard, and HDMI display to Raspberry Pi, Turn the switch on the ON side to power on Raspberry Pi. Press F4 (Keyboard) after booting. You may require an [https://www.waveshare.com/eth-usb-hub-hat.htm ETH/USB HUB HAT in this steps].
  
4) Configure as below to enable fbtft module for displaying
+
4) Configure as below to enable fbtft module for displaying.
*Doenload the driver from the github
+
*Download the driver from GitHub.
 
<pre>
 
<pre>
 
sudo apt-get install cmake
 
sudo apt-get install cmake
Line 93: Line 90:
 
git clone https://github.com/juj/fbcp-ili9341.git
 
git clone https://github.com/juj/fbcp-ili9341.git
 
</pre>
 
</pre>
*Modify the source file to make the program support the current screen resolution
+
*Modify the source file to make the program support the current screen resolution.
 
<pre>
 
<pre>
 
cd fbcp-ili9341
 
cd fbcp-ili9341
 
nano st7735r.h
 
nano st7735r.h
 
</pre>
 
</pre>
*Find the following code and change the value of DISPLAY_NATIVE_HEIGHT from 240 to 320
+
*Find the following code and change the value of DISPLAY_NATIVE_HEIGHT from 240 to 320.
 
<pre>
 
<pre>
 
#if defined(ST7789) || defined(ST7789VW)
 
#if defined(ST7789) || defined(ST7789VW)
Line 146: Line 143:
 
DMA RX channel was assigned another peripheral map!
 
DMA RX channel was assigned another peripheral map!
 
</pre>
 
</pre>
*Set auto-start when power on.
+
*Set auto-start when powered on.
 
<pre>
 
<pre>
 
sudo cp ~/fbcp-ili9341/build/fbcp-ili9341 /usr/local/bin/fbcp
 
sudo cp ~/fbcp-ili9341/build/fbcp-ili9341 /usr/local/bin/fbcp
 
sudo nano /etc/rc.local
 
sudo nano /etc/rc.local
 
</pre>
 
</pre>
:Add sentence fbcp& in the front of exit 0
+
: Add sentence fbcp& in the front of exit 0
 
[[File:1in3_lcd_fb5.png|400px]]
 
[[File:1in3_lcd_fb5.png|400px]]
:Configure /boot/config.txt file
+
: Configure /boot/config.txt file.
 
<pre>
 
<pre>
 
sudo nano /boot/config.txt
 
sudo nano /boot/config.txt
#add lines below to config.txt file
+
#add lines below to the config.txt file
 
hdmi_force_hotplug=1
 
hdmi_force_hotplug=1
 
hdmi_cvt=640 480 60 1 0 0 0
 
hdmi_cvt=640 480 60 1 0 0 0
Line 165: Line 162:
 
dtoverlay=pwm
 
dtoverlay=pwm
 
</pre>
 
</pre>
5)Install driver for josytic
+
5)Install driver for josytic.
 
<pre>
 
<pre>
 
git clone https://github.com/waveshare/mk_arcade_joystick_rpi.git
 
git clone https://github.com/waveshare/mk_arcade_joystick_rpi.git
Line 171: Line 168:
 
sudo ./install.sh 3
 
sudo ./install.sh 3
 
</pre>
 
</pre>
:Finally, reboot it.
+
: Finally, reboot it.
 
<pre>
 
<pre>
 
sudo reboot
 
sudo reboot
 
</pre>
 
</pre>
6)  Long-press "A" button (GamePi20) to enter the configuration page, configure it by pressing related buttons (GamePi20), you can also long-press to skip any button
+
6)  Long-press the "A" button (GamePi20) to enter the configuration page, configure it by pressing related buttons (GamePi20), you can also long-press to skip any button.
  
 
After configuring, you can press "A" (GamePi20) to save configured and exit, or press "B" or "Start" (GamePi20) to exit without saving.
 
After configuring, you can press "A" (GamePi20) to save configured and exit, or press "B" or "Start" (GamePi20) to exit without saving.
 
{|style="color:red"
 
{|style="color:red"
 
|
 
|
*【Note】If you find that there is no sound output, you need to modify the system default sound card
+
*【Note】If you find that there is no sound output, you need to modify the system's default sound card.
 
|}
 
|}
 
Open the configuration file and change the default sound card to sound card 1.
 
Open the configuration file and change the default sound card to sound card 1.
Line 193: Line 190:
 
'''Install driver on Recalbox'''
 
'''Install driver on Recalbox'''
  
Download the latest image from [https://archive.recalbox.com/ Recalbox website]
+
Download the latest image from [https://archive.recalbox.com/ Recalbox website].
  
 
[[File:GamePi15-Manual-02.jpg|400px]]
 
[[File:GamePi15-Manual-02.jpg|400px]]
  
*Unzip the files download to get the .img file
+
*Unzip the files download to get the .img file.
*Write the .img file to SD card
+
*Write the .img file to the SD card.
*Copy driver to root directory of SD card
+
*Copy the driver to the root directory of the SD card.
*Connect SD card, keyboard and an HDMI display to Raspberry Pi, Turn the switch into ON side to power on Raspberry Pi. Press F4 then Alt+F2(Keyboard) after booting. (user: root; password: recalboxroot)
+
*Connect the SD card, keyboard, and HDMI display to Raspberry Pi, Turn the switch on the ON side to power on Raspberry Pi. Press F4 then Alt+F2(Keyboard) after booting. (user: root; password: recalboxroot).
 
*Setup display with commands below:
 
*Setup display with commands below:
 
<pre>
 
<pre>
Line 215: Line 212:
 
fbtft_device
 
fbtft_device
 
</pre>
 
</pre>
*Enable SPI by adding statement to config.txt
+
*Enable SPI by adding a statement to config.txt.
 
<pre>
 
<pre>
 
sudo nano /boot/config.txt
 
sudo nano /boot/config.txt
 
</pre>
 
</pre>
:add line below to the file
+
:add line below to the file.
 
<pre>
 
<pre>
 
dtparam=spi=on
 
dtparam=spi=on
Line 232: Line 229:
 
options flexfb setaddrwin=0 width=320 height=240, init=-1,0x11,-2,120,-1,0x36,0xA0,-1,0x3A,0x05,-1,0x21,-1,0x2A,0x00,0x01,0x00,0x3F,-1,0x2B,0x00,0x00,0x00,0xEF,-1,0xB2,0x0C,0x0C,0x00,0x33,0x33,-1,0xB7,0x35,-1,0xBB,0x1F,-1,0xC0,0x2C,-1,0xC2,0x01,-1,0xC3,0x12,-1,0xC4,0x20,-1,0xC6,0x0F,-1,0xD0,0xA4,0xA1,-1,0xE0,0xD0,0x08,0x11,0x08,0x0C,0x15,0x39,0x33,0x50,0x36,0x13,0x14,0x29,0x2D,-1,0xE1,0xD0,0x08,0x10,0x08,0x06,0x06,0x39,0x44,0x51,0x0B,0x16,0x14,0x2F,0x31,-1,0x29,-3
 
options flexfb setaddrwin=0 width=320 height=240, init=-1,0x11,-2,120,-1,0x36,0xA0,-1,0x3A,0x05,-1,0x21,-1,0x2A,0x00,0x01,0x00,0x3F,-1,0x2B,0x00,0x00,0x00,0xEF,-1,0xB2,0x0C,0x0C,0x00,0x33,0x33,-1,0xB7,0x35,-1,0xBB,0x1F,-1,0xC0,0x2C,-1,0xC2,0x01,-1,0xC3,0x12,-1,0xC4,0x20,-1,0xC6,0x0F,-1,0xD0,0xA4,0xA1,-1,0xE0,0xD0,0x08,0x11,0x08,0x0C,0x15,0x39,0x33,0x50,0x36,0x13,0x14,0x29,0x2D,-1,0xE1,0xD0,0x08,0x10,0x08,0x06,0x06,0x39,0x44,0x51,0x0B,0x16,0x14,0x2F,0x31,-1,0x29,-3
 
</pre>
 
</pre>
*Reboot Raspberry Pi and check if fb1 is recognized under /dev
+
*Reboot Raspberry Pi and check if fb1 is recognized under /dev.
 
<pre>
 
<pre>
 
reboot
 
reboot
 
</pre>
 
</pre>
*Configure rcS file
+
*Configure the rcS file.
 
<pre>
 
<pre>
 
nano /etc/init.d/rcS
 
nano /etc/init.d/rcS
 
</pre>
 
</pre>
:Add a line to the rcS file
+
: Add a line to the rcS file.
 
<pre>
 
<pre>
 
fbcp &
 
fbcp &
 
</pre>
 
</pre>
*Modify recalbox.conf. '''Please check it again after save.'''
+
*Modify recalbox.conf. ''' Please check it again after saving.'''
 
<pre>
 
<pre>
 
#global.videomode=CEA 4 HDMI
 
#global.videomode=CEA 4 HDMI
Line 252: Line 249:
 
global.ratio=4/3
 
global.ratio=4/3
 
</pre>
 
</pre>
*Modify /boot/config.txt file ,add lines to it
+
*Modify /boot/config.txt file, add lines to it.
 
<pre>
 
<pre>
 
sudo nano /boot/config.txt
 
sudo nano /boot/config.txt
#添加
+
#Add
 
hdmi_force_hotplug=1
 
hdmi_force_hotplug=1
 
hdmi_cvt=640 480 60 1 0 0 0
 
hdmi_cvt=640 480 60 1 0 0 0
Line 263: Line 260:
 
dtoverlay=pwm
 
dtoverlay=pwm
 
</pre>
 
</pre>
*Finally, configure GPIO by modifing recalbox.conf file
+
*Finally, configure GPIO by modifying recalbox.conf file
 
<pre>
 
<pre>
 
# ------------ D2 - GPIO Controllers ------------ #
 
# ------------ D2 - GPIO Controllers ------------ #
Line 274: Line 271:
 
*Reboot Raspberry Pi
 
*Reboot Raspberry Pi
  
===Add new games (Retropie)===
+
===Add New Games (Retropie)===
Maybe default games in test image are not those you want, you can also add games as you like.
+
Maybe the default games in the test image are not those you want, you can also add games as you like.
*Size of most games are always large, so we need to expand filesystem fist. Choose RASPI-CONFIG on configure page and press enter
+
*Size of most games is always large, so we need to expand the filesystem first. Choose RASPI-CONFIG on configure page and press enter.
 
[[File:600px-Game-HAT-Manual03.jpg]]
 
[[File:600px-Game-HAT-Manual03.jpg]]
  
 
[[File:600px-Game-HAT-Manual04.jpg]]
 
[[File:600px-Game-HAT-Manual04.jpg]]
  
*Choose 7 Advanced Options -> A1 Expand Filesystem, Enter->Finish, (physical keyboard is required)
+
*Choose 7 Advanced Options -> A1 Expand Filesystem, Enter -> Finish, (physical keyboard is required).
 
[[File:600px-Game-HAT-Manual05.jpg]]
 
[[File:600px-Game-HAT-Manual05.jpg]]
 
*Choose OK, and reboot.
 
*Choose OK, and reboot.
 +
2) Prepare the corresponding game ROMs.<br/>
 +
Recommended website: http://coolrom.com/<br/>
 +
You can download various game ROMs through the PC. For example, if we want to play Sony Playstation games, we can choose:<br/>
 +
[[File:Game-HAT-Manual06.png]]<br/>
 +
Find the game you want to play in it and download it. For example: http://coolrom.com/roms/psx/39719/Tekken_3.php<br/>
 +
Click here to download.<br/>
 +
[[File:Game-HAT-Manual07.png]]<br/>
 +
Unzip the downloaded file to get the following ROMs:<br/>
 +
[[File:600px-Game-HAT-Manual08.png]]<br/>
 +
3) Upgrade ROMs<br/>
 +
Connect the network cable to the Raspberry Pi (the Raspberry Pi needs to be in the same LAN as your PC). Find SHOW IP under the RetroPie list and press "A" to find the current Raspberry Pi IP. As shown below:<br/>
 +
[[File:600px-Game-HAT-Manual09.jpg]]<br/>
 +
Open the corresponding IP in your PC, as shown below:<br/>
 +
[[File:800px-Game-HAT-Manual10.png]]<br/>
 +
Copy ROMs to the corresponding directory, as shown below:<br/>
 +
[[File:600px-Game-HAT-Manual11.png]]<br/>
 +
Then, on the emulator selection interface, press "Start"->QUIT->RESTART EMULATIONSTATION, and press "A" to confirm. After restarting the emulator, you can see the newly added game.<br/>
 +
Then start your journey of retro gamepad!<br/>
 +
 +
 +
<!--
 
*Download ROMS of games you like
 
*Download ROMS of games you like
 
[[File:600px-Game-HAT-Manual08.png]]
 
[[File:600px-Game-HAT-Manual08.png]]
*Connect your Raspberry Pi to network (Make sure the network you connect is in the same LAN as your PC). Find SHOW IP in Retropie list, press “A” to query current IP address of your Raspberry Pi.
+
*Connect your Raspberry Pi to the network (Make sure the network you connect is in the same LAN as your PC). Find SHOW IP in the Retropie list, and press "A" to query the current IP address of your Raspberry Pi.
 
[[File:600px-Game-HAT-Manual09.jpg|400px]]
 
[[File:600px-Game-HAT-Manual09.jpg|400px]]
 
*Open it with the IP address on your PC
 
*Open it with the IP address on your PC
Line 292: Line 310:
  
 
[[File:600px-Game-HAT-Manual11.png]]
 
[[File:600px-Game-HAT-Manual11.png]]
*Then on emulator choose page, you can press “Start”->QUIT->RESTART EMULATIONSTAION, press “A” to confirm. Then restart emulator, you can find the game added.
+
*Then on the emulator choose the page, you can press “Start”->QUIT->RESTART EMULATIONSTAION, and press “A” to confirm. Then restart the emulator, and you can find the game added.
 +
 
 +
For more operations, you can read [https://retropie.org.uk/docs/ Retropie Instructions]-->
  
For more operations, you can read [https://retropie.org.uk/docs/ Retropie Instructions]
+
==WiFi Networking==
 +
===Retropie and raspberry pi OS set WIFI networking===
 +
*Download the following files, and extract the wpa_supplicant.conf file, open the wpa_supplicant.conf file, modify the SSID and password of WIFI and save the file. [[File:Wpa supplicant.zip ]]
 +
*Put the modified wpa_supplicant.conf file in the boot directory and restart the Raspberry Pi. (Connect the TF card to the PC through the card reader, and the opened root directory is the boot directory.)
 +
===recalbox Set WiFi Networking===
 +
*Press START to enter the main menu
 +
*Select network settings
 +
*Change "Enable WIFI" to "On"
 +
*Select "WIFI SSID" and enter your network name
 +
*Select "WIFI Password" and enter your network password
 +
[[File:GamePi2006.jpg]]<br/>
 +
*After connecting to WiFi, RecalBox should check the system update:
 +
[[File:GamePi2007.jpg]]<br/>
 +
 
 +
==Pinout Definition==
 +
The pins marked as "NC" below indicate that the LCD does not occupy this pin, and the user can use it for other applications.
 +
{| class="wikitable"
 +
|-
 +
! Pin # !! Identification !! Description
 +
|-
 +
| 1 || 3.3V || Power input (3.3V power input)
 +
|-
 +
| 2 || 5V || Power input (5V power input)
 +
|-
 +
| 3 || NC || NC
 +
|-
 +
| 4 || 5V || Power input (5V power input)
 +
|-
 +
| 5 || NC || NC
 +
|-
 +
| 6 || GND || Power Ground
 +
|-
 +
| 7 || B || BCM=4, WPI=7
 +
|-
 +
| 8 || NC || NC
 +
|-
 +
| 9 || GND || Power Ground
 +
|-
 +
| 10 || NC || NC
 +
|-
 +
| 11 || Y || BCM=17, WPI=0
 +
|-
 +
| 12 || Earphone jack || BCM=18, WPI=1
 +
|-
 +
| 13 || LCD_RESET || BCM=27, WPI=2
 +
|-
 +
| 14 || GND || Power ground
 +
|-
 +
| 15 || X || BCM=22, WPI=3
 +
|-
 +
| 16 || A || BCM=23, WPI=4
 +
|-
 +
| 17 || 3.3V || Power input (3.3V power input)
 +
|-
 +
| 18 || LCD_LED || BCM=24, WPI=5
 +
|-
 +
| 19 || LCD_MOSI || BCM=10, WPI=12
 +
|-
 +
| 20 || GND || Power ground
 +
|-
 +
| 21 || NC || NC
 +
|-
 +
| 22 || LCD_D/C || BCM=25, WPI=6
 +
|-
 +
| 23 || LCD_SCK || BCM=11, WPI=14
 +
|-
 +
| 24 || LCD_CS || BCM=8, WPI=10
 +
|-
 +
| 25 || GND || Power Ground
 +
|-
 +
| 26 || NC || NC
 +
|-
 +
| 27 || NC || NC
 +
|-
 +
| 28 || NC || NC
 +
|-
 +
| 29 || TL || BCM=5,WPI=21
 +
|-
 +
| 30 || GND || GND
 +
|-
 +
| 31 || TR || BCM=6,WPI=22
 +
|-
 +
| 32 || UP || BCM=12, WPI=26
 +
|-
 +
| 33 || RIGHT || BCM=13, WPI=23
 +
|-
 +
| 34 || GND || GND
 +
|-
 +
| 35 || NC || NC
 +
|-
 +
| 36 || SELECT || BCM=16, WPI=27
 +
|-
 +
| 37 || START || BCM=26, WPI=25
 +
|-
 +
| 38 || DOWN || BCM=20, WPI=28
 +
|-
 +
| 39 || GND || GND
 +
|-
 +
| 40 || LEFT || BCM=21, WPI=29
 +
|}
  
 
= Resources =
 
= Resources =
 
{{RPi Software}}
 
{{RPi Software}}
 
+
= FAQ =
 
+
{{FAQ|The screen does not light up after booting, what is the reason?
{{Service00}}
+
|
 +
1. Check whether the image provided by us has been programmed.<br/>
 +
2. Make sure that the Raspberry Pi is properly connected to the game console.<br/>
 +
3. Make sure the battery is sufficient.<br/>
 +
4. If you are using a Raspberry Pi Zero, please wait for about 1 minute after booting, because the performance of the Zero is relatively poor and the booting time is long.<br/>
 +
||}}
 +
{{FAQ|I made the system myself, but the NEO-GEO game cannot be played, what should I do?
 +
|Put [https://files.waveshare.com/upload/2/2b/Neogeo.zip Neogeo.zip] below the system bios/ and roms/neogeo/(Do not unzip it), and then reboot the system.
 +
||}}
 +
{{FAQ|What is the default password of recalbox?
 +
|Username: root; Password: recalboxroot
 +
||}}
 +
=Support=
 +
{{Servicebox1}}
  
 
[[Category:Game Machines| ]] [[Category:Expansions|Expansions]] [[Category:Raspberry Pi|Raspberry Pi]]
 
[[Category:Game Machines| ]] [[Category:Expansions|Expansions]] [[Category:Raspberry Pi|Raspberry Pi]]

Latest revision as of 10:09, 20 October 2023

GamePi20
GamePi20-8.jpg

A mini game console based on Raspberry Pi
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

Overview

Features

  • Support Raspberry Pi Zero/Zero W/Zero WH
  • 2inch IPS screen, 320 × 240 resolution
  • 60-frame experience, smooth display, no more frame loss
  • Support RetroPie game system and Recalbox game system, supporting thousands of classic games, as long as the TF card is big enough, you can add your favorite games arbitrarily
  • With a charging circuit, and a built-in 14500 lithium battery (not included) power supply, easy to carry and play at any time
  • Battery capacity indicator
  • Onboard speaker and earphone jack, listen to the familiar BGM from the old days

How to use it

Assembly

Hardware connection

  • Attach Raspberry Pi Zero/Zero W to GamePi20 extension board. Note that you need to first set up SD card according to the instruction below, before you assemble it.
  • Mount the extension board to the metal box.
  • Place conductive rubber mats and buttons on it, finally assemble the front panel.

To use the GamePi20, you can use the pre-configured image or install driver to a fresh image yourself.

Method 1: Pre-configured Images

  • Here we provide a pre-configured image, you can download and test.
OS Version Raspberry Pi Default user/password Download link
Recalbox 6.0-DragonBlaze Raspberry Pi 1/Zero/Zero W root/recalboxroot Google Drive
Recalbox v7.1.1 Raspberry Pi 1/Zero/ZeroW root/recalboxroot Google drive
Retropie v4.4 Raspberry Pi 1/Zero/Zero W pi/raspberry Google Drive
Retropie v4.7.1 Raspberry Pi 1/Zero/Zero W pi/raspberry Google Drive
Retropie v4.8 Raspberry Pi Zero 2W pi/raspberry Google Drive
  • Download the image file, unzip and write it to the SD card.
  • Insert the SD card to Raspberry Pi, assemble GamePi20 as #Hardware connection.
  • turn the switch to ON. Generally, LCD is light on and Raspberry Pi is booting. It may cause about 2 minutes for Raspberry Pi 1/zero/zero W to start.
    • Raspberry Pi is failed to start if the battery is low. In this case, you can connect 5V/2A power adapter to the Power interface for charging. Capacity indicators.
    • If the buttons cannot work normally, please add a line to the /boot/config.txt file, then reboot and try again.
dtparam=spi=on


Basic operations

  • Retropie
    1. After booting, you can select emulators by direction buttons on the left, then press "A" to confirm. For example, choose "A" and then "Start".
    2. Choose the games and press "A" to play.
    3. Press "Start"+"Select" buttons to exit games.
    4. You can adjust the potentiometer to adjust the volume. Or Press "Start" and choose "SOUND SETTINGS" to adjust the volume.
  • Recalbox
    1. After booting, you can select emulators by direction buttons on the left, then press "B" to confirm.
    2. Choose the games and press "A" to play, press "A" or "Start" to start the games.
    3. Press "Start"+"Select" buttons to exit games.
    4. you can adjust the potentiometer to adjust the volume. Or Press "Start" and choose "SOUND SETTINGS", press "B" confirm, then adjust "SYSTEM VOLUME" by the direction buttons.

Method 2: Install driver

Install driver on Retropie

Download the Retropie image from Retropie website.

Game-HAT-Manual01.jpg

1) Download the image file to the computer and unzip it to get the .img file.

2) Connect the TF card to the computer, open the Win32DiskImager.exe software, select the .img file prepared in step 1, and click write to burn the image.

3) Connect the SD card, keyboard, and HDMI display to Raspberry Pi, Turn the switch on the ON side to power on Raspberry Pi. Press F4 (Keyboard) after booting. You may require an ETH/USB HUB HAT in this steps.

4) Configure as below to enable fbtft module for displaying.

  • Download the driver from GitHub.
sudo apt-get install cmake
cd ~
git clone https://github.com/juj/fbcp-ili9341.git
  • Modify the source file to make the program support the current screen resolution.
cd fbcp-ili9341
nano st7735r.h
  • Find the following code and change the value of DISPLAY_NATIVE_HEIGHT from 240 to 320.
#if defined(ST7789) || defined(ST7789VW)
#define DISPLAY_NATIVE_WIDTH 240
#define DISPLAY_NATIVE_HEIGHT 320   //The original value was 240, changed to 320
#elif defined(ST7735R)
Gamepi20-001.png
  • Compile the program and run it.
mkdir build
cd build
cmake -DSPI_BUS_CLOCK_DIVISOR=20 -DWAVESHARE_ST7789VW_HAT=ON -DDMA_TX_CHANNEL=5 -DDMA_RX_CHANNEL=1 -DBACKLIGHT_CONTROL=ON -DSTATISTICS=0 ..
make -j
sudo ./fbcp-ili9341

After running the program, the screen will display an image, but the resolution may not be set, and the displayed image may not be completely accurate.

【Note】If a similar prompt appears as below, it means that the DMA channel has been occupied, and you need to modify the DMA channel and recompile.

bcm_host_get_peripheral_address: 0xfe000000, bcm_host_get_peripheral_size: 25165824, bcm_host_get_sdram_address: 0xc0000000
BCM core speed: current: 300000000hz, max turbo: 500000000hz. SPI CDIV: 10, SPI max frequency: 50000000hz
Allocated DMA channel 7
Allocated DMA channel 1
Enabling DMA channels Tx:7 and Rx:1
DMA hardware register file is at ptr: 0xb52ff000, using DMA TX channel: 7 and DMA RX channel: 1
DMA hardware TX channel register file is at ptr: 0xb52ff700, DMA RX channel register file is at ptr: 0xb52ff100
DMA RX channel 1 was assigned another peripheral map 1!
DMA channel 0 has peripheral map 0 (is lite channel: 0, currently active: 0, current control block: (nil))
DMA channel 1 has peripheral map 1 (is lite channel: 0, currently active: 1, current control block: 0xff0ea5a0)
DMA channel 2 has peripheral map 11 (is lite channel: 0, currently active: 1, current control block: (nil))
DMA channel 3 has peripheral map 10 (is lite channel: 0, currently active: 1, current control block: (nil))
DMA channel 4 has peripheral map 0 (is lite channel: 0, currently active: 0, current control block: (nil))
DMA channel 5 has peripheral map 6 (is lite channel: 0, currently active: 0, current control block: (nil))
DMA channel 6 has peripheral map 7 (is lite channel: 0, currently active: 0, current control block: (nil))
DMA channel 7 has peripheral map 0 (is lite channel: 1, currently active: 0, current control block: (nil))
DMA channel 8 has peripheral map 0 (is lite channel: 1, currently active: 0, current control block: (nil))
DMA channel 9 has peripheral map 0 (is lite channel: 1, currently active: 0, current control block: (nil))
DMA channel 10 has peripheral map 0 (is lite channel: 1, currently active: 1, current control block: (nil))
DMA channel 11 has peripheral map 13 (is lite channel: 0, currently active: 1, current control block: (nil))
DMA channel 12 has peripheral map 13 (is lite channel: 0, currently active: 0, current control block: (nil))
DMA channel 13 has peripheral map 13 (is lite channel: 0, currently active: 0, current control block: (nil))
DMA channel 14 has peripheral map 13 (is lite channel: 0, currently active: 0, current control block: (nil))
DMA RX channel was assigned another peripheral map!
  • Set auto-start when powered on.
sudo cp ~/fbcp-ili9341/build/fbcp-ili9341 /usr/local/bin/fbcp
sudo nano /etc/rc.local
Add sentence fbcp& in the front of exit 0

1in3 lcd fb5.png

Configure /boot/config.txt file.
sudo nano /boot/config.txt
#add lines below to the config.txt file
hdmi_force_hotplug=1
hdmi_cvt=640 480 60 1 0 0 0
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
display_rotate=2
dtoverlay=pwm

5)Install driver for josytic.

git clone https://github.com/waveshare/mk_arcade_joystick_rpi.git
cd mk_arcade_joystick_rpi
sudo ./install.sh 3
Finally, reboot it.
sudo reboot

6) Long-press the "A" button (GamePi20) to enter the configuration page, configure it by pressing related buttons (GamePi20), you can also long-press to skip any button.

After configuring, you can press "A" (GamePi20) to save configured and exit, or press "B" or "Start" (GamePi20) to exit without saving.

  • 【Note】If you find that there is no sound output, you need to modify the system's default sound card.

Open the configuration file and change the default sound card to sound card 1.

sudo vi /usr/share/alsa/alsa.conf  

Find the following two lines and modify them to correspond to the sound card.

defaults.ctl.card 1
defaults.pcm.card 1
GamePi20-10.jpeg

Install driver on Recalbox

Download the latest image from Recalbox website.

GamePi15-Manual-02.jpg

  • Unzip the files download to get the .img file.
  • Write the .img file to the SD card.
  • Copy the driver to the root directory of the SD card.
  • Connect the SD card, keyboard, and HDMI display to Raspberry Pi, Turn the switch on the ON side to power on Raspberry Pi. Press F4 then Alt+F2(Keyboard) after booting. (user: root; password: recalboxroot).
  • Setup display with commands below:
mount -o remount, rw /boot
mount -o remount, rw /
Configure modules file:
sudo nano /etc/modules.conf
Append lines to the file:
flexfb
fbtft_device
  • Enable SPI by adding a statement to config.txt.
sudo nano /boot/config.txt
add line below to the file.
dtparam=spi=on
  • Create a fbtft.conf
nano /etc/modprobe.d/fbtft.conf
Add two lines to the fbtft.conf file
options fbtft_device name=flexfb gpios=reset:27,dc:25,cs:8,led:24 speed=96000000 bgr=1 fps=60 custom=1 height=240 width=320
options flexfb setaddrwin=0 width=320 height=240, init=-1,0x11,-2,120,-1,0x36,0xA0,-1,0x3A,0x05,-1,0x21,-1,0x2A,0x00,0x01,0x00,0x3F,-1,0x2B,0x00,0x00,0x00,0xEF,-1,0xB2,0x0C,0x0C,0x00,0x33,0x33,-1,0xB7,0x35,-1,0xBB,0x1F,-1,0xC0,0x2C,-1,0xC2,0x01,-1,0xC3,0x12,-1,0xC4,0x20,-1,0xC6,0x0F,-1,0xD0,0xA4,0xA1,-1,0xE0,0xD0,0x08,0x11,0x08,0x0C,0x15,0x39,0x33,0x50,0x36,0x13,0x14,0x29,0x2D,-1,0xE1,0xD0,0x08,0x10,0x08,0x06,0x06,0x39,0x44,0x51,0x0B,0x16,0x14,0x2F,0x31,-1,0x29,-3
  • Reboot Raspberry Pi and check if fb1 is recognized under /dev.
reboot
  • Configure the rcS file.
nano /etc/init.d/rcS
Add a line to the rcS file.
fbcp &
  • Modify recalbox.conf. Please check it again after saving.
#global.videomode=CEA 4 HDMI
global.videomode=default
 
#global.ratio=auto
global.ratio=4/3
  • Modify /boot/config.txt file, add lines to it.
sudo nano /boot/config.txt
#Add
hdmi_force_hotplug=1
hdmi_cvt=640 480 60 1 0 0 0
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
dtoverlay=pwm
  • Finally, configure GPIO by modifying recalbox.conf file
# ------------ D2 - GPIO Controllers ------------ #
## GPIO Controllers
## enable controllers on GPIO with mk_arcarde_joystick_rpi (0,1)
controllers.gpio.enabled=1
## mk_gpio arguments, map=1 for one controller, map=1,2 for 2 (map=1,map=1,2)
controllers.gpio.args=map=5 gpio=12,20,21,13,26,16,23,4,6,17,22,5,-1
  • Reboot Raspberry Pi

Add New Games (Retropie)

Maybe the default games in the test image are not those you want, you can also add games as you like.

  • Size of most games is always large, so we need to expand the filesystem first. Choose RASPI-CONFIG on configure page and press enter.

600px-Game-HAT-Manual03.jpg

600px-Game-HAT-Manual04.jpg

  • Choose 7 Advanced Options -> A1 Expand Filesystem, Enter -> Finish, (physical keyboard is required).

600px-Game-HAT-Manual05.jpg

  • Choose OK, and reboot.

2) Prepare the corresponding game ROMs.
Recommended website: http://coolrom.com/
You can download various game ROMs through the PC. For example, if we want to play Sony Playstation games, we can choose:
Game-HAT-Manual06.png
Find the game you want to play in it and download it. For example: http://coolrom.com/roms/psx/39719/Tekken_3.php
Click here to download.
Game-HAT-Manual07.png
Unzip the downloaded file to get the following ROMs:
600px-Game-HAT-Manual08.png
3) Upgrade ROMs
Connect the network cable to the Raspberry Pi (the Raspberry Pi needs to be in the same LAN as your PC). Find SHOW IP under the RetroPie list and press "A" to find the current Raspberry Pi IP. As shown below:
600px-Game-HAT-Manual09.jpg
Open the corresponding IP in your PC, as shown below:
800px-Game-HAT-Manual10.png
Copy ROMs to the corresponding directory, as shown below:
600px-Game-HAT-Manual11.png
Then, on the emulator selection interface, press "Start"->QUIT->RESTART EMULATIONSTATION, and press "A" to confirm. After restarting the emulator, you can see the newly added game.
Then start your journey of retro gamepad!


WiFi Networking

Retropie and raspberry pi OS set WIFI networking

  • Download the following files, and extract the wpa_supplicant.conf file, open the wpa_supplicant.conf file, modify the SSID and password of WIFI and save the file. File:Wpa supplicant.zip
  • Put the modified wpa_supplicant.conf file in the boot directory and restart the Raspberry Pi. (Connect the TF card to the PC through the card reader, and the opened root directory is the boot directory.)

recalbox Set WiFi Networking

  • Press START to enter the main menu
  • Select network settings
  • Change "Enable WIFI" to "On"
  • Select "WIFI SSID" and enter your network name
  • Select "WIFI Password" and enter your network password

GamePi2006.jpg

  • After connecting to WiFi, RecalBox should check the system update:

GamePi2007.jpg

Pinout Definition

The pins marked as "NC" below indicate that the LCD does not occupy this pin, and the user can use it for other applications.

Pin # Identification Description
1 3.3V Power input (3.3V power input)
2 5V Power input (5V power input)
3 NC NC
4 5V Power input (5V power input)
5 NC NC
6 GND Power Ground
7 B BCM=4, WPI=7
8 NC NC
9 GND Power Ground
10 NC NC
11 Y BCM=17, WPI=0
12 Earphone jack BCM=18, WPI=1
13 LCD_RESET BCM=27, WPI=2
14 GND Power ground
15 X BCM=22, WPI=3
16 A BCM=23, WPI=4
17 3.3V Power input (3.3V power input)
18 LCD_LED BCM=24, WPI=5
19 LCD_MOSI BCM=10, WPI=12
20 GND Power ground
21 NC NC
22 LCD_D/C BCM=25, WPI=6
23 LCD_SCK BCM=11, WPI=14
24 LCD_CS BCM=8, WPI=10
25 GND Power Ground
26 NC NC
27 NC NC
28 NC NC
29 TL BCM=5,WPI=21
30 GND GND
31 TR BCM=6,WPI=22
32 UP BCM=12, WPI=26
33 RIGHT BCM=13, WPI=23
34 GND GND
35 NC NC
36 SELECT BCM=16, WPI=27
37 START BCM=26, WPI=25
38 DOWN BCM=20, WPI=28
39 GND GND
40 LEFT BCM=21, WPI=29

Resources

FAQ

 Answer:

1. Check whether the image provided by us has been programmed.
2. Make sure that the Raspberry Pi is properly connected to the game console.
3. Make sure the battery is sufficient.
4. If you are using a Raspberry Pi Zero, please wait for about 1 minute after booting, because the performance of the Zero is relatively poor and the booting time is long.

{{{5}}}


 Answer:
Put Neogeo.zip below the system bios/ and roms/neogeo/(Do not unzip it), and then reboot the system.

{{{5}}}


 Answer:
Username: root; Password: recalboxroot

{{{5}}}


Support



Technical Support

If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 AM GMT+8 (Monday to Friday)