Skip to content
XInput Game Controller for PC Pinball Games
Branch: master
Clone or download
Latest commit 85ccd72 Mar 6, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
compiled
LICENSE
README.md
pinSim.ino

README.md

PinSim

XInput Game Controller for PC Pinball Games

Based on the excellent MSF_FightStick XINPUT project by Zack "Reaper" Littell

The complete project build guide, along with PCB links, wiring schematics, and 3D STL files, is hosted at Tested.

This code is designed to run on Teensy LC and requires the following libraries:

Please note the instructions for the MSF-XInput library, which requires some Teensyduino files to be overwritten in order to add support for a new USB device type.

I have included compiled code that can be installed on a Teensy LC using the Teensy Loader application. The code will compile for Teensy 3.2 but, besides being more expensive, that board lacks sufficient current output on the LED pins.

OPTIONS OVERVIEW:

  • BACK + LEFT FLIPPER: Home analog plunger (if installed)
  • BACK + JOYSTICK DOWN: Joystick controls D-PAD (default)
  • BACK + JOYSTICK UP: Joystick controls left analog stick
  • BACK + JOYSTICK LEFT: L1 & R1 flippers (default)
  • BACK + JOYSTICK RIGHT: L2 & R2 flippers

Note: If installed, you MUST calibrate the analog plunger range at least once by holding down "A" when plugging in the USB cable. LED-1 should flash rapidly, and then you should pull the plunger all the way out and release it all the way back in. The LED1 should flash again, and normal operation resumes. The setting is saved between power cycles.

New features added 12/19/2018:

  • Four flipper button support. You can connect a second pair of flipper buttons to GPIO 13 & 14 (Left and Right, respectively) which will map to analog L2/R2 100%. The system will try to autodetect if GPIO 13/14 are connected to double contact or individual switches based on whether GPIO 13/14 are ever pressed without FLIP_L or FLIP_R being pressed (not possible on double contact switches).
  • Minor bug fixes.

New features added 11/15/2018:

  • Hold Back and press Right on the joystick to map flippers to L2 & R2 analog triggers. This is required by some pinball games.
  • Hold Back and press Left on the joystick to map flippers to L1 & R1 buttons (default).

Optionally: You can connect GPIO 13 or 14 to the second stage of double contact switches so FLIP_L & FLIP_R depress the analog triggers by 10% and GPIO 13 & 14 depress them fully. This allows you to control lower and upper flippers independently using a single button (when supported by the game).

(Huge thanks to James Ricalde for his great suggestions and thorough beta testing!)

New feature added 5/13/2018:

  • Hold Back and press Up on the joystick to map joystick to left analog stick. This is required by Oculus Arcade.
  • Hold Back and press Down on the joystick to map joystick to D-pad (default).

New features & improvements added 6/20/2016:

  • Pressing LB & Back simultaneously sets plunger dead zone. This compensates for PC pinball games that have a huge plunger dead zone that works on Gamepads but is accentuated on real hardware. Just pull the plunger until just before the one in-game starts to move and then hit LB & Back with your other hand. This setting is not saved between power cycles.
  • The accelerometer is zeroed out every time Start is pressed.
  • Hold left flipper on boot to perform a rumble test.
  • Hold right flipper on boot to disable accelerometer.
  • Better plunge detection code that scales based on how far back the plunger is pulled.
You can’t perform that action at this time.