Home-Computer Light Guns · Volume 1

The Light Pen — From SAGE to the Home Computer

Why a pen on a 1950s air-defence console needed no position hardware, why a pen on a television did, and why the home computers that built that hardware into their video chips had light guns before most consoles

Figure 1 — The SAGE weapons director console of 1958 with its light gun resting on the shelf below the round yellow-phosphor display. The operator pointed the gun at a radar track on the screen and pulled the…
Figure 1 — The SAGE weapons director console of 1958 with its light gun resting on the shelf below the round yellow-phosphor display. The operator pointed the gun at a radar track on the screen and pulled the trigger to tell the computer which target to act on. Photo: Tomwsulcer, Computer History Museum exhibit, Wikimedia Commons, CC0.

1.1 What this dive covers

A light gun for a home computer is a light pen with a lens on the front and a trigger underneath. That sentence is the whole of this dive’s argument, and the six volumes are the evidence for it, machine by machine: which connector pin carried the pen’s signal, which chip froze the beam’s position when it arrived, how a program read the result, which games used it, and which guns were sold.

The neighbours divide the subject. The narrative history of light guns, from the 1930s shooting galleries to the present, is in History of Light Guns; its Volume 3 sets out the two schools of 8-bit gun, the Zapper’s “decide in software” and the light pen’s “decide in silicon”, and mentions the home computers in passing. This dive is the port-level detail behind that passing mention. Console guns, including the identification table for Atari’s XG-1 as a console accessory, are in Console Light Guns, and arcade cabinets have their own dive, Arcade Light Guns. The circuits of the sensor chain, redrawn for a modern build, belong to CRT Timing.

Table 1 — What this dive covers

VolCovers
1The light pen from SAGE to the home computer; every machine on one page
2Atari 400/800, XL, XE and the XE Game System: ANTIC, the CX75 pen, the XG-1 as a computer peripheral
3Commodore: PET, VIC-20, C64 and C128, Amiga; the C64’s guns and games
4Sinclair and Amstrad: the Spectrum’s latchless guns, the CPC’s 6845, the Plus range and GX4000
5BBC Micro, MSX, Apple II, Thomson and the Atari STE
6Side by side, and using one today: pinouts, latch formats, calibration, emulation, testing

Pin assignments in this dive come from the machine maker’s own manual or the chip maker’s datasheet, quoted with the source. Where the only evidence for a gun’s wiring is a magazine article, an emulator’s source code or a collector wiki, the text says so.

1.2 The pen on a random-scan screen

The light pen is older than the raster display it later had to be adapted to. The Whirlwind computer at MIT, operational in 1951, displayed radar tracking data on large cathode-ray tubes, and the Computer History Museum’s account of it describes “a pointing device they called a Light Gun for selecting targets on the screen”.1 The same account explains the device’s limit in one line: “The Light Gun can only detect spots on the screen that are lit”. Whirlwind became the prototype for the US Air Force’s SAGE air-defence system, and the IBM weapons director console made for SAGE in 1958, now in the same museum, is catalogued “With Light Gun”: a pistol grip on a cable, resting on a shelf below the display.2

Figure 2 — The SAGE light gun close up, on the shelf of the weapons director console at the Computer History Museum. It is a pistol grip with a short tube for a barrel and a cable out of the butt; the operato…
Figure 2 — The SAGE light gun close up, on the shelf of the weapons director console at the Computer History Museum. It is a pistol grip with a short tube for a barrel and a cable out of the butt; the operator held it against the face of the display. Photo: ArnoldReinhold, Wikimedia Commons, CC BY 4.0.

These were not raster displays. Whirlwind’s and SAGE’s screens, like the TX-2’s at MIT’s Lincoln Laboratory and the IBM 2250 that followed in the 1960s, drew spots and strokes one at a time, in whatever order the program chose: a random-scan or point-plot display. On such a screen the computer already knows the position of every spot, because it has just put it there. All the pen has to report is “I saw that one”.

