Skip to content

OpenFIRE Firmware Public Release 6.0 - White Valkyrja

Latest
Compare
Choose a tag to compare
@SeongGino SeongGino released this 24 May 16:19
· 7 commits to OpenFIRE-dev since this release
14d0027

The Big Overhaul Release!

And a long time coming, too.

This release is a big one for many reasons. After nearly a year of working on refactoring the app and the firmware, and two weeks worth of public testing and further improvements to the UX, I am very proud to finally bring OpenFIRE Firmware v6.0 to the general public!

Important

OpenFIRE Firmware v6.0 ONLY WORKS WITH APP v3.0 AND ONWARDS

Due to several fundamental changes on the communication between app and firmware, all old stable Firmware releases are rendered incompatible. However, to compensate for this, the new App will prompt the user if they would like it to automatically reboot the requested board if it's detected to be on an incompatible (earlier) version, so you shouldn't need to disassemble your lightgun to access the BOOTSEL button!

Caution

Expect to lose ALL PREVIOUSLY SAVED DATA on upgrade! This includes Saved Calibration Profiles, any current Custom Pin Layouts, and Gun Settings.

With how the communication protocol between app and firmware is built to be futureproof, we hope this will be the only significantly breaking change for the foreseeable future.

This changelog could go on for miles, so only the major highlights are listed below; if you want to get the lowdown on what exactly has changed, check out the commit diff between this and the last release!

Changelog

New Platforms:

  • With the SDK core bumped to the latest version as of writing, 4.5.4, RP2350 boards are now supported!
    • These haven't been tested yet (none of us currently own Pico 2 boards), but since RP2350 is source-compatible, it should be roughly identical in functionality and performance save for some compiler and architectural improvements (though performance has already been maximized even for RP2040 boards).
    • The refactored source code can also take into account the larger GPIO pool of the larger 2350B variant, so it's future-proofed even against those boards.
  • For developers, the shared resource TeamOpenFIRE/OpenFIRE-Boards can be used to easily add new boards and have it be reflected in both halves of the project with very little modification; just bump the submodule versions in each repo for the changes to be reflected!
  • For fans of the MiSTer ecosystem, OpenFIRE support has been officially merged into the main project; starting from this version (and assuming an up-to-date MiSTer release), just plug the gun in and it will automatically switch into a MiSTer-compatible mode with a gamepad layout tailored specifically to the platform!
    • As of now, the setup is subject to the limitations of the MiSTer platform - so you'll have to calibrate against the screen dimensions on a per-core basis and map the gun for each core you want to use it with. These are not something we can address without fundamental changes to the MiSTer's UI/UX, which is beyond the scope of this project.
    • Proper Display Calibration currently has to be done against the desired display from a different device - ergo, a Pi or PC running on the same display that the MiSTer will be plugged into - but we hope to release a companion script or application at some point in the future to allow for at least calibrating from the MiSTer itself without any extra PC needed. We also welcome other contributors to help with this idea!

New Functions:

  • Wii Cam Clock will allow for generating the necessary clock pulse for raw Wiimote cameras only, which normally would require an external quartz crystal.
    • This effectively means that (assuming voltage is wired to 3V3 Out), a standalone Wii Camera can be wired directly to an RP2040 or RP2350 board!
  • Though not necessarily new, the I2C Peripherals functions are now decoupled from being an implicit activation of OLED Displays. Essentially, more I2C Peripherals can be added and implemented into OpenFIRE using this pair! OLED Display is now a separate toggle that activates it as before, assuming a proper Peripherals pins pair is correctly mapped.
    • OLED Display can now choose between the stock address 0x3C and the alt address 0x3D, which some boards may be mapped to. This can be useful if your display doesn't show when toggled even after a reboot.
  • NeoPixel strands can now invert the position of "Static" pixels - so instead of the default "First N pixels", it can be set to "Last N pixels" are statically illuminated.

Performance Enhancements:

  • Input has been refined to use a much more stable and thread-safe queuing system - in summary, button signals aren't immediately sent with each press, and each camera poll does not individually send a unique mouse pos update, but rather the changes are queued and sent at the end of each button poll on the second core. In effect, button inputs should be sent significantly more consistently!
    • As a side effect, when using gamepad output mode with an analog stick, OpenFIRE can in fact send a true, near-precisely 1000hz worth of inputs in real world usage! Because of how USB works (and our composite device setup, i.e. the ability to output as three devices at once), this obviously gets split when used across the separate devices, i.e. the mouse and keyboard also have to take slices of that 1khz polling budget from the gamepad slot, but this should satisfy those who decide to put OF through a controller benchmark!
  • Other various optimizations have been made to reduce stalling and potential bottlenecks in normal GunMode usage.

