Original Consoles · Volume 3

The Latch Consoles — Timing Boxes That Fake a Cathode-Ray Tube for the NES, Master System, Mega Drive, Saturn, the Konami Guns and the Dreamcast

How a box that reads the console's own video can pull the gun line at the instant the beam would have reached the aim point; the LightGunVerter and Light Gun Commando read in detail; the white-level gate that lets an NES play Duck Hunt on a flat panel; the LED in the barrel; console by console what has been done; and the timing budget

3.1 What a latch console needs

On the NES, Master System, Mega Drive, SNES, Saturn and Dreamcast, and with Konami’s guns on the PlayStation, the gun is a light sensor and nothing more. The console works out the aim point from when the sensor fires: it freezes its own horizontal and vertical beam counters at the instant the gun’s line changes, or, on the PlayStation, an interrupt routine reads two timers (CRT Timing, Volume 5 has the latch on each console). The NES Zapper asks a simpler question, whether the sensor sees light during a frame in which the game has drawn a white box (CRT Timing, Volume 4).

An imitation therefore cannot send the console a number. It has to produce an electrical edge on the gun line at the moment the console’s beam reaches the point the player is aiming at, every frame the game looks, with the same small delay a real photodiode and amplifier would have added. Modding Classic Light Guns, Volume 5, §5.5 sets out why this is possible. It has been built, twice: the LightGunVerter (2017 to 2019, open source) and Light Gun Commando (2022 to 2023).

Figure 1 — The two Konami Justifiers for the Mega Drive, blue for player 1 and pink for player 2. The Justifier is a latch gun: it reports only the instant it sees light, and the console reads its own beam co…
Figure 1 — The two Konami Justifiers for the Mega Drive, blue for player 1 and pink for player 2. The Justifier is a latch gun: it reports only the instant it sees light, and the console reads its own beam counters. Light Gun Commando imitates it on a Mega Drive and Mega-CD from a Wii Remote's aim, which is what a timing box has to do for every gun in this volume. Photo: Evan-Amos, Wikimedia Commons, public domain.

3.2 Read the console’s video, not the screen

Figure 2 — A timing box. Top: the console's composite video goes to a sync separator and on to the television, with a cursor drawn in; a line-and-dot timer locked to each line's sync takes the aim point from …
Figure 2 — A timing box. Top: the console's composite video goes to a sync separator and on to the television, with a cursor drawn in; a line-and-dot timer locked to each line's sync takes the aim point from the aim source, a Wii Remote in both published designs; a pulse stage adds a sensor delay and is gated by a white-level comparator that checks whether the video at the aim point is bright; the pulse goes to the console's gun input, which may be a light line, a TH pin, IRQ10, or an LED pressed into an original gun. Bottom: one line of video with its sync pulse and the active line after the back porch; the timer counts from the sync edge to the aim point's X, adds the sensor delay, and emits a pulse on the aim line only. Own-work diagram.

The idea that makes both designs work: the console’s composite video signal carries the console’s own timing, whatever display it ends up on. Separate the sync pulses from it, count lines from the vertical sync and time from each horizontal sync, and a microcontroller knows exactly where the console’s beam is, to a fraction of a microsecond, without ever looking at a screen. Give it the aim point from a modern sensor and it can fire the gun line at the right instant. The console latches its counters on that edge and computes an aim point that agrees with the sensor.

A flat panel downstream changes nothing. It shows the picture late, so the player sees the target later, exactly as on a PC; but the console’s notion of where the gun pointed is consistent with the frame it was generating. That is why a timing box rescues consoles that no change to the original gun can (Modding Classic Light Guns, Volume 5).

Ben Ryves described his version of the same step: “adding an LM1881 sync separator circuit to extract the composite (horizontal) and vertical sync pulses”, with the ESP32’s motor-control PWM synchronised to it, he “was able to generate pulses that looked like they might have come from a light gun based on the point on the screen the Wii remote was aimed at” (13 December 2022).

3.3 The LightGunVerter, read from its source

Charlie Cole’s LightGunVerter is the most complete published timing box. Its repository (charcole/LCDZapper) holds the ESP32 firmware, the KiCad schematics, a SCART breakout and the instructions; its product page promised “Play any classic light gun game using original hardware on modern TVs”, and claimed it was “working with every light gun system so far tested (including NES, Master System, Saturn, PSX, PS2, Dreamcast and even arcade machines). Only requirement is the system has composite video output”. The photograph in Volume 1 shows the board.

