Home-Computer Light Guns · Volume 5
BBC Micro, MSX, Apple II, Thomson and the Atari STE
The BBC's 6845 light-pen strobe on pin 9 of the analogue port and the arithmetic that turns its address into a position; MSX1 with no latch and MSX2's V9938 with one; the Apple II's pens on their own cards; the French computers that shipped with a pen; and Atari's last light-gun port

These machines share a chapter because each is a single case rather than a family of guns. Only one had a light gun that could be confirmed, the BBC Micro version of the Stack Light Rifle, and the MSX gun that existed ignored the MSX2’s latch. Each did have a light pen, and each pen shows a different answer to the question of where the beam’s position comes from.
5.1 BBC Micro: the strobe on pin 9
The BBC Micro used the Motorola 6845 CRT controller, as the Amstrad CPC did (Volume 4), and brought its light-pen strobe out on the 15-way analogue port that also carries the joystick inputs. Acorn’s own connector application note gives the port, viewed from outside:1
Table 1 — BBC Micro: the strobe on pin 9
| Pin | Signal | Pin | Signal |
|---|---|---|---|
| 1 | +5 V | 9 | light pen strobe |
| 2 | 0 V | 10 | digital switch input (I1) |
| 3 | 0 V | 11 | voltage reference (VREF) |
| 4 | CH3 | 12 | CH2 |
| 5 | analogue ground | 13 | digital switch input (I0) |
| 6 | 0 V | 14 | voltage reference (VREF) |
| 7 | CH1 | 15 | CH0 |
| 8 | analogue ground |
The Advanced User Guide for the BBC Micro (Bray, Dickens and Holmes, 1983) is the programmer’s reference.2 It explains that “This LPSTB (light pen strobe) signal can be decoded (because the screen is scanned on a raster basis) and the position of the pen head determined”, and it sets the pen’s electrical requirement: “The light pen hardware must produce a positive going TTL pulse whenever the display scan position is under the sensor.” It even names a part: “A special photosensor called a ‘Sweet spot’ is available from R S Components … part number RS 303-292”, which gives a TTL output directly. Its figure 18.4 shows the sensor wired to the analogue port’s +5 V, 0 V and LPSTB pins.
A polarity conflict. Acorn’s application note names pin 9 “notLPSTB”, which reads as active low. The Advanced User Guide asks for a positive-going pulse, Motorola’s AN-851 says the 6845 acts on “the low-to-high transition of the light pen strobe (LPSTB) input”,3 and the R.H. Electronics pen manual says its position is latched “On the rising edge” of the pen’s pulse.4 Three sources agree on a rising edge at the chip; whether the BBC inverts the signal between port and chip was not established. A builder should scope a known pen before trusting either label.
The operating system offers no help. The AUG: “The light pen interrupt is not used by the operating system, as it has no software to support the light pen. This interrupt is always passed over to the user.” Every BBC pen came with its own driver.
5.2 Turning a 6845 address into a position
The 6845 latches the display memory address at the moment of the strobe, not a horizontal and vertical count. AN-851: the light-pen registers R16 and R17 “will receive the current address appearing on the CRT control address lines following the recognition of the low-to-high transition of the light pen strobe (LPSTB) input. Once the LPSTB low-to-high transition is recognized, the next low-to-high CRTC clock transition latches the address information”.3 The AUG describes the result as a “14 bit read only register … modified whenever the LPSTB signal is pulsed high”, and draws the consequence: “The position of the light pen is stored to the nearest character position, so this limits the resolution to a character cell.”2
To get a screen cell, a program subtracts a correction from the address and divides by the number of characters per line. The AUG gives the formulas and the corrections, which fold in each mode’s screen start address and the pen’s delay:
y = (L.p register—correction) DIV number of characters per line x = (L.p register—correction) MOD number of characters per line

