Difference between revisions of "Template:Game HAT User Manual"

From Waveshare Wiki
Jump to: navigation, search
(Created page with "===Hardware Connection=== *Insert Raspberry Pi to Game HAT (GPIO pins header) *Connect HDMI. Insert the HDMI connector to screen and Raspberry Pi *: If you use Raspberry Pi Ze...")
 
Line 5: Line 5:
 
*Toggle the Battery switch of Game HAT to OFF, and mount 18650 battery to it.
 
*Toggle the Battery switch of Game HAT to OFF, and mount 18650 battery to it.
 
===Method 1, Use Pre-build Image===
 
===Method 1, Use Pre-build Image===
 +
*[https://1drv.ms/u/s!At1XVmt1PVrlfqcqVJ-qADpAINE?e=VQDd3L Rertropie Image for Pi4]
 
*[https://drive.google.com/open?id=1alJePNBE_6SeOuvbvhOmbUbPdDOlxASZ Retropie Image for Pi2/3]
 
*[https://drive.google.com/open?id=1alJePNBE_6SeOuvbvhOmbUbPdDOlxASZ Retropie Image for Pi2/3]
 
*[https://drive.google.com/file/d/1D08leiE1rAzlbdEb0-pBvw3kRFnxS5C9/view?usp=drive_open Retropie Image for Pi Zero]
 
*[https://drive.google.com/file/d/1D08leiE1rAzlbdEb0-pBvw3kRFnxS5C9/view?usp=drive_open Retropie Image for Pi Zero]
*:'''If you use Pi 4, please install the driver manually'''
 
 
*Unzip the ZIP and write the image file to TF card
 
*Unzip the ZIP and write the image file to TF card
 
*Inset the ready TF card to your Raspberry Pi, toggle Battery switch to ON.
 
*Inset the ready TF card to your Raspberry Pi, toggle Battery switch to ON.

Revision as of 06:48, 28 September 2020

Hardware Connection

  • Insert Raspberry Pi to Game HAT (GPIO pins header)
  • Connect HDMI. Insert the HDMI connector to screen and Raspberry Pi
    If you use Raspberry Pi Zero/Raspberry Pi Zero W, you need to use HDMI cable
  • Toggle the Battery switch of Game HAT to OFF, and mount 18650 battery to it.

Method 1, Use Pre-build Image

  • Rertropie Image for Pi4
  • Retropie Image for Pi2/3
  • Retropie Image for Pi Zero
  • Unzip the ZIP and write the image file to TF card
  • Inset the ready TF card to your Raspberry Pi, toggle Battery switch to ON.
    If the battery is low, Raspberry Pi cannot startup. In this case, you can connect a 5V/2A power supply to the Power interface of Game HAT for charging. The charge indicator will flicker when charging. You can play during charging but note that Raspberry Pi will reboot automatically if you disconnect the power supply.
    If the battery is full Raspberry Pi will start up normally.
  • After entering OS, you can choose emulators by joystick. For example, choose the Nintendo emulator and press “A” to confirm.
  • You can see there are some games. Choose one and press “A” to enter. After the cutscene, you can press the “A” or “Start” key to start the game.
  • If you want to exit from the current game, you can press buttons “Start” and ”Select” at the same times
  • You can press the 4 buttons on the right side of Game HAT to adjust volume and brightness of LCD, Press Menu to open the OSD menu, and press Up/Left or Down/Right to choose options, then press Menu to confirm option and adjust it. Finally, press Exit to exit the OSD menu.

Method 2. Install Driver Manually (Retropie)

  • Game-HAT-200730
  • Please download the Retropie image on the Retropie website according to the type of your Raspberry Pi.
Game-HAT-Manual01.jpg
  • Download and unzip it to get .img file
  • Write the .img file to TF card by Win32DiskImager.exe
  • After writing, copy the Game HAT driver you download to the root directory of the TF card.
  • Open the config.txt file which is also on the root directory, append these statements to the config file
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt=640 480 60 1 0 0 0
  • Inset the TF card and a USB keyboard to Raspberry Pi, open Battery switch to power on Raspberry Pi. After booting, press F4 to open Terminal.
  • Execute commands as blow. (Make sure you have copy driver to Raspberry Pi)
sudo tar xzvf /boot/Game-HAT-*.tar.gz
cd Game-HAT/
sudo ./Game-HAT
  • Reboot Raspberry Pi. Long press the “A” button (other keys are OK as well) to enter the buttons configuration page. Configure keys as below. You can also long-press “A” or other buttons to pass the configuration.
Game-HAT-Manual02.jpg
  • After configuring:
    Press the “A” button to save configurations and exit.
    Or press the “B” button to cancel configurations and exit without saving.
  • The configuration is finished and you can try to play games now.

Add New Game

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 the filesystem fist. 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.
  • Download ROMS of games you like

600px-Game-HAT-Manual08.png

  • 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 Retropie list, press “A” to query the current IP address of your Raspberry Pi.

600px-Game-HAT-Manual09.jpg

  • Open it with the IP address on your PC

800px-Game-HAT-Manual10.png

600px-Game-HAT-Manual11.png

  • Then on the emulator choose the page, you can press “Start”->QUIT->RESTART EMULATIONSTAION, press “A” to confirm. Then restart the emulator, you can find the game added.

For more operations, you can read Retropie Instructions

Method 2. Install Driver Manually (Recalbox)

  • Download the newest Recalbox image

https://forum.recalbox.com/topic/16576/february-2019-beta-version/2

Game-HAT-Manual12.jpg

  • Write the image to your TF card and modify config.txt file

Add lines to config.txt file:

hdmi_force_hotplug=1
avoid_warnings=1
max_usb_current=1
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 640 480 60 6 0 0 0
hdmi_drive=2
display_rotate=0
  • Access Recalbox by SSH (network is required)

User:root Passwird:recalboxroot

Modify recalbox file

nano /recalbox/share/system/recalbox.conf

Change the line "controllers.gpio.enabled=0" to "controllers.gpio.enabled=1"

Change the line "controller.gpio.args=map=1,2" to "controllers.gpio.args=map=4 gpio=5,6,13,19,21,4,26,12,23,20,16,18,-1"

  • Modify recalbox-config.sh file
mount -o remount, rw /
nano /recalbox/scripts/recalbox-config.sh

After the following lines
mode="$2"
extra1="$3"
extra2="$4"
Add a line extra3="$5"
Find the following part
Game-HAT-Manual13.jpg
Change map="$extra2" to map="$extra2 $extra3"

  • Save and reboot Raspberry Pi. After booting, long-press any buttons of Game HAT to configure the keys.

Setup WIFI

Setup WIFI in Retropie or Raspberry Pi OS

  • Download the archive below and unzip it to get the wpa_supplicant.conf file, open and modify the SSID and password, then save it.

wpa_supplicant.zip

  • Copy the modified wpa_supplicant.conf file to the root directory of Raspberry Pi OS/Retropie and reboot.

Setup WIFI in Recalbox OS

  • Press START to enter the MENU按
  • Choose NETWORK SETTING
  • Set the ENABLE WIFI to ON
  • Choose "WIFI SSID" and enter the SSID
  • Choose "WIFI KEY" and enter the password

GamePi-Manual-01.jpg

  • After connecting, RecalBox will check updating.

GamePi-Manual-02.jpg

Interfaces

NC: Not connected

PIN SYMBOL Description
1 3.3V 3.3V power input
2 5V 5V Power input
3 NC NC
4 5V 5V Power input
5 NC NC
6 GND Ground
7 Select BCM=4,WPI=7
8 NC NC
9 GND Ground
10 NC NC
11 NC NC
12 TL BCM=18,WPI=1
13 NC NC
14 GND Ground
15 NC NC
16 TR BCM=23,WPI=4
17 3.3V 3.3V power input
18 NC NC
19 NC NC
20 GND 电源地
21 NC NC
22 NC NC
23 NC NC
24 NC NC
25 GND 电源地
26 NC NC
27 NC NC
28 NC NC
29 UP BCM=5,WPI=21
30 GND GND
31 DOWN BCM=6,WPI=22
32 B BCM=12,WPI=26
33 LEFT BCM=13,WPI=23
34 GND GND
35 RIGHT BCM=19,WPI=24
36 X BCM=16,WPI=27
37 A BCM=26,WPI=25
38 Y BCM=20,WPI=28
39 GND GND
40 START BCM=21,WPI=29