Skip to content

Releases: SeongGino/ir-light-gun-plus

IR-GUN4ALL v4.2 - Fault Carol

25 Apr 04:12
e760c12
Compare
Choose a tag to compare
Who's Carol and why is it her fault?

The General Fixes Update

Lots of little things that adds up to an overall smoother experience.

  • External NeoPixels actually work now! Oops.
  • TMP36 temperature sensor support has been finalized, and is now enabled and supported by default - no more separate TMP builds!
    • The calculation from mV to Celsius has been tweaked, which should hopefully provide decently accurate results now.
    • Like analog sticks, the temp sensor path is only used if it's applied to a pin - otherwise it goes through the normal non-temp monitored path.
    • Turns out, it's totally safe to leave the feature enabled even the pin itself isn't actually populated - but it's a moot point with the added check above.
    • When docked, the board will now periodically ping the current temperature reading if the temp sensor pin is assigned. This will be used in a future GUN4ALL-GUI update.
  • Analog sticks are now disabled by default, as leaving the pins active without any real device will cause ghost inputs (interpreted as always holding the stick to the bottom-left). If you have an analog stick you'd like to add to your build, refer to the custom pins setting in the GUN4ALL-GUI.
  • D-pads (GunCon 2, et al) are now mapped to the Gamepad's D-pad! A much more player-agnostic method compared to the keyboard arrow keys.
    • And the gamepad now has D-pad support! Much to Seong's demise who had to convert from a sane button mask to the HID POV hat standard which is a goddamn mess.
  • Added generic board support. Though this doesn't make any guarantees that it will work as perfectly as the provided builds for bespoke boards, you can at least use it to (blindly) assign pins for basic functionality with (theoretically) most other RP2040 microcontrollers.
  • Some (much needed) code cleanup.

For New Users: Read This!

In the releases below, there are multiple sets of firmware files provided:

  • The name after SamcoEnhanced. indicates the board build - rpipico being Raspberry Pi Pico, adafruitItsy being Adafruit ItsyBitsy RP2040, arduinoNano being Arduino Nano RP2040 Connect, adafruitKB2040 being Adafruit Kee Boar KB2040, and generic being for any other RP2040 board that doesn't yet have any presets. Aside from the latter, the build determines a lot of behind-the-scenes aspects tailored to each specific board.

Once you've downloaded the UF2 file corresponding to your microcontroller, simply connect it to your PC while holding the BOOTSEL button, and drag'n'drop the UF2 onto the RPI-RP2 removable storage that pops up. The board will disconnect and be flashed with and running GUN4ALL.

From here, you can 'dock' the board with GUN4ALL-GUI and set it up as you please, configure board settings, and test inputs and camera. For more information, refer to the documentation here!

If you'd like to see more fixes like this more often, please support my work on Ko-fi. Every bit goes towards getting more equipment to refine and expand GUN4ALL for more boards/enclosures.

IR-GUN4ALL v4.1 - Song of Edo-hotfix

15 Mar 19:38
23a9e2f
Compare
Choose a tag to compare
Is this Spring-y? Still pretty pleasant though.

Hotfix Update! (March 16th, 2024)

This resolves a potential issue with hold-to-pause and serial handoff mode where, if the gun was not aiming on-screen when switching, it could possibly trigger pause mode mid-game.

This hotfix also adds Adafruit KB2040 support! Since it's of the Pro Micro boardspec, it's designed to be 1:1 compatible with GUN4IR adapter boards, or builds made around that system, meaning a KB2040 with GUN4ALL should be a drop-in replacement. Of course, if you have any problems with this case, feel free to submit an issue.

The Analog Stick Fixes Update

Guess how long it took Seong to get a gun with analog sticks to actually test the things they coded blindly?

  • Fixes analog stick directions being inverted, at least for Cabela's Top Shot Elite gun.
  • Fixes analog stick jerkiness by polling it by an interval analogPollInterval (2ms currently) after every camera update.
  • Removed unnecessary deadzone filtering, so stick position is always updated.
    • Deadzone filtering should be up to the app on the PC itself.

Do let me know if the stick direction reversal is incorrect or not - this resolved it for my Top Shot Elite, but no idea how it affects e.g. generic analog stick boards et al.