What the firmware (Firmware/main/main.cpp, version 1.1, January 2019) does, from its own definitions and comments:

  • Aim. Up to two Wii Remotes over Bluetooth. The two infrared LEDs on the box’s front panel act as the sensor bar. The instructions advise placing the box “centrally under your TV, with the front pointing towards where you will sit”, and, when the Wii Remote is fixed to a gun, offer a four-corner calibration for a one-to-one mapping, with the warning that “The Wiimote has rather a narrow field of view”.
  • Sync. Composite sync arrives on one GPIO (IN_COMPOSITE_SYNC) and is handled in a hand-written assembly loop on the falling edge, with debounce (“noisy signals can cause errors”) and length tests to tell vertical from horizontal and short sync pulses.
  • Timing units. Everything is in 1/80 µs, the ESP32’s 80 MHz peripheral clock, so 12.5 ns per step. The constants include a back porch of 7*80 (“Should be about 6*80”), a line duration of 8*465+100, and visible-line counts of 258 for PAL and 206 for NTSC (the comments say “Should be 288” and “Should be 240”: the box deliberately treats only the lines a game can use).
  • Output. The pulse is generated by the ESP32’s RMT peripheral, triggered on each sync edge, on the player’s output pin (OUT_PLAYER1_LED), which the hardware ANDs with a white-level detector (§3.4). A second output, OUT_PLAYER1_LED_DELAYED, is a “Delayed output of OUT_PLAYER1_LED to emulate sensor detection time”.
  • A cursor. Because the player has no gun sight on a Wii Remote, the box dims or brightens the video to draw a reticle into the picture it passes to the television (OUT_SCREEN_DIM), in three brightnesses and four sizes including off.

Each console gets a preset (“cable”) of delay, line delay, white level and output type:

Table 1 — Each console gets a preset ("cable") of delay, line delay, white level and output type

CableDelay settingLine delayWhite levelOutputNotes in the code and instructions
Universal200onnormalLED into an original gun (§3.5)
NES350on (step 13)inverted, buttons swappedGun in the NES’s second controller port; turns on a “sustain capacitor” that “Adds extra hold delay for NES games”
SMS (Master System)350offswapped
Saturn510offnormalWii Remote A is Start, needed by Saturn gun games
GunCon 2158onserial “smart cable”Volume 2, §2.9
Customuseruseruseruser

The instructions describe the delay as “how far to the right of the cursor the shot will land”, in microseconds, “Needed as all lightguns had some level of delay before registering they had seen the flash from the TV”. The code’s arithmetic for the GunCon 2 cable treats the preset as tenths of a microsecond on top of a fixed 4 µs, so the presets above span roughly 1.5 to 5 µs beyond the base; that reading is an inference from the code, not a stated unit.

Two players. In versus mode, the first Wii Remote to pair drives the player 1 port and the second drives player 2. In co-op mode both drive player 1, and “Whenever the B button is pressed that player will take control of where the console thinks the gun is pointing”, which turns single-player games such as Duck Hunt into rudimentary two-player games.

Licence and status. Creative Commons Attribution-NonCommercial 3.0: “you can make your own but you can’t make them and sell them”. The last firmware commit is dated 4 January 2019, the last push 12 August 2020, and the product site no longer answers. Of the forks on GitHub, one was pushed after 2020 (September 2023).

3.4 The white-level gate, and why the NES works

A Zapper game does not latch counters. It draws a white box where each target is, for one frame, and asks the gun whether it sees light (CRT Timing, Volume 4). Firing a pulse at the aim point every frame would make every shot a hit, so a timing box needs to know whether the console’s picture is actually bright at the aim point.

The LightGunVerter answers that from the video signal itself. A comparator watches the composite video, with its threshold set by a PWM output from the ESP32 (LEDC_WHITE_LEVEL, in “About 0.1V steps”, default “test voltage of 1.3V (good for composite video)”), and the hardware ANDs that comparator with the timed pulse. The pulse reaches the console only when the beam is at the aim point and the video there is white. On the NES, that means the gun “sees” the target box in exactly the frame the game draws it, and nowhere else. The instructions say plainly that this matters only for the Zapper: “Some systems (almost all but NES) don’t try to detect dark frames so this can be left in the Off setting which improves reliability.”

This is the clean answer to the oldest complaint in the hobby. Modding Classic Light Guns, Volume 5, §5.3 shows that rescuing Duck Hunt with the original Zapper needs both a different sensor and a patched game, one game at a time, because the panel shows the white box late. A timing box needs neither: it checks the white box in the console’s signal, at the moment the console generates it, and the panel’s lag never enters the decision.

3.5 The universal cable: an LED in the original gun

