Retropie gpio adapter

Retropie gpio adapter DEFAULT

Overview

The module for retro game controllers allows connecting various home computer joysticks and console gamepads to Raspberry Pi via GPIO with a minimal amount of extra hardware. The module consists of 2 drivers, each of which supports different types of controllers:

gamecon_gpio_rpi:

  • NES gamepads
  • SNES gamepads and mouses
  • PSX/PS2 gamepads, wheels and DDR controllers
  • N64 controllers
  • Gamecube controllers

db9_gpio_rpi:

  • Atari, Commodore, Amiga etc. DB9 multisystem joysticks
  • Sega Mega Drive (Genesis) pads
  • Sega Saturn controllers (Note: custom connector instead of DB9)
  • Amiga CD32 pads

Installation

The easiest way to install the drivers is via RetroPie-Setup script by selecting Manage Packages, then Manage Driver Packages, then gamecondriver.

Alternatively, .deb-packages for the drivers and kernel headers can be directly downloaded here.

Upstream project source can be obtained directly from:

  • https://github.com/marqs85/gamecon_gpio_rpi
  • https://github.com/marqs85/db9_gpio_rpi

Configuration

The drivers are loaded/unloaded with . More information and connection diagrams are found in the driver sub-pages and in provided READMEs.


Introduction

is a kernel module which allows interfacing various retro gamepads with Raspberry Pi's GPIO. It's based on the module from Linux Input Driver project, but has some additions and modifications. The goal is make the driver simple but versatile, making it easy and cheap to use gamepads with Pi. Most pads can be connected with just a few wires, although controller sockets provide a more lasting way for those who have them.

Controller support

The driver supports up to 4 controllers of the following types (can be mixed freely):

  • NES gamepads
  • SNES gamepads and mouses
  • PSX/PS2 gamepads, wheels and DDR controllers
  • N64 gamepads
  • Gamecube gamepads

GPIO interface

Depending on the number and type of pads, the interface needs 3 to 11 GPIO pins. Pi's GPIO data pins operate at 3.3V, and the Pi's 3.3V GPIO pin is rated at max 50mA (see here for more info). This generates a few very important rules which should be read before connecting any gamepads.

  1. All gamepads must use 3.3V supply regardless which they were designed for. Some older controllers (e.g. NES, SNES) originally used 5V, but they should operate fine with 3.3V (with a few exceptions - see FAQ). The Pi's 5V GPIO pin shouldn't be used without using level shifters or clamps on the input data pins, so don't use it unless you know what you are doing.

  2. The current limit is sufficient for 4 normal controllers, but e.g. 3rd party pads with extra LEDs, fans, etc should be avoided if they are powered from the main supply.

The pinout summary can be seen below. The power and ground pins are common for all pads, thus requiring splitters (i.e. a breadboard + pinheaders) when using multiple pads. Detailed information on connecting the pads can be found at the module's README ().

NOTE: Raspberry Pi Board revision 2 (all RPi variants manufactured after 09/2012) has different GPIO IDs for PAD1 & PAD2 pins, which must be taken into account when loading the driver.

GPIO interface for gamecon

The actual interconnect (NES/SNES/N64) can be made from female-to-female jumper wires and a single conductor wires with the other end folded in double (see here and here). For PSX pads, the jumper wires are enough by themselves. The only hard one is GC pad, which must be opened to make a good connection for the wires.

Installation and usage

Automatic Installation

The easiest way to install the module is with the RetroPie-Setup script. Just remember to upgrade your firmware () before installing the module, as it is built automatically using the configuration data from the latest RPi kernel. This also means that a firmware update afterwards can break the compatibility, but this is easily fixed by reconfiguration/update of the module (see FAQ).

In addition to install/update, RetroPie-Setup also contains an option to permanently enable configuration for 2 SNES pads connected to PAD2 & PAD3 pins (designed for the RetroPie GPIO Adapter). This configures the driver as for rev01 boards and for rev02 boards, for a definition of these settings see below in "Additional Gamecon Configuration Details".

Manual Installation