OLED Display Enhancements:

  • OLED display should now be run exclusively from the primary core whenever possible, which should resolve (occasional/intermittent) screen glitches causing the display to shift its contents strangely that could be observed in previous versions.
  • When idling, the display will now update the top ticker to display current temperature, if any is currently installed.
  • When in serial handoff mode with applications that send life updates, when in Life Bar mode, the Life Bar will now scale with whatever the maximum value is provided from the application (for those where a value of "100" isn't necessarily 100% for whatever reason).

Button Mapping:

Every function of the available buttons can now be individually mapped!

  • Users can customize on-screen and off-screen functions of each button, as well as the mappings when in gamepad mode.
  • Whenever signals are sent over serial that modify the current button mapping, these changes will reference the currently saved button mapping, and will reset on either new Start or End signals.
  • Fixes have also been implemented so that the order of button map modifier serial signals, like setting Pedal modes or the Offscreen Button setting, shouldn't matter and will apply correctly regardless.
  • Start and Select button mappings will now always be relative to the currently assigned Player Number as assigned from Serial XR# commands, with the "Player-relative Start/Coin Key" setting.
    • By default, every gun (unless an alt Simple USB ID is set, e.g. templates for P2/P3/P4 IDs) will start with Player 1 appropriate mappings: Start = 1, Select = 5
    • When an XR# command is received, the function of buttons mapped to "Player-relative Start/Coin Key" will change to reflect this mapping.
    • This mapping persists even when modifying layouts further, e.g. temporarily modifying functionality of Pedal or setting Offscreen Button Mode.
    • This mapping is reset when receiving a new Start or End signal, and resets upon boot.
  • If an analog stick is available, it can now be set to either operate as a gamepad's analog stick (default), or emulate either a keyboard's arrow keys array or gamepad directional buttons.

Serial Enhancements:

  • R-type commands are now supported for setting custom "pulse" On/Off times for either Solenoid or Rumble, depending on what the connected FFB distributor calls for.
    • These settings only take effect during Serial Handoff mode, and only for "pulse" type signals (either F0.2.x or F1.2.x).
    • Overrides are reset after every Start and End signal.
  • Calibration Profiles can now have an Aspect Ratio preset which determines the stretch factor used when 4:3 Correction mode is enabled.
  • Solenoid events that are stuck on for more than 2s will now be automatically shut off, in case the FFB distributor has glitched in some way.
  • When using a temperature sensor, Solenoid events will be filtered to accept every other Solenoid ON command if it's crossed the Warning threshold, and will be filtered out entirely when passed the Shutoff threshold.

Other Fixes:

  • Gun will no longer wait an awkward amount of time if docking to the app on a first boot.
  • Lots, and lots, and lots of code cleanup.
  • Calibration will no longer sometimes use a wrong value due to the order of saving values vs. cursor movement - calibration when docked has no cursor movement wait at all.
  • Removed Herobrine.

Installation

Download the firmware file that corresponds to your microcontroller - if it's not listed, you may have luck with either one of the two generic images, but you'll have to map your controls manually. If you'd like to have your board supported, send a PR to TeamOpenFIRE/OpenFIRE-Boards!
For first-time installation, plug in your microcontroller board while holding the BOOTSEL button to enter bootloader mode (this also happens if your board has no code loaded on it yet) - it will appear as a removable drive named RPI-RP2. Now simply drag'n'drop your chosen .UF2 file to the drive, let it copy, and it will automatically unmount and reboot into OpenFIRE! You can now setup the gun as you please from the OpenFIRE App.

For any future firmware updates, you can simply "dock" the gun to the OF App, and click the Reboot to Bootloader option in the Gun Tests tab.
Board files are as follows:

  • adafruitItsy: Adafruit ItsyBitsy RP2040 - Samco Carrier Boards Layout (2.0 [default] or 1.1 [set preset in app])
  • adafruitKB2040: Adafruit "Keeboar" KB2040 - Other Carrier Boards Layout
  • arduinoNano: Arduino Nano RP2040 Connect
  • rpipico: Raspberry Pi Pico (non-W, RP2040) and clones thereof
  • rpipico2: Raspberry Pi Pico 2 (non-W, RP2350)
  • rpipicow-noBT: Raspberry Pi Pico W (RP2040), USB-only
  • rpipico2w-noBT: Raspberry Pi Pico 2W (RP2350), USB-only
  • vccgndYD: VCC-GND YD RP2040 (aka: the Chinese Pico clone with embedded NeoPixel)
  • waveshareZero: Waveshare RP2040 Zero
  • generic: Generic RP2040, may or may not work if your board isn't listed above.
  • generic_rp2350: Same as generic, but for RP2350 devices; again, may or may not work if your board isn't listed above.