GithubHelp home page GithubHelp logo

adafruit / adafruit-retrogame Goto Github PK

View Code? Open in Web Editor NEW
354.0 49.0 123.0 364 KB

Raspberry Pi GPIO-to-virtual-keyboard utility for classic game emulators

Home Page: https://learn.adafruit.com/retro-gaming-with-raspberry-pi

C 78.29% Makefile 0.69% Shell 2.12% Python 16.29% Roff 2.60%

adafruit-retrogame's Introduction

Adafruit-Retrogame

Raspberry Pi GPIO-to-virtual-keyboard utility for classic game emulators.

How-to: https://learn.adafruit.com/retro-gaming-with-raspberry-pi

NEED HELP?

Visit forums.adafruit.com (General Project Help) for retrogame-related questions. GitHub's "Issues" tab is for bug reports and feature requests. 99% of retrogame problems are configuration, not bugs. Make sure to follow the "RetroPie 2.0+ Compatibility" directions below. Also, use Broadcom GPIO numbers, not the physical pin index.

When requesting help, please be thorough in your description. Which model of Raspberry Pi, what release of RetroPie (or other OS image), and (if the trouble is localized) which system emulator exactly? For hardware-related issues, photos are extremely helpful. Thanks!

For emulation-related questions (e.g. individual games not working), please use a support forum relevant to the software in use, e.g. the RetroPie Forum at https://retropie.org.uk/forum/ if using that package. Adafruit does not develop these emulators or the EmulationStation front-end.

NEW: Configuration file

retrogame now loads its pin/key settings from a file; no code editing required. An example file 'retrogame.cfg' is included in the 'configs' directory, copy this file to the /boot directory so retrogame can find it (/boot makes it easier to edit with the card in a reader on another system). Alternately, an absolute pathname to a settings file can be passed on the command line. This file can be edited live, no need to restart retrogame after making changes.

THE ioStandard[] AND ioTFT[] TABLES NO LONGER EXIST IN THE SOURCE CODE. You should not need to edit ANY source code to make retrogame work. Everything is handled through the configuration file now. Some guides may be out of date and still refer to the old way; these will be updated over time.

RetroPie 2.0+ Compatibility

Note that by default retrogame won't work with SDL2 applications that depend on evdev for input events. Specifically this means applications like the latest version of RetroPie and EmulationStation won't be able to see key events generated by retrogame. However you can fix this issue by adding a small custom udev rule to make retrogame keyboard events visible to SDL2.

Connect to your Raspberry Pi in a terminal/SSH session and execute the following command to create and edit the file /etc/udev/rules.d/10-retrogame.rules:

sudo nano /etc/udev/rules.d/10-retrogame.rules

Once the nano text editor loads, copy this single line into the file:

SUBSYSTEM=="input", ATTRS{name}=="retrogame", ENV{ID_INPUT_KEYBOARD}="1"

Save the file by pressing Ctrl-O and enter, then press Ctrl-x to exit. Restart your Raspberry Pi and run retrogame again, now button presses should register in SDL2 applications like the EmulationStation frontend to RetroPie


Roadmap

Development of the C retrogame program at this point is in maintenance mode -- bugs will be looked at and corrected where possible, but don't expect significant new features (such as support for more I/O port expander types), nor will pull requests for such be merged. The code has grown untenably complex.

retrogame is a product of its time; first-generation Raspberry Pi devices with sub-optimal emulation software were common and obtuse C code was used to minimize memory use and CPU load. There's little benefit to such an approach now. For the Arcade Bonnet and Joy Bonnet, you'll see there are now simpler, device-specific Python scripts being used...either one consumes just a fraction of a percent of a system's resources. Rather than wrestling the retrogame code into doing Yet Another Thing, consider using one of these Python scripts as a starting point, and focus on just that one task.

adafruit-retrogame's People

Contributors