Install the driver as described above using the Retropie Setup-Script. Do not configure the drivers using the Retropie Setup-Script.

Two files need to be modified to enable the gamecon_gpio_rpi driver and gamecon controller configuration to automatically load when Retropie launches.

  1. Add the text to the file then save the file. This loads the driver on boot.
  2. Add the text to the file This configures the driver.

IMPORTANT: ‘#’ must be replaced with your configuration of controller types (No Controller='0', SNES='1', NES='2', etc.) at the location that corresponds to the physical pin location you are using as outlined below in "Additional Gamecon Configuration Details".

Example 1: On a RPI2 or RPI3 to have a NES controller connected to physical pin 3 (Gamepad5) and an SNES controller connected to physical pin 5 (Gamepad6) write: to the file

Example 2: On a RPI2 or RPI3 to have a SNES controller connected to physical pin 7 (Gamepad3) and an SNES controller connected to physical pin 26 (Gamepad4) write: to the file

Example 3: On a Raspberry Pi B to have a NES controller connected to physical pin 3 (Gamepad1) and an SNES controller connected to physical pin 5 (Gamepad2) write: to the file

Additional Gamecon Configuration Details

The driver requires the user to define its configuration () of the type of controllers (NES, SNES, etc) and physical pin location on the RPI GPIO board according to the following format definition and board revision (rev01, rev02):

Controller Type Legend
0 = No connection
1 = SNES gamepad
2 = NES gamepad
3 = Gamecube gamepad
6 = N64 gamepad
7 = PSX/PS2 gamepad
8 = PSX DDR gamepad
9 = SNES mouse

NES/SNES Controller Data Pin Location Legend
Rev01 board (Raspberry Pi B)
Gamepad1 = GPIO0 = Physical Pin03
Gamepad2 = GPIO1 = Physical Pin05
Gamepad3 = GPIO4 = Physical Pin07
Gamepad4 = GPIO7 = Physical Pin26

Rev02 board (Raspberry Pi A, B+, 2, 3)
Gamepad3 = GPIO4 = Physical Pin07
Gamepad4 = GPIO7 = Physical Pin26
Gamepad5 = GPIO2 = Physical Pin03
Gamepad6 = GPIO3 = Physical Pin05

NES/SNES File definition for
Rev01 board (Raspberry Pi B)

Rev02 board (Raspberry Pi A, B+, 2, 3)

IMPORTANT: Gamepad1 & Gamepad2 are only available on the Raspberry Pi B. Future versions of the Raspberry Pi have hidden these GPIO connections, i.e. no physical pin exists. If you are using a Raspberry Pi B+, 2 or 3 you will NOT use Gamepad1 or Gamepad2 connections and they must be assigned ‘0’ as their controller type in the gamecon.conf file.

Questions and feedback

Related thread in Raspberry Pi forum.

TODO

  • Add support for N64's rumble pak

FAQ

  • Q: I get these errors when loading the module: "ERROR: could not insert 'gamecon_gpio_rpi': Exec format error", "gamecon_gpio_rpi: disagrees about version of symbol module_layout"
  • A: This means that the module has not been built against the current kernel version. This can happen if firmware is not up-to-date during installation, or by a firmware update afterwards. To fix this, remove and reinstall the drivers with the RetroPie-Setup script.
  • Q: NES pads only report A-button correctly, or do not react at all
  • A: NES controllers are designed to be used with 5V supply, and are not guaranteed to work directly with 3.3V supply. Based on various reports, pads tested seem to fall into 3 categories:
  1. Fully 3.3V compliant. The pads falling into this category can be powered directly from 3.3V supply as described above, and do not need any extra hardware.

  2. 3.3V logic level compatible. These pads need to be powered from 5V supply (pin P1-02 on the RPi pin header) for correct operation, but RPi output pins (NES_CLK, NES_LTC) can be directly connected to corresponding pad input pins. A protection circuit is strongly recommended between pad output data pin and RPi input pin (PAD1-4), since output logic level is now 5V and input pins are not 5V-tolerant. The clamp circuit can be built from a 3.3V zener diode and ~200ohm resistor. Alternatively, a logic IC such as 74LVC245 can be used for level conversion.

  3. Only 5V compliant. Otherwise same as previous, but NES_CLK and NES_LTC must be converted to 5V logic level to be recognizable by the pad. That can be done with 74HCT244 - see this post for more info.

  • Q: PSX pads do not operate reliably or at all
  • A: GPIO pins P1-07 and P1-26 do not have on-board pullup resistors which are required for reliable operation with PSX/PS2 pads. Connect an external pullup resistor (1.8k-4.7k) between the pin and 3.3V (P1-01) if you use it with PSX/PS2 pad.
  • Q: N64/GC pads do not operate reliably
  • A: These pads use an asynchronous communication prototol, and the bitbanging done by the driver assumes a fixed CPU frequency within certain limits. Power-saving features may break the operation, and should be disabled when using N64/GC pads. You can check whether frequency scaling is active by looking at /sys/devices/system/cpu/cpu0/cpufreq/scaling_* -nodes. It can be disabled by selecting "performance"-governor - see this page for more info.