Table 2 — Turning a 6845 address into a position
| Mode | AUG correction |
|---|---|
| 0, 1, 2 | &0606 (1542) |
| 3 | &0806 (2054) |
| 4, 5 | &0B04 (2820) |
| 6 | &0C04 (3076) |
| 7 | &2808 (10248) |
The guide adds that the x value “will be in terms of 6845 characters” and must be scaled to the mode’s pixels, and that “slow light pen response will require a delay factor to be subtracted from R16,R17 to produce the correct light pen position”. The same arithmetic, with the CPC’s own screen start, applies on the Amstrad.
For a gun this resolution is coarse. A character cell on the BBC is eight scan lines tall in most modes, so a 6845 gun knows its vertical aim only to the nearest cell unless the program refines it, for example by drawing the target in stages.
There was at least one BBC gun. The MAME emulator implements four analogue-port devices for the BBC Micro: the Datapen light pen, the Robin Educational Light Pen, the Stack Light Pen and the Stack Light Rifle (BBC Micro), the same Stack rifle sold for the Spectrum, C64 and VIC-20 (Volume 4).5 MAME’s author adds a caution that applies to every pen in this section: “All lightpen behaviour is derived from the software provided with each pen. Analysis of actual pens is required to confirm button polarity, when the strobe is active, and whether light intensity is captured by ADVAL.”
5.3 A BBC pen: R.H. Electronics
The R.H. Electronics Sales Ltd light pen is documented by its own manual and photographed on Wikimedia Commons. It plugged into the analogue port (“SIMPLE TO INSTALL Just plug into Analogue connector”) through a small interface box, and its manual is the most candid account of the 6845’s latch found for this dive:4
The Pen generates a video strobe pulse (VSP) corresponding to its’ position on the screen (providing there are illuminated pixels at that location). On the rising edge of the VSP the current character address +2 is latched into the Light Pen register of the 6845 CRTC … Due to the internal architecture of the 6845 there is a period (7% of system time, at the most) during the change of character address, when erroneous data may be latched into the Light Pen register. This is a characteristic of the CRTC in the micro, not of the R.H. Light Pen. As the clock for the data latched into the Light Pen register is the character clock, the maximum definition of the Pen is limited to one character position.
Its features list includes “SOFTWARE CONTROL, via 6 bit control word, of the operational mode of Pen hardware”, a push-tip switch, a status LED, and a “NARROW FIELD OF VIEW due to light guide optics”. The introduction also gives the history in a sentence: “The early Light Pens were designed to work with special displays, optimised for the purpose (vector rather than raster scan displays, sometimes doped with infra-red phosphors).” The random-scan pens of Volume 1 are the ones meant.
5.4 MSX: no latch on MSX1, a latch on MSX2
The first MSX standard used the Texas Instruments TMS9918 family of video chips, which has no light-pen latch. The standard still reserved room for a pen: Sony’s MSX Technical Handbook lists in its I/O map “Light Pen (Sanyo) B8H through BBH”, ports set aside for Sanyo’s pen interface.6 On an MSX1 the pen’s position comes from that interface, not from the video chip.
MSX2 changed video chip, to Yamaha’s V9938, and the V9938 has a light-pen mode. Yamaha’s 1985 data book lists “Interfaces for mouse and light pen” among its features and gives the procedure:7
- To use the light pen, “set bit 7 of register R#8 to 0 and bit 6 to 1” (mouse disabled, light pen enabled).
- For an interrupt when the pen sees light, “set bit 5 of register R#0 to 1. This interrupt is reset if status register S#1 is read.”
- Status register S#1 carries FL, the “Lightpen flag”, and LPS, “Lightpen switch … The lightpen switch was pressed.”
- “The coordinates at which the light pen detected light will be set in status registers S#3 to S#6. The data set in these registers are correct as long as status register S#5 is not read.” S#3 and S#4 hold the column, X0 to X8; S#5 and S#6 the row, Y0 to Y9.
Unlike the 6845, the V9938 returns a true column and row, and unlike the VIC-II it has a flag that says whether the pen fired. How each MSX2 maker brought the V9938’s pen pins out to a connector was not found.
The MSX’s light gun was the Spanish Gun Stick, sold for the MSX as well as the Spectrum and the Amstrad.8 On the machines whose wiring is documented it polls its sensor on a joystick line rather than using any latch (Volume 3), so it would not have needed the V9938’s.
5.5 Apple II: the pen brings its own interface
The Apple II’s video is generated by discrete logic, and no light-pen latch is documented for it, so pens for it brought their own interface. The Computer History Museum’s example is the LPS II light pen made by Gibson Laboratories in 1982, with the caption “Light pens were available for personal computers such as the Apple II.”9 The museum records no internals. A slot card with its own counters, or a pen read in software by Peck’s method of 1981 (Volume 1), are the two ways such a pen can work; which the LPS II used was not found. A forum post suggests that some Apple II pens instead used the 6845 on an 80-column card such as the Videx Videoterm; that is unconfirmed.
The Apple II has one notable place in light-gun history: Ralph Baer’s 1979 precision target-shooting rifle ran on an Apple II modified for interlace and gen-locked to videotape. That story is told in History of Light Guns, Volume 2.
5.6 Thomson: the computer with a pen in a drawer
France’s Thomson computers, bought in large numbers for French schools, are the one family here for which the pen was not an accessory. The Computer History Museum describes the TO7/70: it “included a built-in lightpen stored in a drawer above its keyboard, sound and a 16-color display capability.”10