dodrian avatar jedgarpark avatar ladyada avatar paintyourdragon avatar tdicola avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adafruit-retrogame's Issues

Inputs not responding when using GPIO arcade buttons on Maldita Castilla (port game) in RetroPie

Hi there,
First of all, I don't know if this issue would fit here, so if not, feel free to close it.

I've installed a port by YoYo Games of the amazing game Maldita Castilla for the Raspberry Pi.

I've followed these instructions and it's working perfectly, but only when using a keyboard, not when pressing the GPIO arcade buttons.

Do you know why that might be?
The other ports that come bundled with RetroPie work flawlessly. And also all the emulators.

Thanks!

Some GPIO not working

Looking for some advice on troubleshooting GPIO with Retrogame. Unable to get responses from physical Pin 7 and 13 on RPI B Rev 2 using stock code.

GPIO tool shows the mode as in and state as low, but not switching to high with key press. Tried both with Adafruit interface board and direct connection.

Will try another RPI Rev B board when able, but would appreciate other method to diagnose the problem in the interim (to determine if pins are fried or a software / OS installation problem). If HW problem will rewire interface board/connections as required but want to rule software out first.

Arduino Compatibility

Hello,

How could this code be adapted to use an arduino uno as an expantion i/o board?
I'd like to create a 2 players machine, using 2 joysticks and 12 buttons. As there are only 17 Gpio pins on Raspberry, I thought in using an arduino as a I²c port expander.
Is it possible? Can you guys help me?

Thanks,
David

Ps: Sorry for the Bad English

Using RetroPie 2.2 with GPIO no longer works

I just finished building a home arcade kit called Porta-Pi that runs RetroPie 1.9.1 and uses Retrogame as the input. It works wonderfully and is a great alternative to buying a dedicated input device. Not to mention I actually learned something working on something I love to do! :)

I recently tried to upgrade RetroPie to version 2.2 and it longer works. After some searching the programmer of RetroPie/EmulationStation posted this on a forum:

"I have the same problem as you. I asked Aloshi (creator of EmulationStation) on the Raspberry Pi Forums and this is what he said:

This probably has to do with the change from SDL 1.2 to SDL 2. SDL2 uses evdev for input handling (in the console in the Pi). I don’t remember what SDL 1.2 uses. Not much I can do about this, sorry."

I don't know anything about programming but I have learned a lot about Unix just doing this project and really enjoyed it. Is there any chance in a future version this could possibly incorporated into retrogame.c. It's a fantastic piece of software and I really appreciate all the work put in to it.

Also I use to use an older version that didn't require downloading ncurses and expat(?) but after rebuilding my SD card I had to download the newer version and also download the additional software. Is there a repository or link you might share to download the older version without the new additions?

Thank you and have a great morning!

RetroPie v 2.3 not working with Retrogame

I have followed the directions, added the udev rule, yet emulationstation will not recognize the buttons. I am able to see that retrogame is functioning, as each press of a button results in an emulated keypress as expected. I have tried every guide and piece of advice I could find in my 6 days search for a solution, tried multiple times to format, and re-image the SD card, I have started from scratch around 50 times. the real "fix" provided by CrazySpence both on the adafruit git, and his github page doesn't work with v2.3 because the SDL folder does not exist in this version. bummer! Why can't it all just work?! wink

Raspberry Pi 3

Are there any additional tweaks needed for a Pi 3? Joystick works fine, buttons are not responding.

Inputs not working in games.

Making a Pigrrl project somewhere between a Pigrrl 2 and Zero. I'm using a Raspberry Pi 3 and have retropie and retrogame installed. Buttons work great in emulationstation but do nothing in a game. Any ideas on what's going wrong?

Trouble getting started

I have downloaded "Adafruit-Retrogame" (and later, i downloaded "Adafruit-Retrogame.master"). I did this from within the Raspberry Pi after typing "startx" and the using one of the browsers. Once downloaded, it creates a zip folder on the desktop. Then, by clicking on it i can get the files unzipped. They show up in a folder together.

