Skip to content

TeamOpenFIRE/OpenFIRE-Firmware

Repository files navigation

BannerDarkBannerLight

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

Successor to IR-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(olute Positioning) Mouse, and dual-stick gamepad w/ d-pad support, with a robust button mapping system to suit your needs!
  • Easy installation with simple .UF2 binaries that can be drag'n'dropped directly onto an RP2040-based Microcontroller.
  • Portable on-board settings to store calibration profiles, toggles, settings, USB identifier, and more.
  • Integrates with the OpenFIRE App for user-friendly, and cross-platform on-the-fly configuration.
  • Optimized for the RP2040 & RP2350, using its second core for input polling & queuing and serial handling, and the main core for camera and peripherals processing, whenever possible.
  • Compatible with PC Force Feedback handlers such as Mame Hooker, The Hook Of The Reaper, 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.
  • Compatible with the MiSTer FPGA ecosystem, with dedicated mappings to streamline the user experience as much as possible.
  • Forever free and open source to the lightgun community!

Requirements

*Dedicated tutorials for the OpenFIRE system to come eventually.

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 Desktop App. These layouts can also be viewed from the new Desktop 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 documentation on setting up and building the OpenFIRE Firmware.

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.
  • Updating NeoPixels settings from the OF App might cause some Pixels to be locked or shut off after saving - this is only temporary and will resolve itself after unplugging the board.
  • Some rare instances where a serial exit signal is received while sending an escape key signal in the Simple Pause Menu with (non-static) Pixels in use might cause the gun to freeze. The exact cause is being investigated.

TODO:

  • Come up with better jokes.

Note

Solenoid may cause EMI disconnects with too thin of wiring. Cables for this run specifically should be 24AWG 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.


Regarding Contributions, Ports & Forks:

Being an open source project, OpenFIRE invites anyone to contribute new code or fixes, assuming the following guidelines are followed:

  • To expedite review, PRs modifying existing code must describe the reasoning behind the changes (e.g. "this resolves an issue regarding building on..."). Default or no description text in the PR is likely to prompt for more details, or your request may be closed without merging.
  • Any work that modifies more than a few lines or files at once should be performed on a separate branch on your local repository, so that PRs don't go out-of-scope from simultaneous ongoing development.

OpenFIRE uses the Arduino format for the main source file OpenFIREmain.ino which should make it easier to develop for other architectures, however the arduino-pico core does use some of its own keywords/syntax (e.g. for establishing multi core workloads) so it won't directly run on other platforms without modification. While this repo is primarily focused on development for RP2040/RP235X ARM platforms, we do encourage those with the know-how to port OpenFIRE to other architectures or microcontrollers. Ideally, any ports should maintain compatibility with the existing Desktop App so the user doesn't need multiple executables. Those who are interested in maintaining these forks are encourage to write in a new thread in the Discussions tab of this repository.

Forks made for the purposes of rebranding are heavily DISCOURAGED. All forks should maintain the OpenFIRE name as well as credits to its original authors (specifically That One Seong, Samuel Ballantyne (Samco), and Mike Lynch (Prow7)).

Products that wish to integrate OpenFIRE by using its firmware on a supported microcontroller board - for example, inside of a prebuilt light gun - should make its usage of OpenFIRE clear, as well as give appropriate credit to its original creators. While it is Free (Libre) Software, we do ask that anyone incorporating our volunteer work into a product to please consider contributing back to the project via donations or sponsorships. Usage of OpenFIRE in commercial environments (such as public arcade settings) is also allowed, with the same note about contributing back applying as well. Any inquiries regarding third-party commercial sales of OpenFIRE-enabled products (such as prebuilt light guns using its Firmware) should be discussed in a thread in the Discussions tab of this repository, or emailing That One Seong ([email protected]) and/or Samuel Ballantyne ([email protected]).

As written under the GNU Lesser General Public License, any entities that wish to incorporate part of or all of OpenFIRE's Firmware components must make their modifications available to the public upon request. OpenFIRE is Free Software, both as in Libre and as in Coffee: if you have been charged any amount to use OpenFIRE, you have been scammed and should demand your money back!


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).

About

Reference firmware for the OpenFIRE project, built for the RP2040 microcontroller

Topics

Resources

License

Stars

Watchers

Forks

Contributors 7