Version history

1.4 (30.05.2019)

  • Fixed build on recent kernels

1.3 (27.8.2017)

  • Fixed build on recent kernels

1.2 (27.12.2015)

  • Optimized PSX driver code

1.0 (27.2.2015)

0.9 (17.10.2012)

  • added support for rev.2 board gpio pins
  • improved robustness with N64 / GC pad reads
  • improved performance with PSX controllers
  • restore psx_delay-option for setting psx access delay

0.5 (27.8.2012)

  • first DKMS-enabled version
  • added support for GC and PSX controllers

0.1 (7.8.2012)


Introduction

is a driver (kernel module) for DB9 joysticks and gamepads connected to Raspberry Pi's GPIO. The driver is adapted from parport-targeted DB9 kernel module to GPIO, and has some additions and modifications. Connection of DB9 joysticks to RPi's GPIO requires no extra hardware in most cases, providing easy and cheap way for using retro joysticks with RetroPie.

Joystick support

The list of supported DB9 joysticks is below. Since the number of GPIO pins is limited, only 2 joysticks can be used simultaneously.

  • Atari, Commodore, Amiga etc. db9 multisystem joysticks (1-3 buttons)
  • Sega Mega Drive (Genesis) pads
  • Sega Saturn controllers (Note: custom connector instead of db9)
  • Amiga CD32 pads

GPIO interface

The available GPIOs are divided into 2 ports, PORT1 and PORT2. Both use 7 data pins, which are in identical locations on all RPi board variants. Additionally, the joysticks require either ground, or both ground and power pins depending on the type. These pins are common for both ports.

Pi's GPIO data pins operate at 3.3V and aren't 5V tolerant (see this), so 3.3V '''must''' be used for joysticks requiring power even though they'd be designed for 5V. However, some TTL-based joysticks may not function correctly using 3.3V supply. If they need to be powered from 5V, level shifters must be added between output pins of joystick and GPIO input pins. For example, 74LVC245 is an IC which can be used for this downconversion.

Below is an illustration which shows the pins used by the driver, with the mappings listed in a table next to it. Pin numbers are identical for all board revisions: the image represents the complete gpio block for A/B boards, and the top portion of the gpio block of A+/B+/Model B boards.

Button/FunctionPORT1 GPIO pinPORT2 GPIO pin
UP415
DOWN717
LEFT818
RIGHT922
FIRE11023
FIRE2 / SELECT11124
FIRE3 / SELECT01425

Joystick connection matrix

DB9 pinAtari basic joystickC64 joystickMD/Genesis padSaturn controller (non-db9)CD32 pad
1UPUPUP-UP
2DOWNDOWNDOWNDOWNDOWN
3LEFTLEFTLEFTUPLEFT
4RIGHTRIGHTRIGHTSELECT0RIGHT
5--3.3VSELECT1SELECT0
6FIRE1FIRE1FIRE13.3VSELECT1
7-3.3VSELECT0RIGHT3.3V
8GNDGNDGNDLEFTGND
9--FIRE2GNDFIRE1