Then i log out and go to the command prompt. I type "cd Adafruit-Retrogame" and it says that the file is not found. Thats where I'm stuck.

Ive gotten further along than this before, but this time i cant get past this.

Can the software have two Players?

Hi I am very happy with the software you have built so far but I want to add a second Player can you do that if so how and if not can you add a way? Thank you :)

Downloading and Installing retrogame fails on pigrrl zero

Downloading, installing retrogame...ERROR
Downloading, installing retrogame.cfg...ERROR
Performing other system configuration...OK

I get this when I try to install retrogame on my pigrrl zero. /boot/retrogame.cfg does not exist, and I've had some trouble remaining connected to the pi via SSH. Any tips as to what I should do to solve this?

I have followed the intructions

I followed the instructions I have hooked up my arcade button to the correct two pins the ground and pin 5 I have not changed the config file but have moved it to the boot folder as it recommended. I just want to try to do a simple space in a text editor just to see if the code works properly. My end goal is to make an arcade cabinet. Please help with any advice or things to do to make this great idea work. Thank you :)

GPIO work in retropie but not in retroarch

I use GPIO with this config:

{  22,     KEY_LEFT     }, // Joystick (4 pins)
{  23,     KEY_RIGHT    },
{  17,     KEY_UP       },
{  27,     KEY_DOWN     },
{  24,     KEY_LEFTCTRL }, // A/Fire/jump/primary/RED
{  10,     KEY_LEFTALT  }, // B/Bomb/secondary/YELLOW
{   9,     KEY_Z        }, // X/BLUE
{  25,     KEY_X        }, // Y/GREEN
{  18,     KEY_SPACE    }, // Select
{   4,     KEY_ENTER    }, // Start
{  11,     KEY_A        }, // L Shoulder
{   8,     KEY_S        }, // R Shoulder
{  13,     KEY_1        }, // PiTFT Button 2
{  19,     KEY_2        }, // PiTFT Button 3
{  26,     KEY_3        }, // PiTFT Button 4

It works great on retropie interface but not in game, retroarch doesn't recognize this GPIO, doesn't know why.

Optical Switch Issues

root@retropie:/home/pi# cat /sys/class/gpio/gpio21/value
0

-> retrogame simulate endless key input.

When i hold something into this optical switch:
root@retropie:/home/pi# cat /sys/class/gpio/gpio21/value
1

-> No key input

retrogame simulate by the false gpio state

Or is the problem with me?

Raspberry Pi 3 Model B

Is this compatible with Raspberry Pi 3 Model B? Not getting any response from my buttons and as far as I am aware the GPIO is the same as the 2 models.

Raspberry Pi 2

Trying to set this up to work with the Pi 2 and some buttons work... but others like GPIO21 (pin40) pressed to the ground next to it, does nothing?

To debug I've mapped 4, 17, 24 ,25 ,5, 6, 12, 13, 19 16, 26, 20, 21
all to different keyboard letters.

26, 19, 12, 13, 6 and 4 work

20 sends randomly when i press the other buttons :(

the rest don't work at all. I've checked for shorts everywhere and all the buttons themselves work.
Here's what I'm working on: http://i.imgur.com/ocLdTe5.jpg
And these are the insides: http://i.imgur.com/phMY4Ku.jpg

Cross-compile ?

How do I cross-compile this ?
Eg. produce an arm binary with a x86/x86_64 Ubuntu.

Thanks :)

Multiplayer keybinding.

Hi!

Can't find it neither on the Adafruit's forum nor here so I ask: How can I make retrogame work for two players?

When configuring my buttons connected to the GPIO they are known as "Keyboard" and I can only configure one set of command but I'd like to enjoy multi-players games so I need it to bind two sets of commands.

Many thanks in advance!

Could add code to repeat key 5 (with 1 second delay)?