For New Users: Read This!

In the releases below, there are multiple sets of firmware files provided:

  • The name after SamcoEnhanced. indicates the board build - rpipico being Raspberry Pi Pico, adafruitItsy being Adafruit ItsyBitsy RP2040, arduinoNano being the Arduino Nano RP2040 Connect, and adafruitKB2040 being the Adafruit Kee Boar KB2040. The build determines a lot of behind-the-scenes aspects tailored to each specific board.
  • Firmwares with -tmp36 at the end are specifically for builds using a TMP36 Temperature Sensor - using this firmware on a non-tmp36-using build might cause unwanted noise in the analog reading--or in English, temperature will be sensed as higher/lower than IRL and negatively impact solenoid performance.

Once you've downloaded the UF2 file corresponding to your microcontroller, simply connect it to your PC while holding the BOOTSEL button, and drag'n'drop the UF2 onto the RPI-RP2 removable storage that pops up. The board will disconnect and be flashed with and running GUN4ALL.

From here, you can 'dock' the board with GUN4ALL-GUI and set it up as you please, configure board settings, and test inputs and camera. For more information, refer to the documentation here!

If you'd like to see more fixes like this more often, please support my work on Ko-fi. Every bit goes towards getting more equipment to refine and expand GUN4ALL for more boards/enclosures.

IR-GUN4ALL v4.0-rev1 - L.G.A Force-rev1

03 Mar 04:20
a3382fd
Compare
Choose a tag to compare
A glorified version bump release without actually being a version bump.

The only significant difference here between this and the last hotfix is the throttling of test mode messaging to a set value (currently prints every 50ms).

This version also happens to be releasing in-sync with GUN4ALL-GUI v1.1, which now has a functioning test mode reimplementation! No more need for Processing or the hotkey - just press the button in the interface to toggle on and off Test Mode to test the camera's alignment.

IR-GUN4ALL v4.0 - L.G.A Force

26 Feb 05:29
3ece499
Compare
Choose a tag to compare

Hotfix Update!

Just added some minor tweaks and fixes regarding the Processing mode. The only significant change is the removal of the Processing Sketch mode button combo, as this will be toggled and controlled by the GUI soon.

The original release notes for this major release are below:


(The kind of release that makes you want to yell YEEEEEEEEAAAAAAAAAAAHHHH)

The Graphical User Interface Update

gooey

Yep, the thing I talked about wanting to do for months now is finally done! With it, anyone with Windows 7(+)/any Linux distro can change and tweak just about every aspect of their guns painlessly without having to open a single terminal or dev environment.

You can download the latest release of it here. The GUI is made part-and-parcel to work only with this version of the firmware and onwards.