More information on the connections is provided in the driver README ().

Usage

The module is loaded and configured with . This is explained shortly in the parent page and in detail in the driver README. The joystick IDs for are listed below:

IDDescription
0(No joystick)
1Multisystem 1-button joystick
2Multisystem 2-button joystick
3Multisystem 3-button joystick
4MD/Genesis pad (3+1 buttons)
5MD/Genesis pad (5+1 buttons)
6MD/Genesis pad (6+2 buttons)
7Sega Saturn controller
8Amiga CD32 gamepad

Questions and feedback

Related thread in Raspberry Pi forum.

FAQ

  • Q: I get these errors when loading the module: "ERROR: could not insert 'db9_gpio_rpi': Exec format error", "db9_gpio_rpi: disagrees about version of symbol module_layout"
  • A: This means that the module has not been built against the current kernel version. This can happen if the fw is not up-to-date during installation, or by a fw update afterwards. To fix this, run "Install/update multi-console gamepad drivers for GPIO"-option in RetroPie setup.

Version history

1.2 (30.05.2019)

  • Fixed build on recent kernels

1.1 (27.8.2017)

  • Fixed build on recent kernels

1.0 (27.2.2015)

  • Added support for RPi2
  • Fixed issues with 3rd-party MD pads

0.7 (28.4.2013)

Sours: https://retropie.org.uk/docs/GPIO-Modules/

RetroPie Image with Built-in Support for USB Audio, GPIO Controller Inputs, and DPI

Posted on by tinkerBOY— 20 Comments

I have tested these RetroPie images myself and included all the necessary software and settings.

Download and extract the compressed file using 7-zip.

These images should work with the tinkerBOY Controller v3.0 without changing anything.

In order to use the Adafruit Retrogame program for the GPIO controller inputs with the tinkerBOY Controller v2.0.1, v1.1, or v.1.2 you just need to uncomment the line  from  and edit the file at to match your GPIO configuration.

The tinkerBOY DPI Adapter v1.0 also works with these images out of the box.

