This gun primarily just consists of a button (the trigger) and a photodiode (light sensor). When you pull the trigger, this causes the game to make the TV screen go completely black for one frame. At this point, the game uses the light sensor to sample the black color it’s reading from your TV to give it a reference point; this is essential given that the ambient light in a particular room and other things of this nature can vary greatly. In the next frame, the game causes the target area to turn white, with the rest remaining black. If the game detects a shift from black to white from the gun’s photodiode in that split second, it knows you were aiming correctly at the target and so doesn’t specifically need to know anything about where on the screen the target is.