Ivan Sutherland’s 1963 thesis describing Sketchpad, the drawing program he wrote for the TX-2, gives the clearest contemporary account of how that worked.3 “The light pen is a hand held photocell which will report to the computer whenever a spot on the display system falls within its small field of view.” His pen held “a photodiode and transistor preamplifier mounted in the pen housing and connected to the computer by a length of small coaxial cable”, and it had a shutter button on the barrel. On timing:

Since spots on the display system are intensified one after another in time sequence, whether or not each spot is seen by the pen is individually reported just after intensification of that spot. The light pen amplifier is designed so that the pen is sensitive only to the bright blue flash of the first intensification of a display spot and not to the dim yellow afterglow. The amplifier output is strobed only when a display spot has been intensified to minimize room light pickup.

Three ideas in that paragraph return in every home-computer gun of the 1980s. The sensor must respond to the fast rise of freshly excited phosphor, not to its afterglow; the output is meaningful only at a known moment; and gating it to that moment is what rejects room light. Sutherland also noted that “some computers require an interrogation of a pen flip-flop to find out if a spot was seen”, while the TX-2 used an interrupt. To track a moving pen, Sketchpad drew a small cross around it about 100 times a second and watched which arms the pen saw; at his fastest hand speed “the maximum pen speed is thus 20 inches per second”.

Figure 3 — The Sketchpad light pen, Figure 4.1 of Sutherland's 1963 thesis: a pen-sized barrel on a coaxial cable, with a shutter button and a focus scale near the tip. Photo: Ivan Sutherland, courtesy MIT El…
Figure 3 — The Sketchpad light pen, Figure 4.1 of Sutherland's 1963 thesis: a pen-sized barrel on a coaxial cable, with a shutter button and a focus scale near the tip. Photo: Ivan Sutherland, courtesy MIT Electronic Systems Laboratory; scan by Kerry Rodden, Wikimedia Commons, CC BY-SA 3.0.
Figure 4 — 2 of the same thesis, the construction of the pen: lens and field of view at the screen end, a shutter, the photodiode, a transistor preamplifier, a connector and the coaxial cable. Every …
Figure 4 — 2 of the same thesis, the construction of the pen: lens and field of view at the screen end, a shutter, the photodiode, a transistor preamplifier, a connector and the coaxial cable. Every home-computer gun has the same chain, with a longer lens. Drawing courtesy MIT Electronic Systems Laboratory; scan by Kerry Rodden, Wikimedia Commons, CC BY-SA 3.0.

The tracking cross is the Nintendo Zapper’s method, two decades early. The Zapper’s game draws a white box where each target is and asks the gun whether it sees light (History of Light Guns, Volume 3); Sketchpad drew a cross and asked the pen which arms it saw. Both work because the program knows what it has just drawn.

By the early 1960s, Sutherland wrote, “display systems and light pens were relatively common”. Commercial graphics terminals of the next decade kept them.

Figure 5 — A light pen in use at an IBM 2250 graphics console, Brown University Hypertext Editing System, October 1969. The pen is held against the face of the vector display, pointing at a line of text. Phot…
Figure 5 — A light pen in use at an IBM 2250 graphics console, Brown University Hypertext Editing System, October 1969. The pen is held against the face of the vector display, pointing at a line of text. Photo: Gregory Lloyd, Wikimedia Commons, CC BY-SA 4.0.
Figure 6 — The light pen of a DEC PDP-1 display, on the console desk at the Computer History Museum: a metal pen body on a coiled cable. Photo: ArnoldReinhold, Wikimedia Commons, CC BY 4.0.
Figure 6 — The light pen of a DEC PDP-1 display, on the console desk at the Computer History Museum: a metal pen body on a coiled cable. Photo: ArnoldReinhold, Wikimedia Commons, CC BY 4.0.

1.3 The raster problem, and the latch that solved it

A home computer of 1979 drove a domestic television. A television is a raster display: every frame, the beam draws every line, left to right and top to bottom, whatever the program wants. The program no longer chooses the order of the spots, so “I saw that one” no longer identifies anything. The pen’s pulse says only that the beam has just passed under the tip, and the position must be worked out from when.

