Lightgun Games

Under construction.

If you'd like to check the page under construction for the upcoming v35 featuring better light gun integration, check the playground version here.

Recommended watching: Batocera Nation's excellent lightgun tutorial for Batocera. Part 2.

Some games are played using a peripheral that you could aim at the screen called a light gun. Arcade machines would use some sort of specialized tracking technology to “see” where the gun is pointed at, home consoles would use time-synced flashed of the CRT display when the gun is shoot to determine if the target was “hit” which is impossible to utilize on modern LCD screens. Using original lightgun hardware on Batocera is not possible because of these reasons…

Fortunately, by the powers of modern technology we don't actually require use of the original equipment in order to play these games when they are emulated.

Most emulators have employed the use of the most common peripheral available to computers to emulate the lightgun hardware: the computer mouse. For this reason, Batocera will simply use the system's cursor (however it may be controlled) for lightgun hardware emulation by default.

One of the most infamous examples of this is using a Wiimote to emulate a mouse via a DolphinBar.

The use of other types of lightguns, mainly ones that directly hook into the system instead of sending mouse cursor signals, is still possible in Batocera. However it is outside of the scope of this article to set up, and no support can be offered for such an endeavor.

When using a specialized peripheral to emulate a lightgun on a system, it is recommended to still have a traditional modern controller or keyboard on hand to keep consistent access to Batocera's hotkey shortcuts, such as to exit the game.

A DolphinBar is a Bluetooth sensor that can connect a Wiimote to a computer, and has specialized modes that allow it to control the mouse. Conveniently, it also has two IR lamps, which is what the Wiimote actually uses for its motion tracking (the same as the original Wii). An infamous one is the Mayflash W010 bar; not that expensive (about 20€/$20) and easy to use.

If going down this route, do temper your expectations. The Wiimote's IR camera was not that accurate and has a narrow field of view, its accuracy is among the worst of all ways to emulate lightgun hardware. However, it is easily the most available, cheapest to run, easiest to setup and most repairable option.

You'll no longer have to deal with this nonsense.

The Wiimote's IR camera is actually pretty terrible at holding a point still. For this reason, the Wii itself had an extremely strong smoothing algorithm applied to the on-screen cursor. Modern emulators have this smoothing feature built-in.

Due to problems of the IR LEDs burning out from staying on too long, the v5 firmware released in late 2015 turns off the Mayflash bar's IR LED lights when they are not needed, such as when no Wiimotes are connected or when the Mayflash bar is in a mode where the pointer cannot be used. But unlike the old problematic sensor bars that turned off after a set time, the Mayflash bar knows when the Wiimotes are actively being used, so it presents no problems. W010 Firmware.

First, connect the USB cable from the Mayflash bar to your computer. Ensure that the power switch on the back of the unit is turned on.

A blue LED will light up on the top of the unit when powered on.

Set the TOP/BOTTOM as appropriate to the position the Mayflash bar will be placed in relation to the display. For best results, use the TOP option.

Syncing the Wiimote

  1. Press the left SYNC button to put the Mayflash bar into syncing mode.
  2. Press the red SYNC button inside the battery compartment of the Wiimote.

The Wiimote should almost immediately sync to the Mayflash bar. This will be remembered between reboots.

Alternatively, if you only want to use the Wiimote on a particular DolphinBar temporarily and don't want to override the information about the first bar you synced to (such as if you play regular Wii games as well in Mode 4), you can use the temporary mode instead:

  1. Press the left SYNC button to put the Mayflash bar into syncing mode.
  2. Press the buttons 1 and 2 on your Wiimote
  3. The bar led stops flashing and on the Wiimote led 1 and 2 or 1 and 4 are now fixed on

You are ready to play, nothing more to do.

Does the below info tip really apply? Could the “raw input” driver be used for multi-mouse emulation?

You need two Dolphinbars to play 2 player Lightgun games because only one Wiimote will sync when set to the Mouse and Keyboard Mode. Just put one bar on top and one bar below the TV and switch the button on the MayFlash bar.

Modes

The Mayflash bar features four different modes. Tap the MODE button on the top of the unit to cycle between them. For most systems, we will only be interested in two of these modes: MODE 1 and MODE 2, which both send the Wiimote's pointer as mouse signals to the computer.

Mode 1
  • Intended for using just a Wiimote without a Nunchuk.
  • There are two modes, indicated by LEDs 1 + 2 or LEDs 1 + 3 lighting up.
  • You can switch mode with [HOME] + D-pad Down
