⬆️ ⬇️

How does a light gun work?

Nintendo zapper



Remember, before we were Dandy? The lucky ones - with pistols. And all night long I wasn’t allowed to fall asleep the question: “How does this gun work?”



Everything turned out to be quite even simple, but I will hide the answer to the question under the cat so that you can not say goodbye to the cult mystery of childhood. ;-)

')

In the gun (which, in fact, is called the Zapper ) a photodiode is integrated, which receives light, and because of the long “muzzle” this photodiode became narrowly directed. At the moment of pressing the “trigger”, the entire screen was momentarily filled with black, and the target sprite was filled with a white rectangle. If the "barrel" was directed to a rectangle, the hit was counted. If there were several targets (NES supported up to 4, but this is not accurate), then the targets were highlighted in turn (winking) and the prefix calculated the hit using a binary search.



In childhood, it never occurred to me that the gun does not radiate, but accepts.



This is one of the simplest implementations of the light gun. In other consoles, more complex methods were used, for example, taking into account that the beam (on CRT TVs) illuminates only one point at a time. The prefix flooded the screen with white at the moment of pressing and counted the time until the photodiode was illuminated. Thus, the direction could be calculated more accurately, and the number of targets was determined by the "radius of destruction" of the pistol. This scheme, for example, was used in SNES.



The first light gun was invented already in 1936 for the Seeburg Ray-O-Lite submachine gun, in which the kinescope was not yet =). We also had to aim at the ducks, as in the well-known Duck Hunt .



In the video of the game Clay shooting , where you had to shoot at the plates (yes, I also remember from childhood) you can see those same rectangles.



Details can be read, knowing English:



en.wikipedia.org/wiki/Light_gun

en.wikipedia.org/wiki/NES_Zapper

www.madsci.org/posts/archives/1999-07/932797371.Eg.r.html



ROM images of games for the gun.



Duck hunt Phone with built-in emulator and special buttons to play NES, SNES, GameBoy.



And the most ardent duck fans can enjoy the flash equivalent of Duck Hunt on Flash .



I myself am thinking of buying a real, living Dandy, the benefit of only 400 R. And remember childhood. If only to pass the session then =)

Source: https://habr.com/ru/post/24274/



All Articles