Figure 7 — Own-work diagram: on a random-scan display (left) the program knows which spot it has just drawn, so a pen pulse needs no position hardware; on a raster display (right) every frame draws every line…
Figure 7 — Own-work diagram: on a random-scan display (left) the program knows which spot it has just drawn, so a pen pulse needs no position hardware; on a raster display (right) every frame draws every line, so the video chip must freeze its own horizontal and line counters at the moment the pen's pulse arrives. Sources: Sutherland 1963; Atari 400/800 Hardware Manual 1980; Commodore 64 Programmer's Reference Guide 1983.

The home computers’ answer was to put a latch in the video chip. The chip already counts the beam’s position, horizontally in clock cycles and vertically in lines, because it needs those counts to fetch and draw the picture. A pen input that freezes those counters into a readable register costs a handful of gates. Atari’s ANTIC had one in 1979; so did Commodore’s VIC and VIC-II, the Motorola 6845 CRT controller used by the BBC Micro and the Amstrad CPC, Yamaha’s V9938 in the MSX2, and the Amiga’s custom chips. Atari’s 1980 hardware manual states the whole mechanism in two sentences: “When any one of the joystick trigger lines (pin 6) is pulled low, the ANTIC chip takes the current VCOUNT value and stores it in PENV. The horizontal color clock value (0-227 decimal) is stored in PENH.”4

The same manual then lists the practical problems that every pen and gun in this dive inherits:

Since there are a number of delays involved in displaying the data and changing the light pen register, each system must be calibrated. Software which uses the light pen should contain a user-interactive calibration routine. … The pen will not work if it is pointed at a black area of the screen, since the electron beam is turned off. It is a good idea to read two (or more) values and average them, since the user will probably not hold the pen perfectly steady.

Calibration, dark targets and averaging: a light gun has all three problems, worse, because it is held across the room. Those are the subjects of Volume 6.

Because the latch was in the video chip, a light gun was a cheap accessory for any computer that had one. The gun needed no counter, no clock and no knowledge of the video timing: only a photodiode, an amplifier fast enough to produce a clean edge, a trigger switch, and a plug that put the edge on the right pin. History of Light Guns, Volume 3 calls this the “decide in silicon” school, and it is why the home computers had light guns before most consoles did.

1.4 A pen with no latch: the software scan

Not every machine had the latch, and pens were sold for those that did not. In March 1981 COMPUTE! printed Robert A. Peck’s “Basics of Light Pen Operation”, written for any 6502 computer with “a single bit input port”.5 Peck set aside a hardware latch (“A set of three 74175’s could be used here”) as too complex and used software instead:

Instead of using a hardware-based scan technique, we will use a software based scan as follows.

The program blanks one region of the screen at a time and watches the pen input for “about 1/60 or 1/30 second”. If the pulses stop while a region is dark, the pen is pointing at it. Peck also filtered room light by counting transitions: unless more than one and fewer than 50 occurred in one scan, he treated the input as stray light. It is the random-scan method again, applied to a raster: the program makes the screen tell it something by changing what is drawn, then asks the pen.

The same split runs through the guns. The ZX Spectrum had no latch, and its guns either timed the pulse in software or flashed targets in turn, as the Zapper does (Volume 4). The Spanish Gun Stick went further: it put its light sensor on a joystick direction line, not on the latch pin, so the same gun could work on machines with a latch and machines without one.

1.5 From pen to gun

A pen touches the glass and sees a few millimetres of phosphor. A gun is held a metre or more away and must see a small patch of screen through a lens, which brings less light to the sensor and adds the problem of aim. Atari’s XE Game System manual of 1987 recommended “three to five feet from your video display screen” and advised turning up brightness and contrast “to ensure the light gun’s effectiveness”.6 The Magnum Light Phaser’s manual gave 2 to 4 feet.7

What else changes is the trigger. A pen’s button, or the pressure switch in its tip, tells the program that the user means it. A gun’s trigger does the same job, and on most home-computer guns it went to a second pin of the same connector. Which pin varied from gun to gun, and that, more than anything, is why one maker’s gun so often failed with another maker’s games. The details are in each machine’s volume and side by side in Volume 6.