Trigger = joystick_button[0,left]
A = joystick_button[0,right]
Home = keyboard[0,lwin]
plus = ?
minus = ?
1 = pgup
2 = pgdn
Mode 2
  • Intended for using a Wiimote with a Nunchuk.
  • LEDs 1 + 4 light up.
  • The Nunchuk offers more buttons that can be bound for the system.
Trigger = joystick_button[0,1]
A = joystick_button[0,2]
Home = keyboard[0,lwin]
plus = enter
minus = esc
1 = ?
2 = ?

In this mode, the [-] button is mapped to the [Esc] key, which will exit the emulator.

This can be achieved via a lightgun game collection, no?

GAME COLLECTION SETTINGSAUTOMATIC GAME COLLECTIONSLIGHTGUN GAMES

The DolphinBar emulates a Mouse and a Keyboard as a PC Remote Controller. There is a fundamental problem with mouse emulation on a DolphinBar: jitter. It doesn't matter how far or close to the sensor bar you are, the cursor is always shaking, and there is no method to solve it. But the Mayflash make a really good work to reduce this problem.

Applies to most 2D arcade games.

At start only the movement and the first shot button are configured. If you want to use the Second Shot, you must open the Libretro menu with SELECT+B, go to options, and them ENABLE to Show MAME Menu. Then you will be able to use it to configure another Wiimote button in second shot.

You can also try to configure other buttons to Insert Coin and game Start.

If you can't configure all the keys on your Wiimote, remember the first gamepad is always available. You can use it to move in game menu, insert coins, game start… and still access Libretro menu with SELECT+B

Applies to NES games, such as Duck Hunt.

To use it on this emulator, open the Libretro menu and verify these settings:

Options

  • Zapper Mode: mouse
  • Show Cross Air: True

Controls

  • User 1 Device Type: Auto

The jitter is more important on FCEUMM than MAME. You can see the cross always shaking, but it's still playable.

FIXME If you choose for Zapper Mode to Lightgun the jitter will disappear, it's really impressive, but it will be impossible to shot with any Wiimote button.

to do

Controls, Port 1 controls, gamepad? Port 2 controls, Zapper?

Options, Show Crosshair, on? Zapper device, pointer?

Applies to Sega Master System and Megadrive/Genesis games.

Show the crosshair by enabling the option in ADVANCED SYSTEM OPTIONSSHOW CROSSHAIR.

And the controller type? Is this true?

Controls

  • User 1 Device Type: MS Light Phaser

How do you map a button to shoot with?

Multiplayer?

Applies to SNES games.

Show the crosshair by enabling the option in ADVANCED SYSTEM OPTIONSSHOW CROSSHAIR.

And the controller type? Is this true?

Controls

  • User 2 Device Type: SuperScope

How do you map a button to shoot with?

Multiplayer?

Applies to Sega Saturn games.

to do

Controls, Port 1 controls, Device Type, Virtua Gun?

Options, Input, Gun Crosshair?

Applies to Sega Model 2 games (the first 3D arcade lightgun games).

to do

model2-config, Emulator, Load Rom… load your game Esc, Game, Configure Controls…, scroll down to Player 1 Start and Coin.

Can configure START and Coin to 1 and 2. A is automatically bound to Reload, B is automatically bound to shoot.

Gun settings, gun calibration.

Applies to Sega Model 3 games.

to do

Advanced system settings, crosshairs, ON.

Press 7 to open service menu, 8 to go down. AIM SET to test input CALIBRATION TEST, SETUP CALIBRATION. Follow the system's instructions.

Applies to Sega Dreamcast and NAOMI and Sammy Atomiswave.

to do

Applies to Sega Dreamcast and NAOMI and Sammy Atomiswave.

to do

Advanced system settings, Controller 1 Type, Light gun?

Options, Show Light Gun Settings, On? Gun Crosshair 1 Display, White?

Gamepad required to start game?

Applies to Nintendo Wii games.

If using a DolphinBar for Wii lightgun games, well the good news is that you don't have to actually be emulating a mouse; you can actually use the Wiimotes as they were meant to be. In order to enable this:

to do

Can turn on MOUSE AS IR WIIMOTE to stay in MODE 1/2, albeit requiring a custom controller profile.

Alternatively, if desired, MODE 4 for native Wiimote interface. Advanced system options, Emulate WiiMote. In dolphin-emu-config, ensure “Connect Wii Remotes for Emulated Controllers” and “Continuous scanning” is turned on. Ensure that Wii Remotes are set to “Real Wii Remote” if using a DolphinBar.

  • emulators/lightgun_games.txt
  • Last modified: 2 months ago
  • by atari