> For the complete documentation index, see [llms.txt](https://wiki.retrobat.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.retrobat.org/controllers/supported-controllers/lightguns.md).

# Lightguns

Bang bang

RetroBat detects lightguns and configures them automatically in compatible emulators. This page explains how to connect and set up your gun.

To know which systems and emulators support guns, and how the buttons are mapped, see the [Gun controls](https://wiki.retrobat.org/controllers/gun_controls.md) page.

## Supported lightguns

<table><thead><tr><th width="161.5">Lightgun</th><th width="135.5">Detection</th><th width="173.75">Several players</th><th>Notes</th></tr></thead><tbody><tr><td><strong>Sinden</strong></td><td>Automatic</td><td>Yes</td><td>Needs the Sinden software and a white border around the screen (both handled by RetroBat, see below).</td></tr><tr><td><strong>Gun4IR</strong></td><td>Automatic</td><td>Yes</td><td></td></tr><tr><td><strong>Blamcon</strong></td><td>Automatic</td><td>Yes</td><td></td></tr><tr><td><strong>RetroShooter</strong></td><td>Automatic</td><td>Yes</td><td></td></tr><tr><td><strong>AimTrak</strong> (Ultimarc)</td><td>Automatic</td><td>Yes</td><td></td></tr><tr><td><strong>AE Lightgun</strong></td><td>Automatic</td><td>Yes</td><td></td></tr><tr><td><strong>Xgunner</strong></td><td>Automatic</td><td>Yes</td><td></td></tr><tr><td><strong>OpenFIRE</strong> (and OpenFIRE-ESP32)</td><td>Automatic</td><td>Yes, up to 4</td><td>Give each gun its own USB ID (PID 1 to 4) in the OpenFIRE App: it sets the player number. Do not change the default Vendor ID.</td></tr><tr><td><strong>Wiimote + DolphinBar</strong> (mode 1 or 2)</td><td>Automatic</td><td>Yes, one DolphinBar per Wiimote</td><td>See <a href="https://wiki.retrobat.org/controllers/supported-controllers/lightguns/wiimoteandbar.md">Wiimote &#x26; DolphinBar</a>.</td></tr><tr><td><strong>Wiimote + WiimoteGun</strong> (DolphinBar mode 4)</td><td>When WiimoteGun is running</td><td>No (1 Wiimote)</td><td>See <a href="https://wiki.retrobat.org/controllers/supported-controllers/lightguns/wiimotegun.md">WiimoteGun</a>.</td></tr><tr><td><strong>Wiimote + Wiimote4Guns</strong></td><td>Automatic</td><td>Yes, up to 4</td><td>See below.</td></tr><tr><td><strong>Mouse</strong></td><td>Always</td><td>–</td><td>A mouse can be used as a gun when no lightgun is connected.</td></tr></tbody></table>

{% hint style="info" %}
Most lightguns work as a **mouse and keyboard**. Check your gun's own software or manual if it has several modes, and keep it in its mouse mode.
{% endhint %}

## Lightgun detection

When a lightgun is connected, EmulationStation shows a notification and a gun icon in the top left corner, next to the controller icons: ![](https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2FWNy8FUpaOFpkpqXnguUF%2Fimage.png?alt=media\&token=528490a4-e4ff-4e16-a510-d524ee43d48e)

<div align="left"><figure><img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2FEeW9XeoQwT6y96N0v7TG%2Fimage.png?alt=media&amp;token=05c3b518-4a21-4499-908e-423138bd5c2b" alt=""><figcaption></figcaption></figure></div>

A crosshair is also displayed on the screen, so you can navigate the menus with the gun.

These can be changed in **MAIN MENU > CONTROLLER SETTINGS**:

* **SHOW GUN NOTIFICATIONS**: notifications when a gun is connected or disconnected.
* **DRAW GUN CROSSHAIR**: crosshair in EmulationStation.

<div align="left"><figure><img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2FIuBVYI5IgXUtQXfZ0okm%2Fimage.png?alt=media&amp;token=475d8f17-9756-44e2-ae24-dc6399df9844" alt=""><figcaption></figcaption></figure></div>

## Lightgun games

RetroBat knows which games are lightgun games:

* A gun icon is displayed next to their name in the game list (**MAIN MENU > USER INTERFACE SETTINGS > ICONS > SHOW GUN ICON**).

<div align="left"><figure><img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2F4swBvfwP6N88l1t7ejhI%2Fimage.png?alt=media&amp;token=b087e980-58a5-4ad7-9fc0-27eea95b220a" alt=""><figcaption></figcaption></figure></div>

* The **LIGHTGUN** filter shows only these games in a game list.
* The **lightgun games** collection groups them all. Enable it in **MAIN MENU > GAME COLLECTION SETTINGS > AUTOMATIC GAME COLLECTIONS**.

The list of lightgun games is the `emulationstation\resources\gamesdb.xml` file. A game is recognised when its file name matches (or contains) the `id` of a game marked `<gun/>` for its system.

{% hint style="info" %}
To customise the list, copy the file to `emulationstation\.emulationstation\resources\gamesdb.xml` and edit the copy: it is read first and is not overwritten by RetroBat updates. Your copy will not receive the games added in later updates.
{% endhint %}

{% hint style="info" %}
Some games are in the list although the gun is only used in some levels or mini-games.
{% endhint %}

## Enabling the guns

For games in the list, **the guns are enabled automatically** when you launch the game (except on Wii, where the Wiimotes are used as real Wiimotes).

For other games, or to change this behaviour, use the **ENABLE GUN** option:

* For a system: open the [View Options](https://wiki.retrobat.org/navigation/view-options.md) of the system, select **ADVANCED SYSTEM OPTIONS**, then **GUNS**.
* For a game: open the [Game Options](https://wiki.retrobat.org/navigation/game-options.md) and select **ADVANCED GAME OPTIONS**, then **GUNS**.

<div align="left"><figure><img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2FykVHx9mfCh4wCMB8R1LH%2Fimage.png?alt=media&amp;token=8faa35c0-c33e-41eb-b83b-1f113a033f53" alt=""><figcaption></figcaption></figure></div>

Set **ENABLE GUN** to **OFF** to play a lightgun game with a gamepad.

{% hint style="info" %}
Disabling the controller autoconfiguration does not disable the gun configuration: set **ENABLE GUN** to **OFF** as well.
{% endhint %}

Other common options in the **GUNS** submenu (depending on the emulator):

<table><thead><tr><th width="235.25">Option</th><th>Description</th></tr></thead><tbody><tr><td><strong>USE ONE GUN ONLY</strong></td><td>Configures only one gun when several are connected.</td></tr><tr><td><strong>RELOAD WITH BUTTON</strong></td><td>Reloads with a button instead of shooting off-screen, for guns that cannot shoot off-screen.</td></tr><tr><td><strong>INVERT TRIGGER/RELOAD</strong></td><td>Inverts the trigger and reload buttons (e.g. with a Wii Zapper).</td></tr></tbody></table>

## Several guns and player order

RetroBat assigns the guns to the players in this order:

1. Dedicated lightguns, following their own player number when the gun has one (Gun4IR, Blamcon, Sinden, RetroShooter, OpenFIRE…).
2. Wiimotes (Wiimote4Guns P1 to P4, then DolphinBar).
3. Other mice. Laptop touchpads and 8BitDo receivers seen as a mouse come last, so that they do not take the place of a gun.

If the order is wrong, you can force it with **P1 MOUSE/GUN INDEX** to **P4 MOUSE/GUN INDEX**:

* RetroArch: **MAIN MENU > GAME SETTINGS > RETROARCH OPTIONS > GUNS**.
* Other emulators: system advanced options > **GUNS**, when the emulator offers it.

{% hint style="info" %}
The detected guns, in their order, are listed in `emulationstation\emulatorLauncher.log` (lines starting with `[RawLightGun]`).
{% endhint %}

## Sinden Lightgun

<div align="left"><figure><img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2Fhe7hEb2QruWsSzclvO93%2Fimage.png?alt=media&amp;token=6205e6e5-c37a-4c10-a438-46f3e9a504c4" alt="" width="188"><figcaption></figcaption></figure></div>

The Sinden lightgun needs the Sinden software (`Lightgun.exe`), available on the [Sinden website](https://sindenlightgun.com/drivers/).

### First setup (outside RetroBat)

Before using the guns in RetroBat, run the Sinden software once on its own:

1. Configure and calibrate your gun(s) in the software (one tab per gun).
2. Enable **Start automatically**, so that the gun starts tracking as soon as the software is launched by RetroBat:

<div align="left"><figure><img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2FGDraTzDHlu8GsvaYGg3g%2Fimage.png?alt=media&amp;token=8984e57b-93c2-4e1f-abba-586af8b3c62b" alt=""><figcaption></figcaption></figure></div>

3. Close the software: your settings are saved in the `Lightgun.exe.Config` file, next to `Lightgun.exe`.

### Sinden software in RetroBat

RetroBat starts it automatically when a Sinden gun is detected. Either:

* put the software in the `system\tools\sinden` folder of RetroBat,

<div align="left"><figure><img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2FyTtrL194cFiekYdlQTgU%2Fimage.png?alt=media&amp;token=ec6cfeaa-19b2-4243-8438-e5656d420735" alt=""><figcaption></figcaption></figure></div>

* or set its location in **MAIN MENU > GAME SETTINGS > GUNS > SINDEN > SINDEN SOFTWARE PATH**.

<div align="left"><figure><img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2FhBJchHoGmapakfqa1M1r%2Fimage.png?alt=media&amp;token=64965a31-6601-4eb3-a6eb-206fd8aa33df" alt=""><figcaption></figcaption></figure></div>

Other options in **GAME SETTINGS > GUNS > SINDEN**:

<table><thead><tr><th width="221.5">Option</th><th>Description</th></tr></thead><tbody><tr><td><strong>SINDEN BUTTONS CONFIGURATION</strong></td><td><strong>STANDARD</strong> (default): RetroBat sets the gun buttons as mouse buttons and keys, as expected by the emulators. <strong>GAMEPAD MODE</strong>: the buttons are sent as gamepad buttons. <strong>NO CONFIGURATION</strong>: RetroBat keeps your own Sinden configuration.</td></tr><tr><td><strong>KILL SINDEN SOFTWARE</strong></td><td>Closes the Sinden software when the game ends.</td></tr></tbody></table>

**White border**: the Sinden needs a white border around the game to locate the screen. RetroBat adds it automatically (as a bezel) when the guns are enabled.

For some standalone emulators, the border is drawn with ReShade: select the **sindenborder** shader set if the border does not appear.

<div align="left"><figure><img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2FNCrX8mcEvMeLunuD7jCw%2Fimage.png?alt=media&amp;token=c21b7617-fd89-40bd-9c7c-da23494e750a" alt=""><figcaption></figcaption></figure></div>

Keisho, Model3-Vulkan, Odin and ArcadeDuck draw the border themselves when a Sinden is detected. For the first three, set its thickness with **SINDEN BORDER SIZE** in the **GUNS** options of the emulator.

## Wiimote

<div align="left"><figure><img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2F9kZJV0IiPcOsB16rxzyB%2Fimage.png?alt=media&amp;token=5a0185e9-198b-403d-b651-327c4fb8c0f1" alt=""><figcaption></figcaption></figure></div>

A Wii Remote (Wiimote) can be used as a lightgun in three ways:

<table><thead><tr><th width="158.5">Method</th><th width="167.75">DolphinBar mode</th><th width="176.25">Players</th><th>Software</th></tr></thead><tbody><tr><td><strong>DolphinBar alone</strong></td><td>Mode 1 or mode 2</td><td>One DolphinBar per Wiimote</td><td>None. See <a href="https://wiki.retrobat.org/controllers/supported-controllers/lightguns/wiimoteandbar.md">Wiimote &#x26; DolphinBar</a>.</td></tr><tr><td><strong>WiimoteGun</strong></td><td>Mode 4</td><td>1</td><td>Provided with RetroBat. See <a href="https://wiki.retrobat.org/controllers/supported-controllers/lightguns/wiimotegun.md">WiimoteGun</a>.</td></tr><tr><td><strong>Wiimote4Guns</strong></td><td>Mode 4, or Bluetooth without DolphinBar</td><td>Up to 4</td><td>To install: <a href="https://github.com/Aynshe/WiimoteGun">Wiimote4Guns (Aynshe)</a>.</td></tr></tbody></table>

Tell RetroBat which mode you use in **MAIN MENU > GAME SETTINGS > GUNS > WIIMOTE > WIIMOTE CONNECTION MODE**. With 2 Wiimotes, **WIIMOTE FIX ASSOCIATION** can fix a wrong association between the Wiimotes and their keyboard in some emulators.

<div align="left"><figure><img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2FSkKNLWdFr5ofWgK8vayV%2Fimage.png?alt=media&amp;token=ac1c111f-fb0d-4671-9c08-07cdc99db83b" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
For Wii games in Dolphin, the Wiimotes are used as **real Wiimotes** (DolphinBar in mode 4): see the [Wii page](https://wiki.retrobat.org/systems-and-emulators/supported-game-systems/game-consoles/nintendo-game-consoles/wii.md).
{% endhint %}

### Wiimote4Guns

Wiimote4Guns is a version of WiimoteGun by Aynshe that supports **up to 4 Wiimotes**, connected with a DolphinBar in mode 4 or directly in Bluetooth, with a 1-bar sensor or a 4-LED layout. Each Wiimote is seen by RetroBat as a separate lightgun (Wiimote4Guns P1 to P4) and configured automatically for multiplayer games.

1. Install Wiimote4Guns as described on the [project page](https://github.com/Aynshe/WiimoteGun) (Windows 10 or 11, .NET 10 x64 runtime; Wiimote4Guns installs its own virtual driver).
2. Disable the WiimoteGun provided with RetroBat: in the `retrobat.ini` file at the root of RetroBat, set `WiimoteGun=0` (default value).
3. Set the DolphinBar to **mode 4**.

{% hint style="info" %}
For better accuracy, place the DolphinBar (or the sensor bar) **under** the screen, as close as possible to the picture, and set the switch at the back of the DolphinBar to the **bottom** position.
{% endhint %}

{% hint style="warning" %}
WiimoteGun and Wiimote4Guns must not run at the same time.
{% endhint %}

## Other lightguns

* [Gun4IR](https://www.gun4ir.com/)
* [RetroShooter](https://retroshooter.com/)
* [Blamcon](https://blamcon.com/)
* [AimTrak (Ultimarc)](https://www.ultimarc.com/)
* [OpenFIRE](https://openfirelightgun.org/) ([firmware](https://github.com/TeamOpenFIRE/OpenFIRE-Firmware))
* [OpenFIRE-ESP32](https://alessandro-satanassi.github.io/OpenFIRE-ESP32/) ([firmware](https://github.com/alessandro-satanassi/OpenFIRE-Firmware-ESP32))

These guns are detected automatically by their USB identifier. Set them to their mouse (and keyboard) mode with their own software if they have several modes.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://wiki.retrobat.org/controllers/supported-controllers/lightguns.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
