Différences entre versions de « Rasp-PiGRRL-2-Logiciel »
Ligne 103 : | Ligne 103 : | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
− | | align="center" | Touche | + | | align="center" | '''Touche''' |
− | | align="center" | Broche | + | | align="center" | '''Broche''' |
− | | align="center" | GPIO | + | | align="center" | '''GPIO''' |
|- style="font-size: 90%" | |- style="font-size: 90%" | ||
| align="left" | ww | | align="left" | ww |
Version du 5 février 2018 à 22:02
Download & Burn RetroPie
Game emulation is handled by a package called RetroPie. It’s a complete Linux distribution designed specifically for running classic games on Raspberry Pi.
<a href="https://retropie.org.uk/download/">Download the current version from the RetroPie web site</a>, then <a href="../../../../adafruit-raspberry-pi-lesson-1-preparing-and-sd-card-for-your-raspberry-pi">write this to an SD card</a> using Etcher or similar software.
We’ll then make some modifications to tune this for the PiGRRL’s buttons and small display.
Setup will require an HDMI monitor, USB keyboard and a network connection (either WiFi or Ethernet). This is best done before the Pi is enclosed in the PiGRRL case. If you have a spare Raspberry Pi board around, that’s an ideal option…you could prepare the software on that system and then move the card over to the PiGRRL 2.
Setup RetroPie
Insert the RetroPie card to your Pi, attach monitor and keyboard (and Ethernet, if networking that way), then power the system from a USB power source (a USB phone charger or a powered USB hub can usually work). The system will automatically reboot once (it needs this to make use of the whole SD card), then on second boot it will ask to configure the game controls…
The PiGRRL buttons don’t work yet; this is normal. For initial setup, use the USB keyboard to select the D-pad directions (arrow keys), Start, Select, A and B keys. For anything else, just hold down the space bar or other key to skip that item . Don't worry, we'll re-do the keymap later once we've finished assembly! When finished, you’ll see a graphical interface called Emulation Station where you’ll select games and other options.
Let’s get this Raspberry Pi on the network first. If using Ethernet, it’s a simple matter of plugging in. If WiFi, from the main EmulationStation screen, access the RetroPie settings using whatever key you’ve assigned as the “A” button. You’ll see WIFI in this list:
Crédit: AdaFruit Industries www.adafruit.com
Here you can select your WiFi network name and enter a password. It’s not beautiful, but gets the job done.
Select “Exit” when done to return to the EmulationStation UI… |
With networking enabled, we can now access the remaining software needed for the PiGRRL 2 experience. There are a couple ways to do this…
- BEST: Use an ssh terminal client to log into the Raspberry Pi at retropie.local
This is recommended, as you can just copy-and-paste the commands that follow. The default name and password are “pi” and “raspberry,” respectively. - OR: Press “F4” to exit EmulationStation for a command-line prompt (works, but you’ll need to type these commands exactly).
Install PiTFT (fbcp) Support
This first sequence configures the system for the PiTFT display:
cd
curl -O https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/pitft-fbcp.sh
sudo bash pitft-fbcp.sh
Select the “PiGRRL 2” option, which sets up various system parameters to match this project.
Crédit: AdaFruit Industries www.adafruit.com
Crédit: AdaFruit Industries www.adafruit.com
Answer “NO” to the reboot question…
Installing Keypress (retrogame) support
let’s take care of this second script, which enables the PiGRRL buttons:
cd
curl -O https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/retrogame.sh
sudo bash retrogame.sh
Again, select the “PiGRRL 2” option. When finished, now you can reboot when prompted.
Crédit: AdaFruit Industries www.adafruit.com
After rebooting, the HDMI monitor may display a “no signal” message. This is normal. Not all monitors can handle the resolution setting we’re using. Once the PiTFT is wired up, that will be the primary display.
Also, after the system is assembled with the PiTFT and controls, you’ll need to re-do the controller setup. This might wait ’til all the parts are assembled in the case.
Uploading ROMs
Check out the Wiki on the RetroPie Setup page for how to upload ROMs:
Exiting ROMs
Retropie has changed how to exit out of ROMs/Emulators. Hold down the Pause & Start buttons at the same time to exit.
Remapping Controls
The buttons are premapped to work with NES and SNES emulators. If you'd like to remap the controls, you'll need to modify the retrogame.cfg file in /boot.
Make sure the Raspberry Pi is configured for Wifi. Open up terminal and ssh into the Pi. (Default username: pi password:raspberry)
<a href="../../../../retro-gaming-with-raspberry-pi/adding-controls-software">Then follow the retrogame tutorial to set it up the way you like!</a>
Testing Controls
If you log in (via SSH or F4 shell) you can see exactly what keypresses are detected by running evtest then select 1 (or whatever retrogame is numbered):
Crédit: AdaFruit Industries www.adafruit.com
Make sure each keypress works and matches the table below!
Default Controls
Below is a table of the controls set to the GPIO. Use this as a reference if you ever need to revert when changing something.
Touche | Broche | GPIO |
ww | xx | yyyy |
LEFT | Broche 7 | GPIO 4 |
UP | Broche 36 | GPIO 16 |
RIGHT | Broche 35 | GPIO 19 |
DOWN | Broche 37 | GPIO 26 |
SELECT | Broche 29 | GPIO 5 |
START | Broche 31 | GPIO 6 |
A | Broche 8 | GPIO 14 |
B | Broche 10 | GPIO 15 |
X | Broche 38 | GPIO 20 |
Y | Broche 12 | GPIO 18 |
L | Broche 32 | GPIO 12 |
R | Broche 33 | GPIO 13 |
Source: PiGRRL 2 - Make a portable Raspberry Pi 2 game console
Créé par les frères Ruiz pour AdaFruit Industries.
Traduction réalisée par Wrotny A pour MCHobby.be.
Toute référence, mention ou extrait de cette traduction doit être explicitement accompagné du texte suivant : « Traduction par MCHobby (www.MCHobby.be) - Vente de kit et composants » avec un lien vers la source (donc cette page) et ce quelque soit le média utilisé.
L'utilisation commercial de la traduction (texte) et/ou réalisation, même partielle, pourrait être soumis à redevance. Dans tous les cas de figures, vous devez également obtenir l'accord du(des) détenteur initial des droits. Celui de MC Hobby s'arrêtant au travail de traduction proprement dit.
Traduit avec l'autorisation d'AdaFruit Industries - Translated with the permission from Adafruit Industries - www.adafruit.com