The secret of the NES Zapper

Thursday March 16, 2006 @ 07:33 PM (PST)

Ever since I first played Duck Hunt as a wee bairn, I've always wondered how that amazing light gun actually worked. I was a curious lad with a limitless interest in technology, and I remember annoying my friends by experimenting to try to figure out how different light sources affected the gun rather than playing the game properly. I figured the gun was somehow getting information from the screen to determine where it was pointed, and then feeding that information back to the NES, but I never worked out exactly how. It seemed to me that the graphics on the screen would be way too complex for the gun to process; even modern computers have trouble with that sort of thing.

For some reason I thought of this again recently, so I decided it was finally time to satisfy my curiosity. Luckily, Wikipedia has the answer:

When the trigger was pulled, the game blanked out the screen with a black background for one frame, then, for one additional frame, drew a solid white rectangle around the sprite the user was supposed to be shooting at. The photodiode at the back of the Zapper would detect these changes in intensity and send a signal to the NES to indicate whether it was over a lit pixel or not. A drop followed by a spike in intensity signaled a hit. Multiple sprites were supported by flashing a solid white rectangle around each potential sprite, one per frame.

Genius. If only I'd had the wondrous Intertron way back then.

Comments

Nice... I thought it was infrared or something, which (after reading this), wouldn't make any sense anyway.

Gravatar icon
Justin
Friday March 17, 2006 @ 09:48 AM (PST)

It took me a while to figure it out, but it came to me when I was driving down the street a couple years ago. I mean that's the only way it can be done. I didn't think of the part regarding the one frame of black but I did think of the white rectangle and photodiode. Go me.

Gravatar icon
Friday March 17, 2006 @ 02:50 PM (PST)

I have also wondered about this ever since Duck Hunt. Recently, I was moving my cousin and found a NES Zapper and it brought back all of my old questions, but laziness set in and I didn't look it up. Then, today, your blog brought me the answer via my feed-reader. Awesome.

Gravatar icon
Tuesday March 21, 2006 @ 08:43 PM (PST)

on duck hunt you can shoot 2 ducks do you think there difrent shades of white?

Gravatar icon
Tuesday November 21, 2006 @ 07:07 AM (PST)

1)show game action (background, moving enemies) 2)when trigger is pulled, turn screen black 3)make sure gun sees black (IE, no light) 4)light up area enemy#1 occupies---does gun see light? then it's pointing at that enemy 5)light up area enemy#2 occupies---does gun see light? then its pointing at that enemy.

enemies on screen limited by the resolution of the nintendo

Gravatar icon
Saturday October 13, 2007 @ 01:39 PM (PDT)

I’m giving a presentation about the NES Zapper for my Digital System Design class. (As a child, I too was marveled by it’s innovative ability to kill ducks.) I’ve already read the wiki article and was hoping to find more information on the actual digital logic behind sending the message to the NES. If anyone can enlighten me, please do! :)

Gravatar icon
Kate
Saturday April 26, 2008 @ 09:52 PM (PDT)
New comment

required, won't be displayed

optional

Don't type anything here unless you're an evil robot:


And especially don't type anything here:

Basic XHTML (including links) is allowed, just don't try anything fishy. Your comment will be auto-formatted unless you use your own <p> tags for formatting. You're also welcome to use Textile.

Copyright © 2002-2010 Ryan Grove. All rights reserved.
Powered by Thoth.