O'Reilly logo

PC Hardware in a Nutshell, Second Edition by Barbara Fritchman Thompson, Robert Bruce Thompson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Gameport Interface

A standard PC gameport is actually a simple general-purpose analog data-acquisition port that supports four simple switched inputs and four variable-voltage inputs. A game controller connected to this interface uses one or more of the switched inputs to support buttons and one or more of the variable inputs to support a joystick, steering wheel, or similar device.

A paddle (originally used for Pong) is the simplest game controller. It uses only one switched input for a button and one variable input for a knob that controls movement in one direction. Accordingly, a gameport can support up to four paddles. A joystick uses one or two switched inputs for buttons and two variable inputs for a central stick that controls movement in both the horizontal (x-axis) and vertical (y-axis) directions. Accordingly, a gameport can support one or two joysticks. More complex game controllers use more of the switched inputs for additional buttons, and more of the variable inputs to control a third (z-axis) direction or for other purposes. This means that a gameport can support only one such controller.

Gameports do not require an IRQ, a DMA channel, or mapped memory, and occupy only one I/O base address. The downside of this small resource footprint is that gameports are not interrupt-driven, so the CPU must constantly poll the gameport to detect when a button is pressed or a stick is moved. Polling can require as much as 10% of the CPU, which degrades performance when you least ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required