Old-school cathode ray tube TVs have become de rigeur in the retro scene as the true way to experience retro games “the way they were designed”. But there’s a lot of benefits to modern TVs; they’re lighter, usually bigger, and there are a lot of upscalers that give really good pictures. But then you give up peripherals like light guns, that are permanently tied to the television’s timing. Or are they?
The humble lightgun
For the purposes of this blog post, let’s set out some ground rules.
- When I say “lightgun”, I mean the guns that were shipped for the Famicom and the Nintendo Entertainment System. Different guns worked different ways.
- When I say “LCDs”, I pretty much mean all modern television screens. In fact, even the short-lived generation of HD widescreen CRT TVs share this problem.
But what problem? Well, I’m getting ahead of myself.
The Zapper was the western packaging of the Famicom Gun. Either way they work the same inside, just one looks like a raygun and is fondly remembered, and one looks like a realistic gun and doesn’t seem to have been nearly as popular. Make your own cultural assumptions.
This is one case where Nintendo drew on their history. They had actually been making light gun games since 1973’s Laser Clay Shooting System and toys before that. The exact details of each system they’ve used varied a bit, but the basic concept doesn’t differ too much.
The Zapper gun consists of a trigger and a photodiode, basically a simple light sensor. When the trigger is pulled (on the NES and Famicom, this is a falling edge from 5V to 0V), the game reads the signals from the photodiode to determine what happened. (Interestingly, on the NES and Famicom, the Zapper trigger and photodiode have their own pins, and aren’t read serially like the controller is)
The thing to stress is, the photodiode is literally one bit of information. All the game can figure out from that is whether there’s light going into it at any particular time.
Let’s use a concrete example– Hogan’s Alley.
Game mode “A” is a simple shooting gallery. You are given three figures, and have to make a split-second decision which of the three you should shoot.
So there’s your problem. The photodiode gives you one bit of information; that’s not nearly enough to distinguish the three characters. After all, they all use similarly colored pixels, not that the photodiode even has color information.
Well, you might already know the answer. The photodiode only provides one bit… at a time. By setting a clever number of frames, you can extract more information.
First, a black frame. This helps prevent cheating; at this point, it knows that your gun is pointed at a TV which is turned off. Then, a succession of frames that are mostly black, with white targets. Each one corresponds to one of the figures on screen. Since this all happened so fast, your gun is still pointing at the same place it was when you pulled the trigger.
Why does it only check two? It thinks it figured out who I shot. And there’s the problem; I was pointing the gun at an LCD TV; a small widescreen monitor I keep next to my desktop alongside a CRT as a test setup.
The problem is, a CRT TV draws frames in real time. The Nintendo knows that when it draws a frame, that frame drawing is corresponding with the moving electron beam of the television in real time. In fact, NESdev claims that the photodiodes use have their signal die in as short as 10 scanlines, so the game needs to check more frequently than the 60Hz clock that usually governs an NES game.
What the Famicom doesn’t expect is that the screen could be late.
Resolutions and frequencies
Pretty much all analog video signals, RGB or otherwise, are imitating the raster of a television. That is to say, it assumes there is only a dot being drawn on screen at a time, and it provides signals that are timed as that dot moves across the screen.
This works perfectly fine for a CRT television that’s tuned to expect a line frequency of 15kHz and field rate of 60Hz, like most standard-definition televisions in Japan or here in North America. Howe