Hi, I would be interested in repeating key 5 (used to add credits) so my MAME emulator can add more than 1 credit. This repeated key must be delayed so MAME can distinguish it from the previous one.

Thanks so much in advance
Best Regards
Pablo

Joystick debouncing

Hello this is working as far as inputing keys but when I use a joystick it will need keep the button pressed; it only ouputs one press even when held.

Is there something in the configuration that will let the up,down,left,right not debounce?

Thank you

Button repeating but not held. (active_high or active_low?)

Does it recognize button press on Rising edge and release on falling edge, or what? I have my buttons pulled down then when the button is pressed it reads high. Is this opposite of how retrogame works?

I can't rewire it because the circuit is set up in such a way as when any button is pressed, a LED lights inside the game cabinet.

Can retrogame be changed so it recognizes the button press at a HIGH signal instead of LOW?

Retrogame virtual keyboard Kodi 17.3 not recognized

Hello there,

I encounter a problem regarding the buttons in Kodi. The buttons aren't working even tho' it's working on the "desktop" and retropie.

I put a Pi Zero W into a PSP. Connected the GPIO to the controls of the PSP. I then installed a Raspbian Image. I apt-get install kodi to get kodi. And also installed Retropie manually using this link.
I use retrogame.cfg file to make the buttons work. And copy the retrogame in /usr/local/bin/retrogame (both files has been given to me so I don't really know thing about them, sorry).

# Sample configuration file for retrogame.
# Really minimal syntax, typically two elements per line w/space delimiter:
# 1) a key name (from keyTable.h; shortened from /usr/include/linux/input.h).
# 2) a GPIO pin number; when grounded, will simulate corresponding keypress.
# Uses Broadcom pin numbers for GPIO.
# If first element is GND, the corresponding pin (or pins, multiple can be
# given) is a LOW-level output; an extra ground pin for connecting buttons.
# A '#' character indicates a comment to end-of-line.
# File can be edited "live," no need to restart retrogame!

# Here's a pin configuration for the PSPi v2 project:

UP         23  # Up
DOWN       27  # Down
LEFT       22  # Left
RIGHT      17  # Right
Q          19  # Square
ENTER      16  # X
Y          20  # Triangle
ESC        26  # Circle
LEFTCTRL   24  # Left Trigger
RIGHTCTRL  21  # Right Trigger
S          12  # Start
D           6  # Select
VOLUMEDOWN 25  # Volume Down
VOLUMEUP    5  # Volume Up


# For configurations with few buttons (e.g. Cupcade), a key can be followed
# by multiple pin numbers.  When those pins are all held for a few seconds,
# this will generate the corresponding keypress (e.g. ESC to exit ROM).
# Only ONE such combo is supported within the file though; later entries
# will override earlier.

I checked several post about the subject but I can't make it work, but I could'nt find anything that is appropriate to my project...

When I start the PSP I end up on the shell. From there I just use the Up button to get the last lines. I can enter kodi like that. Once there the buttons aren't working. When I start emulationstation or StartX it's working fine. It looks like the buttons are well "simulated" on those like I would use the keyboard but not in Kodi

Can someone help me to figure out how to get that working in Kodi ?

Thanks all

## EDIT :

I tried to configure the controller already. I didn't say it but before this I tried a Retropie Image and installed Kodi from there. Same problem, buttons works in Retropie not in Kodi. And when I try to make a new input in the controller the timer just go to 0 and I can't put any key, like the buttons are not recognize.

I checked the link with the Keymap already but as I'm running the stuff on a PSP which structure should I take ? Remote ? Gamepad ? Keyboard ?
Custom Joystick and I put retrogame like that ?

<joystick name="retrogame">
  <button id="27">Down</button>
</joystick>

A other thing. The joystick from the PSP is connected to the Gamepad so basically the input from the gamepad are the same for the joystick it's exactly the same wiring.

So I tried like that, I created a new file psp.xml that I put here : ~/.kodi/userdata/keymaps

I wrote this inside :

<keymap>
  <global>
    <joystick name="retrogame">
    <button id="27">Down</button>
    <button id="23">Up</button>
    </joystick>
  </global>
</keymap>

It is not working either.
Is there any manipulation to do to "activate" the .xml file maybe so that Kodi recognize it ? Should I use a different structure ?

joyBonnet.py: "1" and "2" keys are swapped

On my joy bonnet (attached to a Pi Zero W), pressing the "1" key on the PCB generates a "2" keyboard press and vice versa.
Trivial to fix by swapping the key codes in joyBonnet.py, but I was wondering if this is a known issue?

PS3 controller same player

I have a problem:
I configured a PS3 controller (bluetooth) on retropie, when I was to play, I figured out that the GPIO gamepad and the PS3 controller are the same player.
I tried to install joystick-selection (https://github.com/meleu/RetroPie-joystick-selection), setting up the PS3 to be the second player and adding the line "Input_player1_joypad_index= "0"" in the /opt/retropie/configs/all/retroarch-joypads/Name Of Your Controller.cfg file, now I can play a versus battle, but the PS3 controller control the player 1 and player 2 at same time!

Is there a way to solve this?

retrogame + PiTFT + Archlinux

Hi,

I want to use the project PIGRRL with an Archlinux.

For the screen PITFT, I add these lines in config.txt:

device_tree_overlay=pitft28
dtoverlay= pitft28,rotate=270,speed=32000000,fps=60

And I add pitft28-overlay.dt bin /boot/overlays/

For the retrogame (keyboard map GPIO):
I have a raspberry pi b rev1 (256 ram), so I must update map.
I change the pin numbers 2, 3 and 27 to 0, 1 and 21, respectively. Recompile with:

make CFLAGS=-DCUPCADE
sudo make install
modprobe uinput
sudo retrogame

But I have this error:

./retrogame: Pin config failed. Try 'sudo ./retrogame'.

Have you an idea ?

Thank you.

Retrogame requires keyboard plugged in

I'm using Retrogame along with Retropie to create a portable gaming system for my little brother. Right now I'm using Retrogame to listen for inputs through the GPIO pins on the Raspberry Pi. The program works great, but only if a keyboard is plugged in. I looked around and read lots of blog posts and forums, and I can't find any information concerning a work around. Is there a way for retrogame to work without a keyboard plugged in?

Thank you for your help.

Could we get a license for this?

I’d really appreciate it if this was released under a permissive license... I don’t see any license listed right now. MIT would be great! Thank you so much for making this tool.

Sent with GitHawk

Remapping of select button w/ PiGrrl 2

A few folks have noted that on the PiGrrl 2 build the select button is getting mapped to [SPACE] currently, while also using this config in the instructions for the controller carries a default mapping of [SPACE] to toggle fast-forward... does not play nicely. Hitting select in any emulator will toggle fast-forward w/ the default config, no bueno.

Cf. https://retropie.org.uk/forum/topic/366/pigrrl-2-gamepad-select-button-acting-as-a-fast-forward-toggle-in-all-emulators/2

This is an easy fix that can be applied in the retroarch.cfg file included in this repo that is being pulled down by the retrogame.sh script in the Raspberry-Pi-Installer-Scripts repo.

Error Installing Retrogame and Installing Retrogame.cfg

Hello,

I am having an issue with installing Retrogame.

The initial download from Github flows smoothly, but when I attempt to run the script I encounter the following issue:

image

What are the steps I should take in troubleshooting this?

"Reverse" input for some buttons

I have the following problem:
Two new buttons I installed have the contact closed when not pressed, and open when pressed. Since retrogame expects the GPIOs to be low, it always generates a keypress when the button is not pressed, but not when it is.

Is there any way to "reverse" that input for those two buttons (and only for them, the rest are normal buttons)?

All pins pulled high

hey

so i'm traying to set this up to run with retro pi my problem is that i have a some electronics on gpio 1 witch if pulled high turns off my screen and if low turns on the screen

what i need is a way to make you're script to do nothing to gpio 1 preferably a setting in the settings file witch allows me to edit this

Lacks Support for Eight Buttons

I have a custom built eight button Game Boy that runs off a Raspberry Pi 3. The controls for this unit are tied directly into the GPIO header. As a result, I have used Adafruit-Retrogame so that my controls can be configured via the text file and seen in EmulationStation. I have done the measure to complete RetroPie 2.0+ compatibility via "sudo nano /etc/udev/rules.d/10-retrogame.rules". My controls work and I thank you.

I do however have an issue. Because of the way the software is set up I can't get the 7th and 8th buttons working no matter how I arrange the buttons according to their pin layout. My Gameboy has six buttons on the front, a select button, a start button, and a D-pad. It also has two buttons on the back. Thus, my end goal is to configure A, B, X, Y, Left Shoulder, Right Shoulder, Left Trigger, and Right Trigger buttons along with select, start, and the D-pad. But since the text configuration file simply requires an L or R and does not differentiate between LS, RS, LT, and RT I am using the numbers 1 and 2 in lieu of this. But, when I do this only six buttons work in PS1 emulation; 1 and 2 do not.

Below is my configuration file. Again, I have confirmed the buttons actually do send input to the RPi3. Those pin outs work. I can swap the numbers and those pinouts become active. Here is the text for that file:

Really minimal syntax, typically two elements per line w/space delimiter:

1) a key name (from keyTable.h; shortened from /usr/include/linux/input.h).

2) a GPIO pin number; when grounded, will simulate corresponding keypress.

