Différences entre versions de « Rasp-PiGRRL-2-Logiciel »

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
(Page créée avec « {{Rasp-PiGRRL-2-NAV}} {{traduction}} {{Rasp-PiGRRL-2-TRAILER}} »)
 
Ligne 2 : Ligne 2 :
  
 
{{traduction}}
 
{{traduction}}
 +
 +
== 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:
 +
 +
{{ADFImage|Rasp-PiGRRL-2-Logiciel-01.png|640px}}
 +
 +
{{asm-begin}}
 +
{{asm-row|img=Rasp-PiGRRL-2-Logiciel-02.png}}
 +
{{asm-text}}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…
 +
 +
{{asm-end}}
 +
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''' <br>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:
 +
 +
<syntaxhighlight lang="bash">
 +
cd
 +
curl -O https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/pitft-fbcp.sh
 +
sudo bash pitft-fbcp.sh
 +
</syntaxhighlight>
 +
 +
Select the “PiGRRL 2” option, which sets up various system parameters to match this project.
 +
 +
{{ADFImage|Rasp-PiGRRL-2-Logiciel-03.png|640px}}
 +
 +
{{ADFImage|Rasp-PiGRRL-2-Logiciel-04.png|640px}}
 +
 +
Answer “'''NO'''” to the reboot question…
 +
 +
== Installing Keypress (retrogame) support ==
 +
let’s take care of this second script, which enables the PiGRRL buttons:
 +
 +
<syntaxhighlight lang="bash">
 +
cd
 +
curl -O https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/retrogame.sh
 +
sudo bash retrogame.sh
 +
</syntaxhighlight>
 +
 +
Again, select the “PiGRRL 2” option. When finished, ''now'' you can reboot when prompted.
 +
 +
{{ADFImage|Rasp-PiGRRL-2-Logiciel-05.png|640px}}
 +
 +
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.'''
 +
 +
{{asm-begin}}
 +
{{asm-row|img=Rasp-PiGRRL-2-Logiciel-06.png}}
 +
{{asm-text}}From the main EmulationStation screen, press whatever key was assigned to the “Start” button to access the main menu. You’ll find an option here for “CONFIGURE INPUT.”
 +
 +
Go through the control setup process again using the PiGRRL buttons now instead of the keyboard; assign the D-pad directions, Start and Select buttons, A, B, X and Y. For anything else, hold down a key or button to skip it.
 +
 +
{{asm-end}}
 +
 +
=== Uploading ROMs ===
 +
Check out the Wiki on the RetroPie Setup page for how to upload ROMs:
 +
 +
{{download-box|Retropie - Téléverser les ROMs|https://github.com/petrockblog/RetroPie-Setup/wiki/How-to-get-ROMs-on-the-SD-card}}
 +
 +
=== 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):
 +
 +
{{ADFImage|Rasp-PiGRRL-2-Logiciel-07.png|640px}}
 +
 +
Make sure each keypress works and matches the table below!
 +
 +
<h2>
 +
<a href="#default-controls" class="anchor-link"><span class="fa fa-link"></span></a><span id="default-controls" class="anchor-link-target"></span>Default Controls</h2>
 +
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.
 +
  
 
{{Rasp-PiGRRL-2-TRAILER}}
 
{{Rasp-PiGRRL-2-TRAILER}}

Version du 5 février 2018 à 21:46


MCHobby investit du temps et de l'argent dans la réalisation de traduction et/ou documentation. C'est un travail long et fastidieux réalisé dans l'esprit Open-Source... donc gratuit et librement accessible.
SI vous aimez nos traductions et documentations ALORS aidez nous à en produire plus en achetant vos produits chez MCHobby.
Page-under-construction.pngPage(s) en cours de traduction/élaboration.

Page(s) under translation/construction

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:

Rasp-PiGRRL-2-Logiciel-01.png
Crédit: AdaFruit Industries www.adafruit.com

Rasp-PiGRRL-2-Logiciel-02.png 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.

Rasp-PiGRRL-2-Logiciel-03.png
Crédit: AdaFruit Industries www.adafruit.com

Rasp-PiGRRL-2-Logiciel-04.png
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.

Rasp-PiGRRL-2-Logiciel-05.png
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.

Rasp-PiGRRL-2-Logiciel-06.png From the main EmulationStation screen, press whatever key was assigned to the “Start” button to access the main menu. You’ll find an option here for “CONFIGURE INPUT.”

Go through the control setup process again using the PiGRRL buttons now instead of the keyboard; assign the D-pad directions, Start and Select buttons, A, B, X and Y. For anything else, hold down a key or button to skip it.

Uploading ROMs

Check out the Wiki on the RetroPie Setup page for how to upload ROMs:

Download-icon.pngRetropie - Téléverser les 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):

Rasp-PiGRRL-2-Logiciel-07.png
Crédit: AdaFruit Industries www.adafruit.com

Make sure each keypress works and matches the table below!

<a href="#default-controls" class="anchor-link"></a>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.



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