Mice on the 8-bit: ST, Amiga and PC Mouse Interfaces

Year
1991
Type
DIY project
Category
Pointing-device interface
Manufacturer
Homebrew designs (Thomas Richter / THOR; Tom Kirk) and software drivers
Related
MAC/65
Grey two-button Atari ST mouse with its cable and 9-pin plug

Overview

Atari never sold a mouse for its 8-bit line. Several were announced for it, including Zobian Controls' RAT and SuperRAT in 1985–87, but they apparently never shipped in quantity. The mouse that became the 8-bit standard was the Atari ST mouse (STM1, later PCM1). It plugs straight into a joystick port and works whenever the software knows how to read it. Hobbyists then built adapters for the mice they actually had: Amiga mice, and later PC serial mice.

Option 1: the ST mouse plus a software driver

An ST mouse outputs quadrature signals, two square waves per axis whose phase order gives the direction of movement. They appear on the same pins that carry the joystick switches, and the left button arrives on the trigger line. Nothing has to be built, but because the computer must sample the lines quickly enough to catch every step, a driver is required. Two examples:

  • MOS (Mouse Operating System), a German package written on a 130XE with MAC/65. It adds an M: handler to the OS so that even Atari BASIC programs can read the pointer through ordinary CIO calls. It supports any graphics mode, a pointer of any shape and colour, settable speed, and click-as-keypress, and it can chain your own VBI to its own. It occupies 2 KB and reinstalls after RESET. XIO 23 picks the port; the translator recommends always using port 1, so the joystick stays in port 0. The big catch: SIO can't be used while the mouse is active, so switch MOS off before disk or printer I/O.
  • TBMouse, the driver behind the drawing program TBM Draw. It lives in pages $B0–$BF (you lower the top of memory to $B0 first), uses player 3 as the pointer, and supports a joystick in port 1 and the mouse in port 2. It comes with improved PICLOADA picture loading and a P1029 printer dump.

Option 2: Amiga mouse via Thomas Richter's CMOS interface

Amiga mice also produce quadrature signals, but on a different pin layout from the Atari joystick port. Thomas Richter ("THOR") published a CMOS mouse interface for the Atari 800 family (© 1991/1997) for a standard Amiga mouse. It uses only CMOS logic:

Chip Role
CD4516B synchronous up/down counters accumulating X and Y movement
CD4030B quad XOR gates (glue logic for the quadrature signals)
CD4021B 8-bit parallel-load shift register, read serially through the joystick port

Instead of racing the mouse, the hardware counts movement itself. The driver, CMOSE for the MAC/65 assembler (supplied as tokenized source and as an ATASCII listing), runs in the vertical blank. It latches the counters, clocks the bits out of the shift register through PIA port A, and works out the distance moved since last time, with 16-bit position limits. Richter notes the CMOS parts are slow and the interface has a fairly high impedance, so the driver adds settling delays. The HELP key toggles the driver, and there are calls to enable, disable, permit and forbid it. The package documents the Amiga, joystick and chip pinouts. Richter warns that other mice may need minor changes.

Option 3: PC serial mouse via Tom Kirk's PIC converter

By the late 1990s ST mice were scarce, so in December 1998 Tom Kirk designed a PC-to-Atari mouse adapter. It turns a Microsoft-compatible serial PC mouse into an ST-style quadrature mouse.

  • IC1: MAX202 RS-232 transceiver. Its charge pump generates the ± voltages the PC mouse needs for power and signalling.
  • IC2: PIC16C84 microcontroller at 4 MHz. It decodes the mouse's 3-byte serial packets, accumulates 16-bit X/Y counts, and plays them back as XA/XB/YA/YB quadrature and left/right button outputs on port B.
  • Passives: two 22 pF capacitors, six 0.22 µF and one 4.7 µF capacitors, plus male and female DB-9 connectors. Kirk built the prototype on stripboard in a small box.

The source (pcstm010.asm) and Intel-hex object code are included. Kirk wrote it for the Atari mouse port, where it needs no software changes. On an 8-bit the output is the same as an ST mouse's, so it works with the ST-mouse drivers above.

Tips

  • An ST mouse or one of these adapters is the most compatible choice for 8-bit software that supports a mouse.
  • Check which port your program expects, since conventions vary.
  • Mind the power budget. The Amiga mouse pinout gives 125 mA at +5 V, all drawn from the joystick port's +5 V pin along with the interface.

Credits

  • Picture: The Atari ST mouse, the de facto standard mouse for the 8-bit. — Blake Patterson, Wikimedia Commons (CC BY 2.0)
  • Thomas Richter — CMOS mouse interface ReadMe, pin layouts and CMOSE driver source (1991/1997), Nir Dary collection — Thomas Richter, 1991
  • Thomas Richter — Pin-Layout (Amiga mouse, joystick, CD4021/4030/4516) — Thomas Richter
  • Thomas Richter — CMOSE mouse driver listing — Thomas Richter
  • Tom Kirk — PC->Atari Mouse Adapter readme (Dec 1998) — Tom Kirk, 1998
  • Tom Kirk — pcstm010.asm PIC16C84 source — Tom Kirk
  • MOS (Mouse Operating System) Anleitung (German) — Mouse Operating System
  • The 8 Bit Mouse Utility Manual (TBMouse / TBM Draw)
  • comp.sys.atari.8bit FAQ, section 6.8 (Michael Current, Feb 2026) — Michael Current (comp.sys.atari.8bit FAQ), 2026