Figure 8 — The Stack Light Rifle for the ZX Spectrum, C64 and VIC-20, as a 1984 part-work photographed it: a chromed pistol with a clip-on scope, barrel extension and wooden stock. The inset shows the pistol …
Figure 8 — The Stack Light Rifle for the ZX Spectrum, C64 and VIC-20, as a 1984 part-work photographed it: a chromed pistol with a clip-on scope, barrel extension and wooden stock. The inset shows the pistol opened, labelled photo-sensitive cell, signal amplifier, trigger and trigger switch. Photo: magazine scan via World of Spectrum, Hardware Feature 8.

The inside of the Stack Light Rifle shows the whole of a 1983-vintage home-computer gun: a “photo-sensitive cell” at the back of the barrel with “a small plastic lens” in front of it, a “signal amplifier” board and a trigger switch.8 On the Spectrum, which had no latch, Stack put “two chips and a couple of simple components” in the connector.

1.6 The machines on one page

Table 2 — The machines on one page

MachineWhere the pen or gun plugs inLineLatching chip and registersPensGunsVol
Atari 400, 800, XL, XE, XEGSAny controller jack (DE-9)Pin 6, “Trigger Input”ANTIC: PENH $D40C, PENV $D40D; OS shadows LPENH 564, LPENV 565CX70; CX75 with AtariGraphicsXG-12
Commodore VIC-20Game port (DE-9); also user port pin 7Pin 6, “LIGHT PEN”VIC 6560/6561: $9006 (X), $9007 (Y)Several third-partyStack Light Rifle3
Commodore 64, C128Control port 1 onlyPin 6, “BUTTON A/LP”VIC-II: LPX $D013, LPY $D014Inkwell, Datel and othersStack, Magnum, Defender 64, Trojan, Gun Stick, XG-13
Commodore PETNo pen input found in its documentation——Not confirmed—3
AmigaPort 1 on the A1000; port 2 by default on the A500, A2000, A3000Pin 6, “Beam Trigger”VPOSR $DFF004, VHPOSR $DFF006 when BPLCON0 bit 3 is setYesTrojan Phazer (secondary sources)3
ZX Spectrum 48KMIC socket, or a joystick interface— (no latch)None: software timing or flashed targets—Stack, Magnum, Defender, Gun Stick4
Spectrum 128, +2, +3Keypad/AUX socket, or joystick port— (no latch)None—Magnum, Defender, Gun Stick4
Amstrad CPC 464, 664, 6128Expansion connectorPin 47, “L.PEN”6845 CRTC: R16, R17 (a memory address)LP-1Magnum, Gun Stick4
Amstrad CPC Plus, GX40006-pin AUX socketNot confirmedCRTC light-pen input (CPCWiki)—Trojan Phazer4
BBC MicroAnalogue port (DA-15)Pin 9, light pen strobe6845 CRTC: R16, R17R.H. Electronics, Datapen, Robin, StackStack Light Rifle (BBC version, per MAME)5
MSX1Maker-specific (I/O B8–BBh reserved)—TMS9918 has no latchSanyoGun Stick (software method)5
MSX2Maker-specificV9938 light-pen inputV9938 S#3–S#6Yes—5
Apple IIIts own interface card—None in the Apple IIGibson LPS II and others—5
Thomson TO7, TO7/70, MO5Its own pen socket; the TO7/70’s pen lives in a drawer in the case—Not researchedSupplied with the machine—5
Atari STE”Joystick 0”, one of its two new portsNot given in Atari’s addendum$FF9220 (X), $FF9222 (Y)YesYes (addendum)5

A pattern stands out. Every DE-9 machine with a latch put the pen on pin 6, the joystick fire line: Atari, both Commodore 8-bits and the Amiga. No document found calls this a standard. Commodore’s ports follow the Atari joystick pinout, on which pin 6 is the fire button, already the one line meant for a momentary input, and the Amiga kept the arrangement. The two 6845 machines, the BBC Micro and the CPC, took the strobe out on a different connector altogether, and the Spectrum, MSX1 and Apple II had no latch to connect to.