The LightGunVerter’s universal cable is a single LED on a long lead. “Attach the LED end to the barrel of your light gun so the light shines into the barrel. Blu-Tac is good for holding in the LED in place. Use the Blu-Tac to make a seal so no other light can enter.” The Wii Remote provides the aim, and the player pulls the original gun’s trigger.

The box flashes the LED at the moment a cathode-ray tube would have lit the aim point. The original gun’s photodiode sees a flash with the right timing, and the original gun does what it always did: a Light Phaser pulls its line, a GunCon counts the flash against its own video lead and reports a position, a Zapper sees light in the frame the game asks about. That is why the product page could claim the universal cable “should work with any light gun for any system as it just mimics the output of an old CRT TV”, and why its list included the PlayStations and the Dreamcast without dedicated cables.

Ben Ryves’s first attempt, DC-LiGuE in 2015, did the same for the Dreamcast, “shining a bright white LED into the end of a regular Dreamcast light gun”, because the Dreamcast’s controller bus was too fast for the ATmega he was using.

For this project the universal route has one real use: a bench reference. With an original gun, a CRT-era console and an LED driven by a known pulse, the gun’s own delay and threshold can be measured and compared with what a direct-wired imitation needs. It is not a way to play with the project’s gun, which would have to be strapped to the original.

3.6 Light Gun Commando

Ben Ryves’s Light Gun Commando (journal entries from November 2022 to January 2023) has the same structure with a different set of parts, and adds the cleanest architecture of any design found:

  • A central unit and console cables. “A central unit sitting under my TV that has the Wii remotes paired to it and the video signal passing through it”, with “a socket on the front that can be connected to the console-specific light gun simulating cables”. Before sending data to a cable, the host “asks it to describe its capabilities”, and the cable replies with a block listing each gun it can simulate and its buttons. A new console then needs only a new cable.
  • Timing. An LM1881 sync separator and the ESP32’s Motor Control PWM (MCPWM) and Pulse Counter (PCNT) peripherals, rewritten for ESP-IDF 5.0 in December 2022, with video timing for 240p, 480i, 288p, 576i and 480p, and separate sync for the Dreamcast’s VGA output.
  • Guns simulated: the Master System’s Light Phaser (the first test), the Mega Drive’s Justifier, the Mega-CD (“can now hit the broadside of a barn on a Mega-CD”), the PlayStation’s GunCon and Hyper Blaster (“the same circuit as the Guncon adaptor, but the firmware now supports different gun modes”; two Hyper Blasters at once on a PlayStation), the Saturn’s Virtua Gun (“I did also get the Saturn’s Virtua Gun working”), the Dreamcast Gun, the GunCon 2 and, in January 2023, the Xbox guns (Volume 4).
  • The Dreamcast. Its controller bus is “too fast to decode reliably in software on the microcontrollers I typically use”, so the Dreamcast cable uses a dsPIC33 running at 140 MHz with DMA to receive host frames without CPU load.
  • Aim. Four infrared LEDs round the screen in the GUN4IR layout, which made tracking “much easier and much more accurate” than the Wii’s two-LED bar.

No source code or schematics were published in the entries read. Light Gun Commando is evidence that the job is tractable on cheap microcontrollers, and its capability-descriptor idea is worth copying, but it is not a design that can be built from.

3.7 Console by console

Table 2 — 3.7 Console by console

Console and gunWhat the box must produceDone byNotes
NES ZapperLight during the target frame at the aim point, white-gated; triggerLightGunVerter (NES cable, universal)Gun in controller port 2; sustain capacitor; white level on
Master System Light PhaserLatch pulse on the aim lineLightGunVerter (SMS cable), Light Gun CommandoWhite level off
Mega Drive / Mega-CD JustifierLatch pulseLight Gun Commando
Mega Drive MenacerLatch pulse (the Menacer’s receiver carries it)Universal cable in principleNo dedicated cable found in either design
SNES Super Scope, JustifierLatch pulse on the SNES’s latch inputNeither design names the SNESThe universal cable should work in principle; MiSTer’s SNES core is the working alternative (MiSTer FPGA, Volume 2, §2.4)
Saturn Virtua GunLatch pulse; Start on a buttonLightGunVerter (Saturn cable), Light Gun CommandoWii Remote A for Start
PlayStation Justifier / Hyper BlasterA pulse on IRQ10 that the game’s routine timesLight Gun Commando; SindenPS’s KONAMI.hex and “Konami Interface Board” (status unknown)The software latch is the hardest: PSX-SPX’s notes on IRQ10 timing apply (CRT Timing, Volume 5)
Dreamcast Dreamcast GunThe gun’s bus messages with correct timingLight Gun Commando (dsPIC33); universal LED (DC-LiGuE, LightGunVerter)North American games refuse the gun (Console Light Guns, Volume 5)
PlayStation, PlayStation 2 GunCon, GunCon 2Either numbers (Volume 2) or a flash into the real gunTranslators in Volume 2; universal LEDTranslators are simpler