Speaking of firmware...

  • The first all-binaries release! v3.0 was a test run for the G4ALL binaries, so this release hereon formalizes it as the primary distribution method. Releases are available for Raspberry Pi Pico, Adafruit ItsyBitsy RP2040, and Arduino Nano RP2040 Connect*.
    • Each board has both a "normal" and "TMP36" variant - the latter is made for users with a working TMP36 temperature sensor, as there's no good way to 'safely' have it enabled without possible analog jitter . This will be addressed in a later update. Most users can install the normal builds.
      *Arduino Nano was reported to be having issues wrt button inputs being recognized, so consider this beta support for that board.
  • Several behind-the-scenes changes to facilitate the aforementioned GUI application, including:
    • Boards that are connected to the GUI will go into a special "docked" state - camera tracking and outputs will be disabled, and inputs will be sent to the application to display in the Gun Tests tab.
    • Most of the GUN4ALL configuration commands are now split off into its own method specific to Docked mode.
      • The only additional settings available to be set from applications like e.g. MAMEHOOKER are XA[L/R] for analog output mode, XI(2-4) for setting autofire speed, and XR(1-4) for player start/select remapping. This should make it less likely for misbehaving apps to accidentally trigger the EEPROM clear function for example.
    • Added ability to switch to and calibrate any of the four gun profiles from the GUI.
      • When calibrating a profile from the GUI, you're given the opportunity to test the calibration after it's saved. Pull the trigger to confirm and return to normal docked functionality.
    • Simplified serial terminal backtalk output for methods intended to only be used for communicating with the GUI.
    • Various settings fetching/saving improvements.
    • Pin mapping for both inputs and output/feedback devices attached to the board can now be updated and reloaded remotely, without any rebooting necessary whatsoever! (Except external NeoPixels, as they attach to the PIO in a way that can't be easily removed at runtime)
  • Initial UX fixes (i.e. when flashing a board with the firmware for the first time), including a more sane method of detecting a cleared EEPROM, and (for LED-enabled devices) lighting will slowly blink orange when waiting for an initiating trigger pull for first-time setup.
  • For custom builders, the LightgunButtons library has been updated! Make sure you replace whatever version is installed in your Arduino IDE environment.

IR-GUN4ALL v3.0 - Rinko-hotfix

09 Feb 18:27
ad1e1e9
Compare
Choose a tag to compare
(What was meant to be a smooth yet foreboding release blew up into something much more.)

Hotfix update!

Some safeguards regarding custom TinyUSB names were added, to prevent the likelihood of loading a null identifier--as well as some other behind-the-scenes changes to facilitate GUI development, which is currently ongoing.

The original release notes for the major version are below:


The Feature-Completeness Update

  • Full save support - virtually* every aspect of the gun can now be configured at runtime.
    • This is currently done with serial commands - see the output of Xm and Xp for more info. This has been intended to be the backbone for the eventual GUI companion app that will be coming in due time for Linux & Windows, which will (hopefully) streamline the process significantly.
  • Added External RGB LED support, for both four-pin units & external NeoPixels!
    • For four-pin units, enable using FOURPIN_LED and configure what legs are what color for what pins (PWM pins only).
      • Both Common Anode(+/5V) and Common Cathode(-/GND) units are supported, with bits flipped for the former when commonAnode is used.
    • Fourpin LEDs reacts to both individual R/G/B color channels (what's used in Serial Handoff when MAMEHOOKER is sending lamp commands) and packed colors used in profiles (since the individual colors are in the three-least significant bytes, we just read bytes directly to their bare color channels--exact color accuracy might be slightly off!).
  • For external NeoPixels, enable using CUSTOM_NEOPIXEL and configure which pin the external unit is on (any digital pin), and how many are daisy-chained (for strips; leave at 1 for a solo unit).
    • Note that this is for external units, as in ones you added yourself! GUN4ALL has always had support for integrated DotStars and NeoPixels since the beginning, and will continue to be used if the board has one alongside any external Pixels.
  • Pico compatibility has been fixed and vetted, now using pins 20 & 21 for the camera clock/data lines.
  • The input system has been updated, adding support for offscreen button settings! Distinct from the already-existing offscreen trigger button mode, this allows all the buttons (except for the trigger, start and select) to have different functionality depending on whether the gun is pointing on- or off of the screen.
    • To go along with this, low buttons mode has been implemented as a macro that remaps Buttons A & B as Start & Select when pressed while aiming off-screen.
  • Gamepad output has been implemented! The gun can now not only output its array of buttons as gamepad button presses, but with an internal toggleable switch (see the below feature!), the gun's position can now be reported as a gamepad stick! (Currently when in Analog Output mode, the gun reports as the left stick by default - currently investigating if this is correct for games that are hardcoded to use this for multiplayer, like Railbreak for instance.)
    • This makes GUN4ALL one of, if not the first open source lightgun system with compatibility for PCSX2 nightly two-player support!
  • Alongside support for Analog Output, this version also introduces Analog INput allowing an analog stick, such as what's seen on devices like the Cabela's Top Shot Elite Rifle, to be compatible with GUN4ALL - connect the stick to analog pins A0/A1 by default.
  • As part of the input system update, GUN4ALL can now dynamically reallocate its player start/select mappings! Meaning with a single serial command, it can switch start & select from 1/5 to 2/6, or 3/7, or 4/8.
  • Configuration over Serial has been implemented, now allowing users to change aspects of the gun and quick-jump to nearly any adjustable setting or mode with a two-to-three character keycode when connected over a serial monitor/terminal such as screen/echo commands on Linux or puTTY on Windows!
    • Gun Configuration commands and their functions can be found on the repo wiki
    • If a syntax error is detected, the gun will print out some helpful information depending on the command type.
    • Also general cleanup in the serial processing method to make it cleaner to add commands to it and be easier to read for development.
  • A new version of Pause Mode has also been introduced for guns with one-to-two aux buttons, with the aptly-named Simple Menu (simpleMenu). If enabled, the gun will use a new interface, where the options are scrolled through by using Buttons A & B, and selected with the Trigger.
    • Simple Menu will cycle through options in the following order, always starting from the first:
      • Calibrate current profile: What it says on the tin.
      • Switch profile: Selecting will drop into a submenu where the user can select what calibration profile to switch to; always starting from their currently selected profile.
      • Save settings: Duh.
      • Toggle Solenoid: Solenoid will click a few times when enabled, won't when it's disabled. This option is skipped if a respective hardware switch is detected on a valid pin number.
      • Toggle Rumble: Rumble motor will spin when enabled, won't when it's disabled. This option is skipped if a respective hardware switch is detected on a valid pin number.
      • Send Escape Key: Fires a press of the escape key on the keyboard when activated.
    • The Simple Menu can be exited by pressing and holding either the A or B buttons for half the length of pauseHoldLength at any time.
  • Both Simple Pause Menu and the original Hotkey Pause Mode can be set to be toggled (holdToPause) by pressing and holding the A Button & Trigger while aiming completely off-screen for the time allotted in pauseHoldLength
    • This isn't connected to the normal offScreen boolean for off-screen shots, but the lastSeen integer that counts the amount of seen IR sources--this means you have to intentionally point away from any and all light sources for this to come into effect!
  • Another concession for one-button gun users, the vertical/horizontal scale setting in the calibration sequence can be adjusted both ways with a single A button!
    • Pressing (A) while the cursor is on-screen will increase the scale, and pressing (A) while it's at the edge of the display will decrease the scale.
    • This along with the aforementioned Pause Mode features makes GUN4ALL totally Sega Virtua Gun compliant, for the one person out there that uses it.
  • Hardware switches will now be checked if they're valid before setting any new state, if changed; so too will solenoid and rumble be disabled if their respective signal wires are set to invalid pin numbers.
  • Some plumbing done to the TinyUSB Devices and LightgunButtons libraries to facilitate these changes.

As part of our transition to simplified distribution of GUN4ALL, we now distribute binaries! Simply download the UF2 file that correlates to the board you use, and set your microcontroller into its bootloader mode (either holding BOOTSEL on plug, or set the COM port to 1200 baud, e.g. stty -F /dev/ttyACM# 1200 on Linux).

  • Currently, these will use pre-defined pin locations by default, which are reflected in the documentation; custom mappings can be set by a serial monitor/terminal with Xm--see its help printout for further information. Hint: you can do this even on initial boot when prompted for initial calibration!
  • When the currently selected profile on boot is detected as having zero'd center coords out, this will prompt an EEPROM clear and a first calibration on-boot - pull the trigger to center the cursor, then pull again to set and begin the process proper!
  • There are multiple sets of firmware files provided:
    • SamcoEnhanced.pico.uf2 is for the Raspberry Pi Pico, and SamcoEnhanced.adafruitItsy.uf2 is for the Adafruit ItsyBitsy RP2040 board - the only difference is default pins mapping and accommodation for the latter's builtin NeoPixel. These should be the ones used for most users.
    • Firmwares with -tmp36 at the end the same as the default, but with support for the TMP36 Temperature Sensor enabled - this is currently provided as a separate image because the temperature sensor implementation of recoil is slightly different from the normal one, and leaving analog pins unattached can cause noise that might negatively affect recoil performance if a TMP36 sensor isn't being used. This will hopefully be resolved in a future release.

To reflect these changes, the enclosed instruction book has removed references to the development environment and so is now focused exclusively on end-user interaction and notes for users - developers or those deploying wholly custom builds with features disabled must now refer to BUILDING.md in the root dir of this source repository, and it's assumed that you have a familiarity with the Arduino IDE.

On a sidenote, this update affects both LightgunButtons and TinyUSB Devices, so if you're building from the IDE like previous releases then make sure to replace these libraries as well.

IR-GUN4ALL v2.1-hotfix - Fantasyland

23 Nov 17:03
71104c9
Compare
Choose a tag to compare
(Because dealing with MAMEHOOK feels like a fantasyland of screwups fr fr)

Hotfix update!

A user has reported that the camera wasn't working with the vanilla Raspberry Pi Pico - turns out that it only set the I2C channels and initialized on the ItsyBitsy boards, and not all RP2040 devices. This should resolve that.
If you downloaded this release before November 30th, the source tarballs will be replaced with this hotfix version. Apologies for the inconvenience!

The original release notes for the major version are below:


Merry Thanksmas!

After a lot of confusion, sweat, and panic, the source of the MAMEHOOK-related "crashes" has been narrowed down to a bug in the TinyUSB stack with bidirectional data transfers. A patched version of Earle Philhower's Pico core has been uploaded to a separate repo, and is what the enclosed instruction book now uses.

Warning

If you're upgrading from any previous version of IR-GUN4ALL, you must update the url in the Arduino IDE! Specifically, changing:

https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json

to this:

https://github.com/SeongGino/arduino-pico/releases/download/3.6.1-fix/package_rp2040_fix_index.json

...and then remove the original Raspberry Pi Pico core, and install the one labeled "Raspberry Pi Pico/RP2040 (Fix)". Make sure you're selecting the right board under that specific category! Failure to do this will not alleviate the lockups when using MAMEHOOKER.

With this development, MAMEHOOKER is less experimental, though still noted as such until the underlying issue has been fixed upstream.

And now, for the rest of the smaller changes:

  • Player number selection has been added! Now instead of manually going into the button definitions table to change Start/Select for other players' guns, the much more straightforward PLAYER_NUMBER define has been added to automate this! Simply change the number to anything from 1-4 to redefine Start/Select keys to what's appropriate for that gun's intended player slot (1/5 for P1, 2/6 for P2, 3/7 for P3, 4/8 for P4).
  • Speaking of MAMEHOOK, LED pulse functionality has been added! This will allow F2/3/4x2xY serial commands to pulse the LED the specified color for Y amount of pulses. This addition therefore completes all the main force feedback-type commands for serial handoff mode.
    • There is a tiny known issue where the LED will 'flick' back to a full on state while dimming when LED pulse commands are rapidly sent. If you look at it in person, you might actually prefer this effect in a way.
  • Another tweak to MAMEHOOK, the solenoid/rumble on/off setting will act as an override - i.e., if one is disabled, that peripheral will not respond in serial handoff mode. In case you find the solenoid feedback distracting, you might appreciate this! (Applies to both hardware/physical and software toggles)
  • Other bits of housecleaning, including fixing DUAL_CORE so that it's compatible with MAMEHOOKER again; removing the hated String type used in serial processing to a character array char[3]; and a bit more plumbing on the main runMode loop.

No binaries; just click "Source code (zip)" and extract to the necessary directories as stated in the project README. Documentation is included in the SamcoEnhanced sketch folder (as another README.md) and is highly recommended to be read before use.

IR-GUN4ALL v2.0 - That Heart, That Power-rev1

13 Nov 05:15
cf6d09b
Compare
Choose a tag to compare
(we pretend only the arranged version exists in this house)

Revision 1 update!

  • Added USB identifier defines in the sketch proper! No more having to redefine boards.txt for your platform of choice (which stopped working anyhow) - just change the VID/PID pair and manufacturer/device strings that the gun reports as in the configuration area of the sketch. Makes getting things setup for multiplayer that much less painless (though P2/3/4 will have to change what their keyboard buttons map to manually - may have to streamline this more soon!)
  • Fixes a few oversights with missing ifdefs around the serial processing block generating errors when Rumble and/or Solenoid were undefined/disabled. Oops.

The original release notes for the major version are below:

The Fix everything update, and then some!

  • Camera tracking performance has been restored, due to a drastic oversight in the button polling that noticeably reduced performance and added latency where there shouldn't be. Oops!
    • This was caused by incidentally not gating the keyboard press/release commands, thus flooding the USB bandwidth with needless redundant keyboard presses. Speaking of which...
  • Merged AbsMouse5 with a TinyUSB-compatible Keyboard library into one TinyUSB_Devices library! This solves a number of longstanding issues:
    • For RP2040 users, this means they can now use the latest versions of Earle Philhower's Arduino core, as versions after 3.0.0 intentionally deprecated basic Keyboard library support.
    • For everyone, this means that the keyboard library now does proper (1ms) delays on its own, meaning the button sticking issue of old has been finally, truly fixed. So for all buttons mapped to the keyboard (except Start and Select, purely for quality-of-life), we can use the LightgunButtons library as it was intended. Useful if you want to use Button C as a keyboard bind instead of Mouse 4, for example.
    • This library is now what also determine USB polling rate, which has been adjusted to 1ms - if your board has issues, try bumping this back up to 2 in TinyUSB_Devices.cpp
    • This also means that GUN4ALL only works with boards that are compatible with the TinyUSB core!
      • ...Which doesn't mean a lot, as all SAMD/RP2040 boards we recommend have already been compatible. This just means M0/M4 boards also need to use the TinyUSB stack - you will get library errors regarding the keyboard otherwise.
  • Added support for Dual Core processing! If using an RP2040, you have the option to use the second core for handling buttons, meaning (theoretically) faster performance!
    • ...Though you won't notice, as even running the sketch in single core mode with the -Os small optimization bit isn't appreciably slower, if at all. Still, this COULD reduce latency, and even help with supporting more boards in the future.
  • (Extremely, heavily experimental) MAMEHOOKER support has been added! Yes, really; we now support using this elusive bit of kit to integrate with a game's provided force feedback more faithfully, compatible with both Windows & Linux (thru Wine)! When enabled, the gun will automatically hand off control of a gun's force feedback (if any) to a running mamehook instance if the right S start code has been detected - and will reclaim that control when the E end code is sent. The LED will turn a mid-intensity white when in serial handoff mode.
    • We currently support most of the commands, but not all; S (start, no options) and E (end), M1x2 (offscreen button mode set), F0x0/1/2 (solenoid off/on/slow pulses), F1x0/1/2 (rumble motor off/on/pulses), and F2/3/4x0/1 (R/G/B LED off/on support, no pulses - these will light up an Adafruit board's builtin DotStar/NeoPixel, if any). Any unrecognized command will simply be ignored.
    • ...However, this is currently labeled as experimental; while it does indeed function, in my and another individual's testing on RP2040, it has a high likelihood of crashing after anywhere from 3-15 minutes of use (see #1 and #3 for more info). This is due to some undetermined but longstanding bug regarding large influxes of serial communication (whether mamehook or debug messaging) in combination with camera tracking. Therefore, it is disabled by default - you can enable this by uncommenting #define MAMEHOOKER in the topmost section of the sketch if you'd like to help track down where this issue is occurring exactly.
    • If you are more experienced with Arduino programming and have ideas on how to fix this, please get in touch. (This may or may not be a cry for help on this specific feature.)
  • And other miscellaneous fixes, including true variable rumble motor strengths using PWM. A quiet solenoid mode might also be in consideration using a similar method.

Oh, right, and the name's changed! It is now known by the much snappier (and hopefully not too confusing) IR-GUN4ALL - representing the four points-of-reference system, as well as a nod to the inspiration of this project and its features, while simultaneously representing its open-source nature (and referencing the MAME4ALL forks of old, if anyone remembers them)!


No binaries; just click "Source code (zip)" and extract to the necessary directories as stated in the project README. Documentation is included in the SamcoEnhanced sketch folder (as another README.md) and is highly recommended to be read before use.

SAMCO Enhanced+ v1.4 - Operation

04 Nov 22:01
2e264f8
Compare
Choose a tag to compare
(as in the National Diet Building, if you haven't caught on to the naming scheme yet)
  • Added three-shot burst firing mode, bringing the amount of force feedback models up to three! This will always fire the solenoid off three consecutive times for each trigger pull, held or not. Only works when solenoid is allowed/enabled on a build that incorporates one, obvi.
    • Also adds a respective toggle button combo in pause mode, Buttons A+B+C*
* This happens to be the same combo as the choice of buttons for exiting the processing run mode, hence why it calls that in the sketch instead of its own bespoke button combo mask.
  • Small technical change, LED functions are tweaked so that it's only included in the final compiled build if a board with builtin LEDs is used, or if explicitly enabled with the LED_ENABLED define.
    • As of now, nothing noticeable will be different, but this does make it easier to possibly add explicit external RGB support in the future (mainly NeoPixel, but generic RGB support might be possible). Currently the sketch still depends on an onboard DotStar or NeoPixel if available.

No binaries; just click "Source code (zip)" and extract to the necessary directories as stated in the project README. Documentation is included in the SamcoEnhanced sketch folder (as another README.md) and is highly recommended to be read before use.

SAMCO Enhanced+ v1.3 - Serious Intensity-rev1

02 Nov 20:25
dbff018
Compare
Choose a tag to compare

NOTE: just a small housecleaning revision, but figured I'd push it to this release tag anyways. The original release notes are as follows:

  • Added Offscreen Button support! This optional setting (disabled by default) allows sending a different mouse input - right click by default - when pulling the trigger off-screen! Thanks to cmjdbb for the feature request.
    • This required a small refactoring of the way we poll for the trigger, by removing it from the global polling function provided by Prow's LightgunButtons library, and handling it ourselves based on the same set of conditions used for determining solenoid or offscreen rumble.
  • Fixed the Start/Select/D-pad buttons responsiveness! If it's not perfect, then it should be significantly better with reduced risk of buttons sticking. Operation Wolf and Taito fans, you're welcome.
    • This ALSO required a similar refactoring of the button press logic, as LightgunButtons seems to handle keyboard buttons very strangely. It was much less complicated to fix, thankfully, so at this point the only thing LightgunButtons handles are the non-trigger mouse events.
    • Also added a small buffer when holding the C button for the default Pause Mode and Escape Keypress button combos, so that Start/Select won't send their key inputs when this is held. Unless there's a GCon2 game I'm unaware of that uses this for a game function, this shouldn't impede playability.
  • Added software toggles functionality! Now when in Pause Mode (Button C + Select by default), you can toggle the extra features added with button combinations! Each function has a tactile response (if they are installed in the gun) and a respective flash of the microcontroller's onboard LED.
    • Button C + A: Offscreen Button Support (White) - Send Right Clicks when firing off-screen; when enabled, the rumble motor will pulse on and off a few times.
    • D-Pad Left: Rumble Motor Toggle (Salmon) - Engage the rumble motor when firing off-screen; when enabled, the rumble motor will engage for a moment.
    • D-Pad Right: Solenoid Force Feedback Toggle (Yellow) - Fire the solenoid when shooting on screen; when enabled, the solenoid will engage for a moment.

No binaries; just click "Source code (zip)" and extract to the necessary directories as stated in the project README. Documentation is included in the SamcoEnhanced sketch folder (as another README.md) and is highly recommended to be read before use.

SAMCO Enhanced+ v1.2 - Pure, True, Slammin' HOTFIX

01 Nov 19:49
d69dfe6
Compare
Choose a tag to compare

NOTE: If you recently downloaded this build or repo from earlier today (November 1st, 2023), it had a small regression where button presses incidentally stopped the force feedback functions. This version fixes that, so I recommend redownloading and installing fresh! (Thanks to the working EEPROM saving introduced, you won't lose calibration data if you reflash!)

  • Using debouncing logic for trigger pulls, should fix double solenoid/recoil firing.
  • Actually implemented EEPROM, now all known compatible boards use non-volatile storage!
    • The framework for EEPROM writing was always implemented by Prow7, but didn't actually commit anything to it - and EEPROM support wasn't even loading in the sketch itself. This fixes both of those problems.
    • No more need to reflash the sketch when recalibrating - unless you're using a build without Start + Select, anyways.
  • HOTFIX: Fixed the new debouncing read so other buttons won't disable the force feedback.
    • buttons.debounced is actually a bitmask, so it SHOULD be being read one bit at a time.
    • Won't activate FF only when Start and/or Select are being pressed (for PS2 Time Crisis Games (2/3/Crisis Zone) where it's Start + Trigger to exit), since it felt cleaner. One can remove the latter two bitRead(...)s if they don't like this behavior.

No binaries; just click "Source code (zip)" and extract to the necessary directories as stated in the project README. Documentation is included in the SamcoEnhanced sketch folder (another README.md) and is highly recommended to be read before use.