Overview


This section lists the requirements for incorporating light gun support in titles development, and describes how the light gun works with cathode ray tube (CRT) displays.

Requirements

Requirements for incorporating light gun support in titles development include:

How a Light Gun Works

With CRT displays, the light gun reports the time lapse between the beginning of a field (vertical blank) and when the scan beam passes into the field of view of the gun's light sensor. Based on the timer values the light gun returns, positions are calculated from the time elapsed between the start of one scan line and the start of one immediately below it (YSCANTIME); x values (XSCANTIME) are determined by the time it takes to draw from the first to last pixel on one scan line. A third value, TIMEOFFSET, is based on the time lapse between when a field begins and when a scan beam begins drawing to the first pixel on the first scan line.

The NTSC and PAL standards require slightly different values for these time constants. This is to account for the different screen resolution and the speed at which the electron beam draws in the display. The time values are provided in the lightgun.h file.

The light gun does not work with PCs because of variation in refresh rates and electron beam gun speed among monitors.

The light gun does not work with LCD displays.

The illustration below shows the light gun and cable with male DB9 connector.

Graphic cannot be displayed

Figure 1: 3DO light gun controls.