RetroCompat :: Arcade — lightgun technology notes & roadmap
Why the Sinden matters, how the modern lightgun ecosystem fits together, the problems we've already solved, and where this project could go next. Distilled from the project's research files.
NES Zapper, Sega Menacer, Konami Justifier, Namco GunCon. The screen flashed white on trigger pull; the gun's photodiode timed when the CRT's electron beam passed the target. Extremely accurate because the gun read the display itself. LCD/LED/OLED don't draw line-by-line, which killed traditional lightguns.
Wii Remote, Wii Zapper, GunCon 3. Tracked IR LEDs near the screen and computed position relative to them. Worked, but introduced drift, recalibration, distance sensitivity, and never matched CRT precision.
A high-speed camera inside the gun. Software draws a white border around the game; the gun's computer-vision pipeline finds that border every frame and solves for exact screen location — no sensor bars, no IR, no external tracking. The gun literally sees the display.
The white border is not cosmetic — it's the tracking target: a giant machine-vision fiducial (like an AprilTag/ArUco marker) wrapping the screen. Known geometry + high contrast + constant reference points let the gun solve a homography (perspective transform) from camera image → screen rectangle, dozens of times a second.
Gun camera → capture frame → detect white border → corner detection → perspective matrix (solve homography H) → screen coordinates → convert to mouse / lightgun input → emulator
| Spec | Value |
|---|---|
| Camera | 60 FPS USB camera (inside the gun) |
| Tracking rate | >50 calculations / sec |
| End-to-end latency | < 20 ms |
| Interface | USB HID |
| OS | Windows, Linux, Raspberry Pi |
| Recoil model | solenoid + capacitor bank, USB-driven (no power brick) |
Self-calibrating: because it observes the screen border every frame, there's no stored sensor offset to drift — move around the room freely. Exposure matters more than resolution: a bad exposure destroys edge detection even on a "clear" image.
| Layer | Role |
|---|---|
| MAME | Arcade preservation backbone — Virtua Cop, House of the Dead, Lethal Enforcers, Point Blank, CarnEvil, Area 51, Police Trainer. This project's current backend. |
| RetroArch | MAME / Flycast / Beetle PSX / FBNeo / Dolphin cores, with Sinden border overlays built in. |
| TeknoParrot | Modern arcade on PC hardware — Time Crisis 5, House of the Dead Scarlet Dawn, Aliens Armageddon, Terminator Salvation, Tomb Raider Arcade. |
| DemulShooter | Memory-injection translation layer — intercepts game memory and injects real gun coordinates, fixing broken mouse implementations. Often mandatory for Model 2 Emu, Demul, Lindbergh, RingEdge/Wide, Chihiro. |
A 2026 high-end build looks like:
LaunchBox / BigBox → RetroArch → (MAME · Flycast · FBNeo · Dolphin · PCSX2) → TeknoParrot → DemulShooter → Sinden guns
…giving several decades of lightgun history from one front-end.
| Problem | Cause | Our fix |
|---|---|---|
| Reload on every trigger pull | Foot-pedal joystick (JOYCODE_1) auto-bound into the lightgun aim axis → aim dragged off-screen → read as off-screen → reload. The Sinden wiki confirms disabling/relocating off-screen reload solves accidental reloads. | ctrlr merge: keep the Sinden device-mapping, pin aim to GUNCODE OR MOUSECODE, exclude all joysticks. |
| Aim stuck in screen centre | Bound to GUNCODE only — the win32 cursor is clamped to centre in fullscreen. | Aim = gun or mouse together. |
| Aim won't track / wanders | Windows "Enhance pointer precision" (mouse accel) warps motion before MAME sees it; or multimouse 1 forcing relative RawInput. | Accel off; multimouse 0 + win32 absolute providers. |
| Off-screen reload "no-op" | offscreen_reload isn't a real MAME 0.288 option — reload is the game's own mechanic, best handled by the Sinden software. | Removed the dead setting. |
Other community fixes worth remembering: disable Anti-Jitter (removed in newer Sinden software); force 1920×1080 for TeknoParrot titles that mis-aim at other resolutions (e.g. Tomb Raider Arcade); for border-detection failures use a darkened room, fixed brightness, no reflections, no HDR.
The clearest expansion. DemulShooter adds proper lightgun support to standalone emulators that MAME handles poorly — ElSemi's Model 2 Emulator (Virtua Cop 1/2, Gunblade — far better 3D than MAME), Supermodel (Model 3), Flycast/Demul (Naomi: House of the Dead 2, Confidential Mission). This matches the project's original "Model 2 Emulator as a tiny alternative to MAME" note. A DemulShooter backend would package emulator + DemulShooter + game + a launcher that starts DemulShooter alongside the emulator — parallel to the planned 86Box backend.
Opens the modern lightgun catalogue (Time Crisis 5, HotD Scarlet Dawn, Aliens Armageddon). Needs per-game trigger patches and resolution handling; pairs with DemulShooter.
Already on the roadmap — Win9x VM images for PC lightgun ports, packaged like the romset bundles.
For people without a Sinden. Already built: a vJoy virtual controller fed by
vjoy_feeder.exe turns the desktop mouse into an absolute pointer
(JOYCODE_1), so aim tracks like a touchscreen with a visible crosshair — no
recentering. Opt-in per game; fully isolated from the gun path.
Scene understanding + edge detection + AprilTag-style calibration could remove the white border entirely; camera + IMU fusion with predictive tracking could cut latency further. The Sinden is really a real-time visual-localisation instrument — the same maths as drone landing pads, ArUco markers, and SLAM. (Of direct interest to the HYLAS computer-vision / AprilTag work.)
RetroCompat :: Arcade — future ideas. The current shipping backend is MAME with the Sinden gun (aim = gun/mouse, joystick excluded; bezel; per-game BIOS; build-time romset verification). Everything above is direction, not commitment. This page has its own day/night toggle and runs offline.