Game guns

Light guns work in the same way as light pens. On your typical tv set the electron gun (in the CRT) scans across the screen (phospor) one line at a time. It starts at the upper left corner of the screen then draws going to the right. When it gets to the right the electron gun turns off goes down one line and turns on and draws the next line. It does this until it gets to the bottom of the screen. Where it goes back to the top and starts over again. These are called raster lines.

Well when the electron beam hits the phosphor it glows brightly and slowly dims until it is struck again by the electron beam. Our eyes don't really notice this bright and dimming because they do not refresh that fast. You can see the bright/dim effect if you record the picture on the tv with a camcorder. Since the TV and the Camcorder refresh at about the same frequency you will see a bright group of lines that roll up the screen.

Since the Video Chip in the computer has to create the video signal it knows where it is currently drawing the curent raster line. The light pen when pointed to the screen detects this bright/dim effect and when the light goes from dim to bright it sends a signal pulse to the video chip. The video chip sets a latch which feeds 2 numbers, usually X location, Y location, into a memory location associated with the video card/chip. The computer program then looks at the numbers in the memory location. And can tell where the light pen is pointed on the screen by the two numbers.

In some games are made to flash the screen bright white to get both the effect of gun flash and also for getting stronger signal from the screen.
 
When you press the trigger the screen goes into just black and white (of course so fast you can't see it, or maybe you can in Duck Hunt, was a long time since I played it. 🙂)

Where the ducks are black; the background and the trees and bushes turns white.

The Zapper then checks if it hit black or white, this is done with a photo diode. Black = hit, White = miss.

This is probably possible to check out in a nes emulator and go frame by frame. I know I will... some other day. 😀
 
After reading KIDdErZ post (I began writing my text when that one was not posted, but I thought I would find the info just searching with Google, since my information comes from an magazine interview with someone who was working at Konami with the Police 24/7 game, and since I didn't know wich of the 234324 magazines it was in... bla bla bla) Edit: I have to admit I was wrong, I thought the photodiode (phototransistor/whatever it's called) was built in a way that got a signal from the tv or not dependning on the color (black or white), that was not right at all though.

Anyway, I had to test Duck Hunt out, and it was the other way around, the duck gets a "mask" (a big white square with the duck in the middle) and the bakground and everything else turns black, and it's easy to spot even if you don't record a movie of it or go frame by frame.

Your TV is shooting at your gun.
 
Back
Top