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}} |