Uses Broadcom pin numbers for GPIO.

If first element is GND, the corresponding pin (or pins, multiple can be

given) is a LOW-level output; an extra ground pin for connecting buttons.

A '#' character indicates a comment to end-of-line.

File can be edited "live," no need to restart retrogame!

UP 26 # 'UP' button
DOWN 13 # 'DOWN' button
LEFT 19 # 'LEFT' Button
RIGHT 6 # 'RIGHT' button
A 7 # 'A' Button
B 15 # 'B' button
X 23 # 'X' button
Y 14 # 'Y' button
ENTER 0 # 'ENTER' button
SPACE 5 # 'SELECT' button
L 22 # 'Left' Shoulder button
R 12 # 'Right' Shoulder button
1 21 # 'Left' Trigger button (back)
2 20 # 'Right' Trigger button (back)

This text is the end of the file. As you can see, everything is set up properly. I just can't make the back buttons work because it appears the sum of working buttons in RetroPie is six, unless there's alternative button labels besides 1 and 2 that will drive those buttons.

Thank you for any and all effort. And don't hesitate to get a hold of me.

Regards,
Neil Bradshaw

Some inputs will not respond at random

Hi there!

I built a nice little arcade box with an RPi2, 6 Arcade buttons, and an adafruit Small Joystick. Everything is wired up fine, and responds accordingly most of the time. However after some time (at random) I notice that a certain input wont respond. I am using MAME as my arcade platform for now. For example, I'll be playing a game then all of the sudden the Up motion on the joystick won't respond, or the Shoot arcade button will just not react. After a reboot everything will work for awhile again, then the error will happen. I am puzzled to believe this is still a hardware issue, have there been any known issues with MAME using retrogame? I have made sure SDL2 compatibility is okay and everything.

