Skip to content

TeamOpenFIRE/OpenFIRE-Firmware

Repository files navigation

BannerDarkBannerLight

OpenFIRE - The Open Four Infa-Red Emitter Light Gun System

Successor to GUN4ALL, which is based on the Prow Enhanced fork, which in itself is based on the 4IR Beta "Big Code Update" SAMCO project

Features:

  • Fully featured peripherals, from Solenoid & Rumble Force Feedback, to TMP36 Temperature Monitoring, and others to come.
  • Multiple IR layouts support, with realtime perspective-adjusted tracking for both double lightbar (recommended!) and Xwiigun-like diamond layouts (compatible with other systems).
  • Flexible Input System, with outputs to Keyboard, 5-button ABS Mouse, and dual-stick gamepad w/ d-pad support (in Wired mode).
  • Easy installation with simple .UF2 binaries that can be drag'n'dropped directly onto an RP2040-based Microcontroller.
  • Bluetooth Support (BETA) with the Raspberry Pi Pico W, for untethered gameplay in battery-powered lightguns.
  • Portable on-board settings to store calibration profiles, toggles, settings, mappings (WIP), identifier and more to come.
  • Integrates with the OpenFIRE App for user-friendly, and cross-platform configuration.
  • Optimized for the RP2040, using its second core for input reading and serial handling, and the main core for camera and peripherals processing, whenever possible.
  • Compatible with PC Force Feedback handlers such as Mame Hooker and QMamehook.
  • Supports integrated OLED display output for SSD1306 I2C displays for menu navigation and visual feedback of game elements such as life and current ammo counts.
  • Forever free and open source to the lightgun community!

Requirements

Refer to BOARDS.md for default pinouts for various boards - though keep in mind that every board supports completely custom pin layouts, configurable through the OpenFIRE App.

Installation:

Grab the latest .UF2 binary for your respective board from the releases page, and drag'n'drop the file to your microcontroller while booted into Bootloader mode; the RP2040 is automatically mounted like this when no program is loaded, but it can be forced into this mode by holding BOOTSEL while plugging it into the computer - it will appear as a removable storage device called RPI-RP2.

Additional information

Check out the enclosed instruction book! For developers, consult the README files in libraries for more information on library functionality.

Known Issues:

  • With Pico W & Bluetooth enabled, TinyUSB/Serial fails to initialize properly when connected via USB, so the firmware is deadlocked either sending serial or USB report data.

Note

Solenoid may cause EMI disconnects with too thin of wiring. Cables for this run specifically should be 22AWG at its thinnest - or else the cables will become antennas under extended use, which will trip USB safety thresholds in your PC to protect the ports.

TODO:

  • (Re-)expose button function remapping.
  • Use more appropriate RP2040-specific subsystems (i.e. hardware timers)?
  • Start librarifying more sections of the code for better readability/portability, i.e. pause mode and serial processing/handling in bespoke classes.

Thanks:

  • Samuel Ballantyne, for his original SAMCO project, the gorgeous OpenFIRE branding, and perspective-based tracking system.
  • Prow7, for his enhanced SAMCO fork which provided the basis of pause mode and saving subsystems.
  • Odwalla-J, mrkylegp, RG2020 & lemmingDev for prerelease consultation, bug testing and feedback.
  • The IR-GUN4ALL testers for their early feedback and feature requests - this wouldn't have happened without you lot!
  • Chris Young for his TinyUSB compatible library (now part of TinyUSB_Devices).