Figure 9 — Own-work diagram of where the pen line comes out on each machine: pin 6 of the Atari and Commodore DE-9 ports and of the Amiga port; pin 9 of the BBC Micro's analogue port; pin 47 of the Amstrad CP…
Figure 9 — Own-work diagram of where the pen line comes out on each machine: pin 6 of the Atari and Commodore DE-9 ports and of the Amiga port; pin 9 of the BBC Micro's analogue port; pin 47 of the Amstrad CPC expansion connector; and the machines with no latch, whose guns plug into a sound-chip port, a tape socket or a joystick interface. Pin numbers as printed in each maker's manual. Sources listed on the figure.

1.7 Forty years in one picture

Figure 10 — Own-work timeline of light pens and guns on computers, from the 1958 SAGE console to the 1990 GX4000 and its Trojan Phazer, with the dated documents that record each step: Sutherland's 1963 thesis,…
Figure 10 — Own-work timeline of light pens and guns on computers, from the 1958 SAGE console to the 1990 GX4000 and its Trojan Phazer, with the dated documents that record each step: Sutherland's 1963 thesis, Atari's 1980 hardware manual, the 1983 Commodore programmer's guides, the 1985 V9938 data book, the 1987 XE Game System, the 1988 Gun Stick and the guns of 1989. Years are those of the documents cited in the text.

1.8 What could not be verified

  • The date of Whirlwind’s light gun and who built it. It is attributed to the Whirlwind team, sometimes to Robert Everett by name, in secondary sources; no Whirlwind report naming it was read for this dive.
  • Whether the SAGE gun’s sensor was a photomultiplier or a photodiode, and how the console gated its output. The museum records describe the console, not the gun’s internals.
  • The PET entry in the table. No light pen for the PET, and no pen input on any PET connector, was found in a primary source; the absence is reported, not proven.
  • The Amiga Trojan Phazer, the Atari STE guns and the GX4000 AUX pinout rest on collector and emulator sources; see each machine’s volume.

Sources

Footnotes

  1. Guy Fedorkow, “Gambling on Whirlwind: How the US Navy Spent $3 Million+ and Got a Computer Game”, Computer History Museum blog, 22 October 2019, https://computerhistory.org/?p=12879, read 2026-10-19. ↩

  2. Computer History Museum catalogue X263.83, “SAGE Weapons Director Console - With Light Gun”, IBM, 1958 (made); “This console was the user interface to the SAGE (Semi- Automatic Ground Environment) computer system known as the “FSQ-7."" Gift of the National Museum of Science and Technology, Ottawa. https://www.computerhistory.org/collections/catalog/X263.83, read 2026-10-19. ↩

  3. Ivan E. Sutherland, Sketchpad: A man-machine graphical communication system, PhD thesis, MIT, January 1963; republished as University of Cambridge Computer Laboratory Technical Report UCAM-CL-TR-574, 2003, chapter IV “Light Pen”, https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-574.pdf, read 2026-10-19. ↩

  4. Atari, Inc., Atari 400/800 Computer System Hardware Manual, November 1980, section “Light Pen” and register descriptions PENH and PENV, https://archive.org/details/Atari400800HardwareManualNovember1980, read 2026-10-19. ↩

  5. Robert A. Peck, “Basics of Light Pen Operation”, COMPUTE! No. 10, March 1981, p. 36, https://www.atarimagazines.com/compute/issue10/018_1_BASICS_OF_LIGHT_PEN_OPERATION.php, read 2026-10-19. ↩

  6. Atari Corporation, XE Game System owner’s manual, 1987 (C033514-0A1), “Light Gun”, https://archive.org/details/atari-xegs, read 2026-10-19. ↩

  7. Magnum Light Phaser instructions (Sinclair Action Pack), distributed by Virgin Mastertronic, transcription at https://spectrumcomputing.co.uk/pub/sinclair/hardware-info/m/MagnumLightPhaser_Manual.txt, read 2026-10-19. ↩

  8. World of Spectrum, Hardware Feature 8, “Stack Light Rifle”, quoting Sinclair User, May 1984, and Home Computer Advanced Course, 1984, https://worldofspectrum.org/hardware/feat8.html, read 2026-10-19. ↩

Comments (0)

  1. Loading…

Comments are held for moderation — nothing appears until approved.