French heritage catalogues add that the pen fitted the TO7 and TO9 and could be adapted to the MO5, and that the TO9+ pen lacked a switch; those details were read only in a search summary and are not confirmed here. How the Thomson video circuit derived the pen’s position was not researched for this dive, and no Thomson light gun was found.
5.7 Atari STE: a light-gun port by name
Atari’s 1989 STE, an upgraded ST, is the last machine in this dive and the only one whose maker named a port for a light gun. The STE Developer Addendum lists among the new features “Light gun, paddle and new joystick ports”, and explains: “The STE also has two new controller ports that allow for new joysticks as well as a light gun and paddle controllers.”11
A light gun or pen can be plugged into Joystick 0. The current position that the gun or pen is pointing to is reported by these registers.
Table 3 — Atari STE: a light-gun port by name
| Item | STE Developer Addendum |
|---|---|
| Registers | $FF9220 (X position), $FF9222 (Y position) |
| Horizontal accuracy | 4 pixels in 320×200, 8 pixels in 640×200, 16 pixels in 640×400 |
| Vertical accuracy | ”Accurate to 1 pixel in the Y direction in all modes” |
| Units | ”the X position is given in pixels for 320x200 only”; shift left one bit for 640×200, two for 640×400 |
| Caveat | ”Accuracies do not account for the quality of the light gun or pen” |
The addendum does not give the pin of the new port that carries the gun’s signal, and the STE’s guns and games were not researched for this dive.
5.8 What could not be verified
- The BBC strobe’s polarity at the port. Acorn’s note says active low; the AUG, Motorola and R.H. Electronics say a rising edge.
- The BBC Stack Light Rifle’s wiring and games. Its existence rests on the MAME source; no manual or review was read.
- How MSX2 makers wired the V9938’s pen pins, and the Sanyo MSX1 pen interface’s design.
- How the Gibson LPS II and other Apple II pens found their position.
- The Thomson pen’s internals and connector, beyond the CHM caption.
- The STE’s light-gun pin and its games.
Sources
Footnotes
-
Acorn Computers, Support Group Application Note No. 238, connector pinouts for the Electron, BBC B, B+, Master 128 and Master Compact, 2 August 1993, https://chrisacorns.computinghistory.org.uk/docs/Acorn/AN/238.pdf, read 2026-10-19. ↩
-
A. C. Bray, A. C. Dickens and M. A. Holmes, The Advanced User Guide for the BBC Micro, Cambridge Microcomputer Centre, 1983, section 18.9 “Light Pens” and the System VIA interrupt notes, https://archive.org/details/manualcomputergame-bbc-cambridgemicrocomputercentre-theadvanceduserguideforthebbcmicro-1983-c048, read 2026-10-19. ↩ ↩2
-
Motorola, Application Note AN-851, “MC6845 CRTC Simplifies Video Display Controllers”, https://archive.org/details/bitsavers_motorolaapaMC6845CRTCSimplifiesVideoDisplayControl_9722748, read 2026-10-19. ↩ ↩2
-
R.H. Electronics Sales Ltd, Light Pen user manual for the BBC Microcomputer, https://chrisacorns.computinghistory.org.uk/docs/RHE/RHE_LightPenUM.pdf, read 2026-10-19. Undated. ↩ ↩2
-
MAME source,
src/devices/bus/bbc/analogue/lightpen.cpp(Nigel Barnes; BSD-3-Clause), header comment and device list, https://github.com/mamedev/mame/blob/master/src/devices/bus/bbc/analogue/lightpen.cpp, read 2026-10-19. ↩ -
Sony, MSX Technical Handbook, section 1.7.8, I/O address assignments, https://archive.org/details/MSXTechnicalHandbookBySony, read 2026-10-19. ↩
-
Yamaha, V9938 MSX-Video Technical Data Book, August 1985, features list, status register S#1, and “Pointing Devices: 1. Light pen”, https://archive.org/details/bitsavers_yamahaYamanicalDataBookAug85_6932685, read 2026-10-19. ↩
-
Spectrum Computing (ZXDB) entry 1000525, “Gun Stick”, https://spectrumcomputing.co.uk/entry/1000525/Hardware/Gun_Stick, read 2026-10-19. ↩
-
Computer History Museum, Revolution exhibit, “LPS II light pen”, Gibson Laboratories, 1982, https://www.computerhistory.org/revolution/input-output/14/352/1846, and catalogue 102647176, read 2026-10-19. ↩
-
Computer History Museum, Revolution exhibit, “Thomson TO7 micro computer”, https://www.computerhistory.org/revolution/personal-computers/17/298/1171, read 2026-10-19. ↩
-
Atari Corporation, STE Developer Addendum, 25 May 1989, introduction and “Light Gun / Pen”, https://archive.org/details/STE_Developer_Addendum_May_25_1989, read 2026-10-19. ↩
Comments (0)