Add delay to key stroke

Is there any way to add a delay so that the key stroke "activates" after a certain period of time?

installing on PI 2 and choosing arcade 6 button , after reboot PI input doesnt work

Had an arcade that used to use the old code that had the indiecity mame install.
raspberry pi 2 using gpio pins with 6 buttons and a joystick wanted to update to retropie
installed retropie from github on november 2016 raspian image w/ pixel desktop
i installed Retrogame and configured for 6 button + joystick, after reboot keyboard/mouse wont work anymore and the networking (hardwired) no longer works.

Figuring it might be something i did wrong I tried with a default latest Retropie image this time and it did that same thing after reboot when i pulled down the retrogame.sh and rebooted.
I did it 2 more times to be sure its not anything else. and same results.

request for help with troubleshooting

Thanks for making the new version where the only thing we have to change is the retrogame.cfg file. That makes it a lot easier to set up and such.

However, I still can't get it to work. I have a RPi3vB running RetroPie, and I followed the instructions on the Adafruit tutorial exactly, as far as I can tell.

Here is my retropie.cfg:

# Sample configuration file for retrogame.
# Really minimal syntax, typically two elements per line w/space delimiter:
# 1) a key name (from keyTable.h; shortened from /usr/include/linux/input.h).
# 2) a GPIO pin number; when grounded, will simulate corresponding keypress.
# Uses Broadcom pin numbers for GPIO.
# If first element is GND, the corresponding pin (or pins, multiple can be
# given) is a LOW-level output; an extra ground pin for connecting buttons.
# A '#' character indicates a comment to end-of-line.
# File can be edited "live," no need to restart retrogame!