3.8 The timing budget

What precision a timing box needs is set by the console’s own latch, which CRT Timing, Volume 5 budgets console by console; this dive does not repeat the numbers. Three points bear on building one:

  • The resolution of the timer is not the problem. LightGunVerter’s 12.5 ns steps, and an RP2040’s PIO at its 125 MHz default clock (8 ns), are both far finer than any console’s horizontal counter, which steps in units of its dot clock (for the NES, 186 ns; CRT Timing, Volume 1).
  • Jitter in finding the sync edge is. A software loop that polls the sync line, or an interrupt with variable latency, moves the pulse by its own uncertainty on every line. LightGunVerter’s hand-written assembly loop and Light Gun Commando’s hardware-synchronised PWM are both answers to that. On an RP2040, a PIO state machine waiting on the sync pin and counting cycles has no software in the path at all.
  • The delay is a calibration, not a constant. Every original gun had its own detection delay, and the games’ calibration screens absorb it; the presets in §3.3 differ by console for that reason. A box needs an adjustable delay per console, and in practice a per-game nudge.

3.9 Why this, and why not the others

Table 3 — 3.9 Why this, and why not the others

ChoiceOptionsPickWhy, and why not the others
How to reach a latch console with a modern gunTiming box; LED into the original gun; patched game; emulationTiming box, after the PlayStation translator worksThe only route that uses the project’s gun directly on the original console. The LED route needs an original gun; patching is one game at a time; emulation is not the original console
Sync separationLM1881 (Light Gun Commando); comparator on composite sync (LightGunVerter)LM1881 classA dedicated part with composite and vertical sync outputs; LightGunVerter’s own comments flag noisy-sync handling as a problem it had to code round
TimerESP32 RMT or MCPWM; RP2040 PIO; dsPICRP2040 PIO for the project (Volume 5)Cycle-exact with no software in the path, and the same chip family the gun uses (D2). The ESP32’s attraction in both designs was Bluetooth for the Wii Remotes, which a wired USB gun does not need
White-level gateYes; noYes, switchableNeeded only for the NES Zapper, and LightGunVerter’s instructions say it hurts reliability elsewhere
Building from LightGunVerter’s filesCopy; learn fromLearn from, do not copyCC BY-NC 3.0 forbids selling anything made from it (decision D11)

3.10 What could not be verified

  • Nothing in this volume has been built or run.
  • The LightGunVerter’s delay units: microseconds per its instructions; the GunCon 2 code implies tenths of a microsecond plus a fixed offset.
  • Whether the LightGunVerter’s universal cable was tested with the SNES Super Scope or the Menacer; the product page names neither.
  • Light Gun Commando’s source, its Dreamcast cable and its Konami IRQ10 timing method; none were published in the entries read.
  • SindenPS’s Konami firmware and what the “Konami Interface Board” does with “video desync data”.
  • How many LightGunVerters were made or shipped.

Sources

  1. Charlie Cole, charcole/LCDZapper (LightGunVerter): Firmware/main/main.cpp (v1.1, 2019-01-04), LightGunVerter Instructions.pdf, LICENSE.txt, KiCad files, forks list; read 2026-10-24. https://github.com/charcole/LCDZapper
  2. LightGunVerter product page, Internet Archive capture (© 2017–2019), read 2026-10-24. http://www.lightgunverter.com/
  3. Ben Ryves, “Light Gun Commando: LCD-compatible light gun support for original console hardware?”, 13 December 2022; “Updating Light Gun Commando to ESP-IDF 5.0 and simulating a Guncon 2”, 25 December 2022; series index; read 2026-10-24. https://benryves.com/journal/3763182 ; https://benryves.com/journal/3763183 ; https://benryves.com/journal/tags/Light_Gun_Commando
  4. th3drk0ne, sindenps, README credits and Firmware/PSX/KONAMI.hex, read 2026-10-24. https://github.com/th3drk0ne/sindenps
  5. Martin Korth (nocash), PSX-SPX, “Controllers and Memory Cards”, Konami IRQ10 lightgun section, read 2026-10-24. https://psx-spx.consoledev.net/controllersandmemorycards/

Comments (0)

  1. Loading…

Comments are held for moderation — nothing appears until approved.