Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.
That One Seong edited this page Feb 9, 2024 · 12 revisions

GUN4ALL Wiki Main Page

If you're just looking for the MAMEHOOKER guide, check out the Secret Files!

Here is where you'll find related miscellanea regarding the GUN4ALL system (as it's needed), alongside the previously-highlighted MAMEHOOKER documentation.

Check out the pages on the panel to the side!

Communicating with your board (v3.0 - Rinko and higher)

The v2.x series introduced support for communicating with the board to dynamically toggle various options, using the same serial communication infrastructure as is used for MAME HOOKER support. These options were expanded in v3.0 - Rinko to encompass more settings and flexibility.

These toggles are all prepended with the type code X (capital X), and are as follows (codes in [brackets] means they are optional):

  • XA[L/R]: Toggles on and off Analog Output mode (v3.0+), making the gun report its position as a joystick X/Y update instead of the mouse. The L/R determines which analog stick axis' that the gun position is output to - L = Left Stick (X/Y), R = Right Stick (Rx/Ry).
  • XP: Toggles the gun into and out of Pause Mode.
  • XT: toggles the gun into Processing mode, for use with the SAMCO Processing test sketch.
  • XC[#]: Sets the gun into calibration mode. This applies to the user's currently selected calibration profile; adding a number (from 1-4) prompts the gun to switch to that profile and calibrate it instead.
  • XR#: Sets the gun's player mappings to the number defined here, where # is a value from 1-4 - this namely remaps Start/Select to num1/5, num2/6, num3/7, or num4/8.
  • XS: Saves calibration and general preferences to the gun's internal memory (the same as pressing Start + Select in pause mode).
  • X# (just a capital X followed by a number from 1-4): Sets the gun to that calibration profile number.

These are not specifically designed for MAMEHOOKER (though can be used that way), so much as for Linux users who have easier access to writing to COM ports via scripting, as no such program exists for non-Windows platforms or outside of Wine.

Configuring the board settings (v3.0 - Rinko and higher)

v3.0 introduces expanded saving support, allowing (virtually) all of the options to be offloaded to and loaded from the save memory (currently only supports EEPROM-enabled devices, which are all RP2040 microcontrollers currently). These use the same types of serial codes as the above, intended for communication with a GUI companion application.

To interact with the saving, the following codes are provided:

  • Xc: Clears the EEPROM, effectively resetting the board to the firmware's builtin defaults.
  • Xl: Reads from the EEPROM and prints out all the settings currently saved, mostly for debugging.
  • Xm.x.y.z: Directly sets certain types [x] of options [y] to the provided value [z].
    • x: Setting Type | 0 = Booleans, 1 = Pins, 2 = General Preferences, 3 = TinyUSB Identifier
    • y: Setting Entry | Which boolean/pin/preferences to change
    • z: Setting Value | The new value to apply to the boolean/pin/pref.

These settings need to be committed using the XS save command (except TinyUSB settings, which are committed automatically upon set).