# Here's a pin configuration for the PiGRRL 2 project:

LEFT 4 # Joypad left
RIGHT 17 # Joypad right
UP 27 # Joypad up
DOWN 22 # Joypad down
A 18 # 'A' button
B 23 # 'B' button

# For configurations with few buttons (e.g. Cupcade), a key can be followed
# by multiple pin numbers. When those pins are all held for a few seconds,
# this will generate the corresponding keypress (e.g. ESC to exit ROM).
# Only ONE such combo is supported within the file though; later entries
# will override earlier.

My setup is really simple: just the 4 directions on a joystick and two buttons. When I run retrogame:

./retrogame

I don't get any error messages or anything, but nothing happens when any of the GPIO pins are shorted to ground. I even tried directly touching one of the wires connected to the appropriate GPIO pin to the wire connecting to the GRD pin, but still nothing.

Any ideas on what I can do to troubleshoot?

How to use in Batocera (or Recalbox)

Is there anyone who managed to run retrogame on Batocera? I want to switch from retropie to Batocera without resoldering my GPIOs.

Many thanks in advance!

retrogame + PiTFT + Cupcade Interface Board + Pi Supply?

from testing, it seems that retrogame (rather, available GPIOs) is (are) maxxed out when running with PITFT and Cupcade Interface board (also as state in the source file). Previously, attempts to reroute to other PINs has resulted in errors when executing the binary (Pin config error).

Does any one have any success / suggestions on modifications to allow retrogame (and such a hardware setup) to support something like the PiSuppy? (which by default, requires physical Pin 8 and following recommended installation, Pin 7)?

GamePad not registering

Just followed https://www.youtube.com/watch?v=4u1NKok2-BE to get the PiTFT to work on a Rasp 3, but when it got to this step I used the new commit where we do not change the ioStandard table at all but when I boot up the Rasp again the input Gamepad is not detected. I checked the voltage and all seems ok. This last commit (67a447e) seems to be the only difference in how it works.

The retrogame.cfg is also located in directory /home/pi

Pi freezes on activation of retrogame

Hi, so my pi is running the adafruit issue lastest version of rasbian with a ptfit display attached. I am running Retrogame to get button inputs set up for Retropi, and everthing works fine until I actualy start retrogame. Whenever I start retrogame, by going to /usr/local/bin and doing sudo ./retrogame, it just goes to the next line and freezes entirely. I compiled it multiple times, but it continues to do this even though it compiled fine, and the pi even tried to activate it on startup a few times, causing a freeze than too. After it freezes, it locks up completely and excepts no input from either the buttons or a keyboard. The only way to unfreeze it is to hard shutdown and reboot the pi.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.