The Nintendo Light Gun
I was recently wasting my time playing a flash version of the classic 8 bit Nintendo Duck Hunt game. This made me think about the light gun that was used to play this game with the original console, and how that cool little piece of hardware worked so perfectly back in the days. If you remember, every time you triggered the gun the TV screen became white for an instant. This technique permits to detect whether or not the gun is pointed at the target when triggered by the user. The gun itself contains a photodiode in its barrel which, when light falls on it, develops a voltage difference between its input and output leading to a flow of current. This is called the photovolatic effect and is the basis for solar pannels (each solar cell is just a large number of photodiodes).
Now, the gun and the TV are both wired to the game console. When the gun is triggered, it takes time for the electron beam emitted by the CRT to paint the entire screen white starting at the top left corner and ending at the bottom right. The screen driver electronics send pulses to the game console at the start of each horizontal and vertical retrace signal. When the photodiode in the gun first senses the white light, a signal is sent to the console and the number of microseconds between the beggining of the horizontal and vertical retraces and that instant are counted. Due to a fixed retrace frequency, this count gives the X-Y location on the screen where the gun is pointed and is compared to that of the target in order to output a hit or a miss.
Previous light gun techniques only painted the target white and a hit was recorded every time the photodiode outputed current. This allowed users to cheat by pointing the gun at a constant light source like a flashlight. The technique developed by Nintendo, which was patented, overcame this problem.
The flash version of Duck Hunt can be played here.
A detailed technical description of how photodiodes operate can be found in this PDF document from the Hamamatsu Corporation.
Now, the gun and the TV are both wired to the game console. When the gun is triggered, it takes time for the electron beam emitted by the CRT to paint the entire screen white starting at the top left corner and ending at the bottom right. The screen driver electronics send pulses to the game console at the start of each horizontal and vertical retrace signal. When the photodiode in the gun first senses the white light, a signal is sent to the console and the number of microseconds between the beggining of the horizontal and vertical retraces and that instant are counted. Due to a fixed retrace frequency, this count gives the X-Y location on the screen where the gun is pointed and is compared to that of the target in order to output a hit or a miss.
Previous light gun techniques only painted the target white and a hit was recorded every time the photodiode outputed current. This allowed users to cheat by pointing the gun at a constant light source like a flashlight. The technique developed by Nintendo, which was patented, overcame this problem.
The flash version of Duck Hunt can be played here.
A detailed technical description of how photodiodes operate can be found in this PDF document from the Hamamatsu Corporation.
0 Comments:
Post a Comment
<< Home