20 thoughts on “RetroPie Image with Built-in Support for USB Audio, GPIO Controller Inputs, and DPI”

  1. […] With the builtin usb serial communication of the tinkerBOY Controller v3.0 you can easily enable or disable Analog Joysticks through software. In order to do that, you need install the minicom program by following the instruction at tinkerBOY Controller v3.0: Settings or proceed if you’re using my pre-built RetroPie image. […]

  2. […] With the builtin usb serial communication of the tinkerBOY Controller v3.0 you can easily enable or disable Digital Volume  In order to do that, you need install the minicom program by following the instruction at tinkerBOY Controller v3.0: Settings or proceed if you’re using my pre-built RetroPie image.. […]

  3. I just finished my first gameboy zero using the tinkerboy 2.0.1 and it is running, but the controls are not working. Is it necessary to use the pressure built image to get them working? I am able to plug in my USB keyboard to navigate, but I’m not able to use the tinkerboy pad.

    1. I know the official RetroPi 4.4 has a firmware bug that causes composite video out to not work. Does this custom image have that issue as well? If so, how can I use the latest 4.4.1 official firmware and install the drivers necessary for this board?

        1. Hi tinkerBOY, thanks for all the stuff I got in the past week. I was wondering if it is possible to get a stand-alone package of the setting from that retro pie image?

          I’m wanting to use a tinkerboard s for more power. Thanks very much.

          1. I don’t know what to do anymore so that your v3 license plate recognizes me. Everything is installed with your personalized image, your motherboard and as indicated in your guide and I can’t make you recognize the buttons.

            1. Is there a way for me to install this on a banana pi m2 zero? I’m trying to get retrorangepi SLIM installed… would it be possible to get the files necessary for the controller to work on that?

                1. Thanks for doing this! Do you know if updating RetroPie will mess up your custom scripts and config files? I tried to configure everything myself on a newer version of RetroPie, but was running into issues. I’m using this image for now, but it would be nice to update to a newer one. Afraid of messing anything up though.

                This site uses Akismet to reduce spam. Learn how your comment data is processed.

                Sours: https://www.tinkerboy.xyz/retropie-image-with-built-in-support-for-usb-audio-gpio-controller-inputs-and-dpi/
                1. Thermador refrigerator panels
                2. Naruto sage kurama mode
                3. Cheap auto insurance lakeland fl
                4. Primax jobs

                Tindie

                We have MOVED our shop. Please find us at PETROCKBLOG.STORENVY.COM

                A GPIO adapter for the Raspberry Pi versions 1/2 and model A/B that allows an easy and safe connection to, for example, two NES or SNES controllers. It provides circuitry protection against transients and over currents as well as a momentary switch button for arbitrary use.

                This revision 2.X version of the adapter is compatible to the all Raspberry Pi (TM) models including B+.

                In order to connect to SNES controllers to the Pi with this kit, you only need to have two SNES connectors, which could be taken, e.g., from extension cables such as those from here.

                You can find an article with a detailed description of the adapter here. The SMD parts of the adapter are already soldered, so that you just have to solder the though-hole parts. The images on the left also give an overview about all parts of the package.

                An easy to follow "getting started" guide can be found at here.

                Sours: https://www.tindie.com/products/petrockblog/retropie-gpio-adapter/
                Arcade1Up power and volume on Raspberry Pi 3 with GPIO
                6:44:38.717115 IP (tos 0x0, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 348) 0.0.0.0.68 > 255.255.255.255.67: [no cksum] BOOTP/DHCP, Request from b8:27:eb:28:f6:6d, length 320, xid 0x26f30339, Flags [none] (0x0000) Client-Ethernet-Address b8:27:eb:28:f6:6d Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Discover Parameter-Request Option 55, length 12: Vendor-Option, Vendor-Class, BF, Option 128 Option 129, Option 130, Option 131, Option 132 Option 133, Option 134, Option 135, TFTP ARCH Option 93, length 2: 0 NDI Option 94, length 3: 1.2.1 GUID Option 97, length 17: 0.68.68.68.68.68.68.68.68.68.68.68.68.68.68.68.68 Vendor-Class Option 60, length 32: "PXEClient:Arch:00000:UNDI:002001" END Option 255, length 0 16:44:41.224619 IP (tos 0x0, ttl 64, id 57713, offset 0, flags [none], proto UDP (17), length 372) 192.168.1.1.67 > 192.168.1.139.68: [udp sum ok] BOOTP/DHCP, Reply, length 344, xid 0x26f30339, Flags [none] (0x0000) Your-IP 192.168.1.139 Server-IP 192.168.1.1 Client-Ethernet-Address b8:27:eb:28:f6:6d Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Server-ID Option 54, length 4: 192.168.1.1 Lease-Time Option 51, length 4: 43200 RN Option 58, length 4: 21600 RB Option 59, length 4: 37800 Subnet-Mask Option 1, length 4: 255.255.255.0 BR Option 28, length 4: 192.168.1.255 Vendor-Class Option 60, length 9: "PXEClient" GUID Option 97, length 17: 0.68.68.68.68.68.68.68.68.68.68.68.68.68.68.68.68 Vendor-Option Option 43, length 32: 6.1.3.10.4.0.80.88.69.9.20.0.0.17.82.97.115.112.98.101.114.114.121.32.80.105.32.66.111.111.116.255 END Option 255, length 0
                Sours: https://www.raspberrypi.org/documentation/hardware/

                Gpio adapter retropie

                The RetroPie GPIO Adapter

                [divider style=”dashed” top=”20″ bottom=”20″]

                UPDATE: The RetroPie GPIO Adapter is replaced by the ControlBlock, which supports more controller types and provides even a power switch functionality. The ControlBlock is has its own page here.

                [divider style=”dashed” top=”20″ bottom=”20″]

                If you want to use your Raspberry Pi for gaming you certainly want to attach some sort of controller(s) to it. Since the Raspberry comes with two USB ports one way would be to simply attach any sort of USB gamepad or joystick via these ports to it. Besides the configuration this approach has the disadvantages that one or both USB ports become occupied and, what I think is even more disturbing, that an active USB hub might become necessary to provide enough energy to the controller(s). Also, if you want to get the real retro feeling you certainly want to use original controllers. The GPIO pins of the Raspberry allow the communication with all sorts of hardware and attaching, for example, SNES controllers can be done in quite a few steps. A user-space program that polls the controller(s) in the background was presented here. In the following I am presenting a dedicated GPIO adapter for the Raspberry Pi that allows an easy and safe connection of up to two NES or SNES controllers.

                The RetroPie GPIO adapter

                Based on the experiences with a previously presented adapter PCB I designed a new SNES adapter PCB specifically for the use with the Raspberry Pi.

                Hardware

                This GPIO adapter aims at

                • an easy and practical installation
                • as well as providing circuitry protection
                • and a button that can be used arbitrarily by software

                Update 28.09.2014: Revision 2.0 of the RetroPie GPIO Adapter is released! The functionalities of revision 2.0 are exactly the same as the previous revision. However, the hardware design has changed due to the Raspberry Pi (TM) model B+ design. In contrast to revision 1.X, the new RetroPie GPIO Adapter revision is now mounted horizontally on the RPi. In the following descriptions of the adapter, photos of both revisions will be shown.

                An easy and practical installation of the adapter board is achieved by using a 2×13 pins female header for a connection to the GPIO pins and 2×5 pins male header for the connection to, for example, (S)NES controller sockets. The only tinkering needed for a connection to (S)NES connectors is the soldering of the ribbon cable to the connectors. The size of the adapter PCB is only 0.91 in x 1.32 in (23 mm x 33.5 mm). This size does not increase the needed overall volume of the Pi much and allows the usage of most existing cases.

                A word to SNES sockets: One way for obtaining these is to use the ones from SNES extension cables. Alternatively, a community member published 3D models of the connectors here.

                For a practical application the adapter is provided with a circuitry protection as it was proposed in a thread of the official Raspberry Pi forum. To handle over currents a resettable fuse is put on the supply rail. Possible transients are taken care for by a buffer IC 74HC125. As stated by RPi wiki site about circuitry protection these ICs provide an in-line connection which is buffered via an internal transistor switch to isolate the input from the output.

                Four GPIO pins, which would correspond to two data lines, the clock, and the latch in case of (S)NES controllers, are buffered by the adapter.

                Revision 1.X of the RetroPie GPIO Adapter

                Revision 2.0 of the RetroPie GPIO Adapter

                Revision 2.0 of the RetroPie GPIO Adapter

                A momentary on push button is also part of the adapter board. The button is also connected to one of the GPIO pins and, thus, the status of the button can be polled with any suitable software. This allows, for example, to add a reset/back button that is needed with a keyboard-less setup and controllers with no redundant buttons like the SNES or NES controllers.

                Button on revision 1.X of the RetroPie GPIO Adapter

                P1010402_small

                Button on revision 2.0 of the RetroPie GPIO Adapter

                Pin Out

                The exact pin out together with the according pins on the SNES connector are listed in the following and shown in the diagram (for revision 1.X of the Raspberry Board):

                • VCC (3.3V): pin 1
                • Ground: pin 6
                • Clock: pin 19 (out)
                • Button: pin 11 (in)
                • Latch: pin 23 (out)
                • Data 1: pin 7 (in)
                • Data 2: pin 5 (in)

                Pin out for revision 1.X of the RetroPie GPIO Adapter

                Connectors pin out for (S)NES connectors: The (S)NES connectors are soldered to a 10-wire ribbon cable that has a 2×5 pins female ribbon crimp connector at the other end. The pin out together with the according pins on the SNES connector are shown in the diagram:

                The pin out of the ribbon cable can be derived from the 2×5 pin header and is as following (shown from the top side):

                RibbonCrimpConnector

                Here is an image of two SNES connectors soldered to the ten-wire ribbon cable and connected to the adapter board. Note that the 2×5 pin header has to point inwards the Raspberry Pi PCB:

                Ribbon cable connected to revision 1.X of the RetroPie GPIO Adapter.

                Ribbon cable connected to revision 2.X of the RetroPie GPIO Adapter.

                Ribbon cable connected to revision 2.X of the RetroPie GPIO Adapter.

                For those of you that are interested in the components details, here are the manufacturer part  numbers:

                • Tri-state buffer: SGS-Thompson Microelectronics M74HC125M1R
                • PTC resettable fuse: ESKA LP60-010
                • Momentary switch: APEM PHAP3305D

                Schematics and assembly Guide: You can find the schematics of the RetroPie GPIO Adapter revision 1.X and  assembly guides here.

                A comprehensive guide for getting started with the adapter can be found in this post.

                Additional GPIOs on revision 1.X: It can also be seen from the schematics that revision 1.1 of the adapter breaks out four additional GPIO pins (GPIO pins 0, 14, 21, 22) together with ground and the 3.3V pin. This provides the possibility to attach additional hardware to the GPIO and use the RetroPie GPIO adapter at the same time. Note, however, that these additional pins do not provide any circuitry protection.

                The dimensions of the adapter revision 1.X match the ones of the PetRockBlock PIE case. This means that  both can be combined with each other to build a keyboardless gaming console with the RPi at its center. The RetroPie GPIO Adapter revision 2.X has a different hardware design is not compatible to the PetRockBlock PIE case.

                Software

                In order to use the RetroPie GPIO adapter a driver is needed that reads the states of the controllers and the button and maps these to the input system of the operating system. This can be done in kernel- or in user-space. The SNESDev software is an example of an user-space application that interfaces with the controllers and the button on the RetroPie GPIO Adapter. It is recommend to use SNESDev as driver for the adapter board.

                Adding a jumper between pins 5 and 6 of P1 results in /boot/config.txt being ignored (except for avoid_safe_mode) and a default cmdline.txt is applied, followed by loading kernel_emergency.img. As stated in the official forum

                if you connect external hardware to that pin, the worst that will happen is it falsely triggers safe mode.

                To avoid this safe mode when the adapter is attached a setting has to be made in /boot/config.txt. This could be done, for example, by opening the config.txt with

                sudo nano /boot/config.txt

                adding

                avoid_safe_mode=1

                and saving the changes with “Ctrl-X”, which has to be confirmed with “Y”.

                Demo video

                A video of the adapter in action can be found in this post.

                Installation and Troubleshooting

                You can find a complete getting-started guide for the RetroPie GPIO Adapter on this page.

                With the SNESDev driver enabled you can test for working connections between the game pads and the RPi with the jstest command (Ctrl+C exits the tool):

                jstest /dev/input/js0

                and

                jstest /dev/input/js1

                will test the first and the second game pad.

                If you are using SNESDev for polling the game pads you need to use the option “poll game pads and button” in the menu of the RetroPie Script. If everything ism assembled and set up correctly button presses on the game pads will act as keyboard input and you will see according outputs on the console.

                A long press (more than 1 second) on the button will lead to a key press of “r” which, again, can be checked on the console.

                Conclusion & Getting it

                The RetroPie GPIO adapter allows an easy and practical connection of NES and SNES controllers via the GPIO pins of the Raspberry Pi. The size of the adapter is kept as small as possible and should fit into most existing cases. It contains circuitry protection against over currents and transients. Furthermore, a momentary push button is installed on the adapter that can be used, for example, as a back or reset button. The pin out of the GPIO male header is matched to the already existing gamecon RPi GPIO driver, which can easily be installed and updated with the RetroPie Setup script.

                If you are interested in an adapter please have a look here. The RetroPie GPIO Adapter kit also includes a ribbon cable (about 10 cm long) and a ribbon crimp connector.

                 

                  Sours: https://www.petrockblock.com/2012/10/21/the-retropie-gpio-adapter/
                  Raspberry Pi Analog Output

                  .

                  Now discussing:

                  .



                  153 154 155 156 157