Newsgroups: comp.sys.apple2 Path: blue.weeg.uiowa.edu!news.uiowa.edu!hobbes.physics.uiowa.edu!math.ohio-state.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!lll-winken.llnl.gov!decwrl!pa.dec.com!acme.freenet.columbus.oh.us!dalloff From: dalloff@freenet.columbus.oh.us (Dave Althoff) Subject: Dave's Guide to the Apple ][ Paddle Port Message-ID: Date: Tue, 5 Jul 1994 23:33:34 -0400 (EDT) X-Received: by usenet.pa.dec.com; id AA27277; Tue, 5 Jul 94 21:14:59 -0700 X-Received: by pobox1.pa.dec.com; id AA14271; Tue, 5 Jul 94 21:14:54 -0700 X-Received: from acme.freenet.columbus.oh.us by inet-gw-1.pa.dec.com (5.65/27May94) id AA23399; Tue, 5 Jul 94 21:09:47 -0700 X-Received: by acme.freenet.columbus.oh.us (8.6.7/5.901231) id AAA01090; Wed, 6 Jul 1994 00:08:27 -0400 X-To: Brian Tao , comp.sys.apple2.usenet@decwrl.dec.com X-In-Reply-To: X-Mime-Version: 1.0 X-Content-Type: TEXT/PLAIN; charset=US-ASCII Lines: 107 Brian: As per our earlier brief discussion, I thought you might like a copy of this... Everyone else, especially the individual who asked about the Apple 16-pin game port: Every Apple ][ is wired with some sort of game port. For ]['s and ][+'s, this is a 16-pin port on the motherboard near the video and cassette ports. In the ][e (enhanced or otherwise), the 16-pin game port is in roughly the same location as on the earlier ]['s, but is joined by a 9-pin port on the back panel. The ][c has the 9-pin port, but lacks the 16-pin model. And, like the ][e, the IIgs has both a 9-pin rear-panel game port, and a 16-pin port located near the center of the motherboard. To the best of my knowledge, the ports are wired the same on all Apple ][ models, with the possible exception of the ][c. The ][c game port supposedly can be read as a mouse port with the proper software. The game-port-mode pinouts match those for the 9-pin ports on the ][e and IIgs. TRIVIA NOTE: The earliest Apple ]['s were shipped with a set of paddles as included accessories. And they were necessary to play 'Little Brick Out'. I. The 16-pin game port The following signals are available on the Apple ][ game port-- o Game control inputs for paddles 0-3 o Binary (pushbutton) inputs for paddles 0-2 o A utility strobe output o Four software-controlled binary outputs o Power and ground lines The pinouts are as follows: Ground....................8 9.................No connection Game Control 2 [PDL(2)]...7 10......Game Control 1 [PDL(1)] Game Control 0 [PDL(0)]...6 11......Game Control 3 [PDL(3)] Utility Strobe............5 12................Annunciator 3 Pushbutton 2..............4 13................Annunciator 2 Pushbutton 1..............3 14................Annunciator 1 Pushbutton 0..............2 15................Annunciator 0 +5v Power.................1 16................No connection The paddle inputs are read by a counting loop in the computer, which waits for an internal capacitor to discharge to sense the paddle position. For the most part this information is unimportant, except to point out that reading the paddle port takes some time. The paddle input should be a 150-ohm variable resistor connected between +5v and the paddle input pin; low resistance gives low paddle readings, high resistance gives high readings. The pushbuttons are simple contact-closures between +5v and the pushbutton input. When the contact is made, the value of the associated memory location will become greater than $80 (128), as follows... (apologies for using negative decimal; my present reference doesn't show the hex values...) -16287: Pushbutton 0 -16286: Pushbutton 1 -16285: Pushbutton 2 Note that on some ]['s and ][+'s, there is a single wire running from the SHIFT key to the pushbutton #2 input. Some software uses the Button #2 input to sense a SHIFT on the uppercase-only keyboards. Note also that on the ][e, ][c, and IIgs, buttons 0 and 1 are connected to the Open Apple and Solid Apple (or Option) keys, respectively. The other pins on the game port are utility outputs. Normally, the utility strobe (pin 5) is at +5 volts with respect to ground. When location -16272 is accessed, this voltage will drop to zero for a half-microsecond. Writing to that memory location will trigger the strobe twice. The annunciators may be turned on and off through software as follows: AN# Turn On location Turn Off location 0 -16295 -16296 1 -16293 -16294 2 -16291 -16292 3 -16289 -16290 If left to its own devices, the Apple will leave AN0 and AN1 off, and AN2 and AN3 on. In addition, on ][e's with double-hi-res capability, the AN3 location is used to activate the extended hi-res display...just turn AN3 OFF with the 80-column display active. Note that there is an error in the official Apple documentation, which instructs you to turn AN3 on for double hi-res. II. The 9-pin game port The signals present on the 9-pin port function identically to the signals on the 16-pin port. Pin assignments are as follows: Pushbutton #1............1 6............Pushbutton #2 +5v Power................2 7............Pushbutton #0 Ground...................3 8..........Game Control #1 Game Control #2..........4 9..........Game Control #3 Game Control #0..........5 Note that the annunciators and utility strobe are not available on the 9-pin port. Some of this material is adapted from the \Apple ][ User's Guide Second Edition\, 1983. --Dave Althoff, Jr.