Created
February 28, 2018 19:51
-
-
Save motomod/6d4efd68c24195018be61725690afb3e to your computer and use it in GitHub Desktop.
retrogame.cfg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 18 # Joypad up | |
DOWN 27 # Joypad down | |
LEFTCTRL 22 # 'A' button | |
LEFTALT 23 # 'B' button | |
Z 3 # 'X' button | |
X 2 # 'Y' button | |
SPACE 13 # 'Select' button | |
ENTER 13 # 'Start' button | |
A 9 # Left shoulder button | |
S 17 # Right shoulder button | |
ESC 11 # Exit ROM; PiTFT Button 1 | |
1 22 # PiTFT Button 2 | |
2 23 # PiTFT Button 3 | |
3 27 # PiTFT Button 4 | |
# 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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment