Apple II Input Devices

Csa2 FAQs-on-Ground file: Csa2KBPADJS.txt  rev012

The Csa2 (comp.sys.apple2) usenet newsgroup Frequently Asked
 Questions files are compiled by the Ground Apple II site,
 1997 - 1999.

for on-line perusing via Netscape, etc. ... (double-spaced)

The Csa2 FAQs may be freely distributed.

Note: To correctly view tables and diagrams on a super-res display,
 use a mono-spaced Font such as CoPilot or PCMononspaced.


 001- How do I do the Shift Key Mod?
 002- What's a "VIDEX" board?
 003- I need a GS ADB keyboard cable! Where can I get one?
 004- How can I make a PC-to-Apple Joystick converter?
 005- How can I do an Apple-to-PC Joystick conversion?
 006- What are the dip-switch settings for the "BITMOUSE" card? 
 007- How can I switch my IIe keyboard layout to Dvorak?
 008- What keyboards work as replacements for a GS keyboard? 
 009- What is a Koala Pad and how do I test it?
 010- Can I convert a C-64 Koala Pad to work on my Apple II?
 011- How do I make the internal cable for a IIe numeric keypad?
 012- Is there a cable or card which lets you connect two joysticks?
 013- How do I write programs for the Apple Graphics Tablet?
 014- Why does my ][+ KB act like the CTRL key is always pressed? 
 015- Can I replace my bad IIe keyboard with one from another IIe?
 016- Why does my IIe keyboard keep repeating characters? 
 017- How do I read the joystick on a GS in native mode? 
 018- Is a Y-adapter available for my GS keyboard?
 019- How do you use the Kensington TurboMouse with a IIgs?
 020- How do I clean my mouse?
 021- What is the best kind of mouse pad?
 022- How do I clean my keyboard?
 023- Is there a fix for a bad trigger on my Flight Stick?
 024- How can I improve the feel of my original (beige-key) IIc KB?
 025- Can I replace my broken GS mouse with one from a Mac?
 026- What is the pinout for the IIe, //c, and similar 9-pin mouses?
 027- How do I write programs which use the mouse?

From: Steve Jensen

001- How do I do the Shift Key Mod?

Here's info from my files on the 'shift key mod':

The one wire shiftkey mod is the oldest and simplest fix that can be
made to the Apple II to get true upper and lower case operations with
the shift key.  Most good word processors have input routines that check
the PB2 input on the game I/O port to determine if the shift key is
being pressed.  Some programs that have these routines are Wordstar,
Write-on, Apple Pascal 1.1 and many others. Follow the steps below to
install the shift key mod.

1 mini-grabbette clip (Radio Shack PN 270-370)
1 15 in. piece of small guage wire
1 16 pin socket
1) Solder one end of the wire to the mini-grabbette clip.

2) Solder the other end of the wire to pin 4 of the 16 pin socket as
close to the body of the socket as possible.

3) Turn the Apple II off and remove the cover.

4) Remove anything plugged into the game I/O socket.

5) Attach the mini-grabbette clip to pin 24 of the keyboard encoder
connector. This connector is located inside the Apple II directly
beneath the RESET key. Pin 1 is nearest the power supply and pin 25 is
nearest the right edge of the Apple II. Use the grabbette clip to attach
to the standoff _pin 24_ (second from the end).

6) Lead the other end of the wire with socket attached along the right
edge of the motherboard and plug it into the game I/O port. Be careful
to plug pin 1 to pin 1 when putting this socket in. Pin 1 of the game
I/O port is towards the front of the computer.

7) Replace the cover and start using lower case characters.


From: Paul Creager

002- I opened an Apple II+ the other day found that there was a
     board labeled "VIDEX" tacked under the keyboard. What's a
    "VIDEX" board?

     The official name is the Videx Keyboard Enhancer.  It replaces
Apple's keyboard encoder board underneath the keyboard.  Besides
providing true U/L capability (with the Shift Key), it had a small
(10-20 character) buffer and supported programmable macro keys.

     I had one on my ][+.  I remember a couple of wires had to be run to
the motherboard.  One enabled true Shift key usage.  The other I can't
remember.  If you don't have a wire running to an IC on the motherboard,
that explains why your Shift key isn't working.  It could very well be
the same spot where the "traditional" Shift key mod is made.


From: Rubywand

003- I got a free IIGS but with no GS ADB keyboard cable!
     Where can I get one?

     Jack Somers and Supertimer report that ADB cables which will work
fine are available at low prices from stores which carry Mac supplies.

     An alternative is to get an SVideo cable from your nearest
video/audio electronics store. Although these cables have no external
shield, all four ADB lines are connected. I tried one on our GS and it
worked fine. One thing: the absence of an external shield may produce
extra TV/Radio interference.


from Rubywand

004- How can I make a PC-to-Apple Joystick converter?

     If you are looking for the best stick at the best price for your
Apple II, building a simple PC-to-Apple2 joystick converter is the way
to go. Practically every computer stuff store carries PC sticks and you
will have a wide selection of brands and models from which to choose.
     My PC stick is a standard CH Products "FlightStick". A resistance
measurement produced a disconcerting revelation: the X and Y pots
top-out around 100K Ohms-- 50K less than a standard Apple II stick!
Fortunately, you can compensate for the difference just fine by adding a
bit of capacitance. The finished converter is shown below:

  To PC Stick               To Apple II        Or to 16-pin IC plug
  15-pin Dsub               9-pin Dsub         ribbon cable to
  female connector          male connector     internal Game socket

      [1] [4] and [5] ----------[2]  +5V           [ 1]
      [2] ----------------------[7]  Button 0      [ 2]
      [3] ----------------------[5]  X-axis        [ 6]
      [6] ----------------------[8]  Y-axis        [10]
      [7] ----------------------[1]  Button 1      [ 3]
                                [3]  Ground        [ 8]

On the Apple II side ...           9-Pin          16-Pin

  add 680 Ohm resistor between   [7] & [3]      [ 2] & [ 8]

  add 680 Ohm resistor between   [1] & [3]      [ 3] & [ 8]

  add .01 uF cap* between        [5] & [3]      [ 6] & [ 8]
    optional: for fine-tuning,
    add 50K-100K trim pot
    in series with the cap

  add .01 uF cap* between        [8] & [3]      [10] & [ 8]
    optional: for fine-tuning,
    add 50K-100K trim pot
    in series with the cap

*Note: The Capacitors compensate for smaller R range of PC
 sticks.The C values are approximate. For standard 100K Ohm
 PC sticks, .01 uF pretty well guarantees you will be able to
 cover the full Apple II X and Y range (0-255).

 Values of .01 uf  (X-axis)  and .005 uF (Y-axis)  worked
 well for a PC "FlightStick" when plugged into our Apple II+.

     For checking and adjusting stick performance on your Apple II, use
a program which continuously reads and displays X and Y stick values.
The program below does this and displays "B0" when Button 0 is pushed
and "B1" when Button 1 is pushed. Do a CTRL-C to exit.

20 PRINT "X= "; PDL(0); TAB(15); "Y= ";PDL(1); TAB(30);
30 IF PEEK(49249)>127 THEN PRINT "  B0";
40 IF PEEK(49250)>127 THEN PRINT "  B1";

Note: If your Apple II uses an accelerator chip or board, make sure that
it "slows down" for joystick accesses or just set Speed to "Normal"

     Most likely, you will find that the a stick tops-out too early in
the X-max and/or Y-max direction. For best control precision, what you
want is for extreme values to occur near the extremes of stick movement:

X (horizontal)  Left= 0   Right= 255
Y (vertical)      Up= 0    Down= 255

This way, you have lots of active swing which makes graphics
work and playing most games much easier.

     If you included the trim pots in your converter, adjusting for
maximum active swing will be easy. If your converter does not include
the trim pots, experiment with swapping in capacitance values between
.002 uF and .01 uF to get the best control 'spread'.

     The converter I built fit inside heat-shrink tubing. Putting it in
a small plastic box may be better. You could mount the trim pots (and/or
switches with fixed "trim resistors") and select between settings for a
'Fast', short swing, 'hot' Game Stick and a 'Normal', full swing, 'cool'
Game/Graphics Stick.


005- I have a great Apple II joystick I'd like to use on my PC.
     How can I do an Apple-to-PC Joystick conversion?

     If you've compared the pin-outs and info for Apple II and PC
joysticks, then you know there are some important differences:

The Apple II stick uses a 9-pin plug vs. the PC's 15-pin plug. (Older
Apple II sticks may use a 16-pin plug which fits in an IC socket.)

The Apple II stick's X, Y controller potentiometers are a bit larger.

The buttons are wired differently.

     You can use an Apple-to-PC adaptor (such as the one supplied with
the Epyx A2/PC joystick) to handle plug conversion; or, you can replace
the entire cable with one from an old PC stick.

     The PC's joystick interface will work with the Apple2 150k pots;
but, in some applications, you may notice a tendency to max out early in
the stick swing. You can correct this by connecting a 300k resistor
across each pot (from the center to the end with a wire going to it).

     The difference in button wiring is the main reason an Apple-to-PC
conversion involves opening the joystick and making changes. (The Apple
stick has a slightly more complex, less flexible circuit. Apple2-to-PC
is not as easy as PC-to-Apple2.)

     Basically, you need to change the Apple stick's button wiring so
that it looks like the PC stick's button wiring.

     The mods mentioned above are not difficult, especially if you swap
in a PC cable. If you want to be able to use the stick on an Apple II,
then some kind of switching will be required.

         Apple II Joystick
     (9-pin male connector)         (Old 16-pin IC-style plug)

         [2]---------------  +5V            ------- 1
         [7]---------------  Button 0       ------- 2
         [5]---------------  X-axis         ------- 6
         [8]---------------  Y-axis         ------- 10
         [1]---------------  Button 1       ------- 3
         [3]---------------  Ground         ------  8

         PC Joystick
 (15-pin female connector)

         [1]---------------  +5V
         [2] -------------- Button 0
         [3] -------------- X-axis
         [6] -------------- Y-axis
         [7] -------------- Button 1
         [4] and/or [5] Ground

     Both sticks tie one end of each X, Y potentiometer to +5 and send
the center (wiper)  to the an output.  (Or the wiper may go to +5V and
an end to the output; it doesn't much matter.)  The standard Apple II
pot is 150K Ohms; most PC sticks use 100k Ohm pots.

     The buttons are wired differently.

     On the Apple II stick (see below), each button switch goes to +5V.
The other end goes to GND through a resistor (one resistor for each
button).  A button's Output is from the junction of the switch and its
resistor. When the button switch is not closed, its Output is near 0V
(=logic 0).  Pressing a button sends +5V to the output (= logic 1).

X Button Switch
|_____Button output to Apple (Press => "1")
Z 680 Ohm resistor

     As shown below, a PC stick button Output is normally an unconnected
wire. Most likely, inside the computer, a PC or compatible Game Port has
this line tied to a 1k-3k resistor going to +5V. So, the line will
normally be at something close to +5V (= logic 1).  Pressing the button
grounds the line and pulls it down near to 0V (= logic 0).

_____Button output to PC (Press => "0")
X Button Switch

Apple2-to-PC Joystick Conversion: Step-by-Step


To convert an Apple2 joystick for PC use you will need a cable from an
old PC stick (or a 6-wire cable and 15-pin female connector). You can
find junk PC sticks with good cables at flea markets and lots of other
places. You will also need two 330k resistors.

1. First, open the Apple joystick case and mark each wire going to the
cable. The best way is to use small self-stick labels. Label each wire
by function (e.g. "+5", "X", "GND", etc.).

You can use an Ohm meter to, for example, verify that the wire you think
is Button 0 really goes to pin 7 on the Apple 9-pin connector (or pin 2
on the old 16-pin IC style connector). Pinouts for both kinds of A2
sticks are shown below:

Apple II Joystick
  (9-pin male)

  [2]---- +5V
  [7]---- Button 0
  [5]---- X-axis
  [8]---- Y-axis
  [1]---- Button 1
  [3]---- Ground

  Apple II Joystick
(16-pin IC-style plug)

  [1]---- +5V
  [2]---- Button 0
  [6]---- X-axis
  [10]--- Y-axis
  [3]---- Button 1
  [8]---- Ground

The +5V wire is easy to find. It will go to each pot and to one side of
each Button switch.

The Apple2 Ground wire goes to the 'bottom' end of each fixed resistor.
You do not need to label it; because it will be removed.

2. Once the wires are labeled, cut each about 1 inch from the point it
goes into the cable. Remove the cable. (Keep the cable; it may come in
handy for some later Apple2 project.)

Now, is the time to rewire the Buttons.

3. Remove (snip or unsolder) the two fixed resistors. If the Button 0 or
Button 1 lead becomes disconnected from its switch during removal of a
resistor, reconnect the lead.

Check to see that, now, the Button 0 wire is the only one going to one
side of the Button 0 switch. The same goes for the Button 1 wire.

Snip off or unsolder the +5 leads going to the other side of each button
switch at the non-switch end. If a wire runs from one switch to the
other, leave it alone. If not, connect a wire from switch to switch.
This is the "common" side of the switches.

You want to end up with a single wire going to the common side of the
switches and separate Button 0 and Button 1 wires going to the other

____Button 0 wire
X B0 Switch
------- COMMON Wire
X B1 Switch
|____Button 1 wire

Label the COMMON wire as "GROUND"

4. The 330k resistors will help bring the outputs of the Apple2 X and Y
150k Ohm pots closer to the 0-100k range PC prefers. Connect a 330k
resistor 'across' each pot-- i.e. from the center post to the post going
to a +5 lead.

5. Label each of the leads coming from the PC cable. If it is still
connected to a joystick, the following pic will help identify each lead:

         PC Joystick
 (15-pin female connector)

         [1]---------------  +5V
         [2] -------------- Button 0
         [3] -------------- X-axis
         [6] -------------- Y-axis
         [7] -------------- Button 1
         [4] and [5] --- Ground

If the cable is still connected, snip the the leads once they are all
labeled. If both Ground ([4] and [5]) leads are present, twist them
together and treat like a single Ground lead.


6. You have six labeled wires in the Apple2 joystick case: +5, GROUND,
B0, B1, X, and Y. The same six leads are labeled on the PC cable. Splice
each Apple2 wire to the corresponding PC cable wire. Use heat-shrinkable
tubing to cover each connection.

7. Seat the new cable in the joystick case, arrange leads to avoid
mounting posts, etc., and close up the case. Viola!


If you have an Ohm meter here are some checks you can do:

X (Horizontal) Check- check R between cable pins 1 and 3. As you move
stick left to right R should go from 0 to about 100k.

Y (Vertical) Check- check R between cable pins 1 and 6. As you move
stick up to down R should go from 0 to about 100k.

Button 0 Check- (Button 0 is the main, "Fire" button.)  cable pins 2 and
4 or 5. It should be very high and go to 0 when Button 0 is pressed.

Button 1 Check- check R between cable pins 7 and 4 or 5. It should be
very high and go to 0 when Button 1 is pressed.


Plug in the stick and try it with a game.

Some games (such as Elite Plus) will claim no joystick is present if the
stick is badly out of adjustment. If this happens, try the stick on a
game which is less picky and includes pre-play stick adjustment.

Once adjusted, your 'new' stick should work fine with all PC wares.


From: Alberto Roffe

006- Can someone tell me the dip-switch settings for the
    "BITMOUSE" card by Sequential Systems?
 The following comes from the BitMouse card manual, which I have
in my //e:
Switch 1- This switch controls mouse tracking sensitivity
OFF: Slow
ON:  Fast
Switch 4- CPU speed
OFF: 1 to 4 MHz
ON:  5+ MHz
Switches 2&3 currently have no function.

From: David E A Wilson

007- How can I switch my IIe keyboard layout to Dvorak?

There are a number of ways to set the NTSC //e keyboard to Dvorak.

1)   If you have a Rev A motherboard cut X1 and join X2. This will
allow     AN2 to control the keyboard layout (default will be Dvorak).

2)   If you have a Rev B motherboard and want AN2 to control the
keyboard layout cut X2 and solder a short wire between the back half of
X2 and the back half of X3 (do not join X3).

3)   Obtain a 24 pin IC socket. Solder 3 fine wires to pins 12, 19 and
24. Solder the other ends to a SPDT switch (pin 19 to the centre/common
terminal). Remove the keyboard ROM, insert the switch+socket and then
insert the keyboard ROM. Cut X1 (if Rev A) or X2 (if Rev B) to isolate
pin 19. Mount the switch somewhere convenient.

All the above was taken from "Understanding the Apple IIe" by Jim
I recommend it to you.


From: Bradley P. Von Haden

008- My stock GS keyboard has been acting flaky; and, now
     I'm looking for a GS keyboard replacement.
     What's available?

Here is a list of ADB keyboards that I have compiled as of 96/01/06.
Additions/corrections welcome.

'+' designates changes from previous list

I have the following that work:

AppleDesign Keyboard ($85-90)

Apple Extended Keyboard II ($155-160)

Adesso 105 Extended Keyboard ($80 - Mac's Place, MacZone, Tiger SW)

Adesso 102 Extended Keyboard w/ Trackball [Trackball does NOT work] 
($100 - Mac's Place, MacZone, Tiger Software)

Arrive Extended ($50 - MacMall)

Interex 105 Extended ($55 - MacMall, Syex Express; $34 - Computer City)

Key Tronic MacPro Plus ($130 - MacZone, APS Tech.)

OptiMac Extended Keyboard (???)

PowerUser 105E Extended Keyboard ($50 - MacWarehouse)

SIIG, Inc MacTouch Model 1905 (~$100.00)

Sun OmniMac Ultra [extended, ADB type] (???)

Suntouch ADB Extended Keyboard ($75 - Syex Express)

VividKey Extended Keyboard ($60 - MacMall)

Do not work:

Apple Adjustable Keyboard

MacALLY Peripherals Extended Keyboard

MicroSpeed Keyboard Deluxe MAC


ClubMac Extended Keyboard ($59 - ClubMac)

Datadesk MAC 101 E ($100 - MacWarehouse, MacZone)

Datadesk TrackBoard ($100 - MacWarehouse, MacZone)

Key Tronic Trak Pro Plus ($230 - APS Tech.)

Performance Soft Touch Extended Keyboard ($59 - MacZone)

Spring Sun Tech MacPride 97 ($90 - MacMall)

Spring Sun Tech MacPride 105 ($59 - MacMall)

Spring Sun Tech MacPride 110 ($80 - MacMall) [MAC/IBM switchable]

Spring Sun Tech MacPride KidBoard ($100 - MacMall)

Adesso Tru-From Ergonomic extended keyboard ($90 - CDW)

Adesso Tru-Form Ergonomic ext kb w/ pointer ($116 - MacZone)


From: Rubywand

009- What is a Koala Pad and how do I test it?

     The Koala Pad is drawing pad peripheral. It 'looks like' a
two-button joystick to your Apple II. So, any software which accepts
joystick input can use the pad. This includes the paint program
originally included with the pad (the "Koala Micro-Illustrator"),
"Blazing Paddles", "Dazzle Draw", "816 Paint", and many other programs.

     The Koala Pad has the old 16-pin game plug. It is supposed to be
plugged into the Old Game Port socket. This is an 'IC socket' near the
back right side of the Apple II (II+, IIe, IIgs) motherboard.  The cable
end should be facing toward the back.

     It's a good idea to get a 9-pin plug -to- 16-pin socket converter
cable so that the pad can be plugged into the newer, external, 9-pin
Game Port. This makes it much easier to unplug the pad when you want to
swap-in a joystick for games. The converter cable is not hard to build;
or, you may find one at a swap meet.

     You can test your KoalaPad using software which checks joysticks.
For example, touching the stylus to the upper left corner outputs X,Y
readings close to 0,0; touching the stylus to the lower right corner
outputs X,Y readings of 255,255. Near the center of the pad, the output
is about 130,130.

     Some indication of shrinkage or stretching on the pad seems to be
normal. Our pad does not present a 'slate flat' look either; but, it
works fine. Before deciding that your pad is defective, try it out on a
joystick checker program. If you are using some kind of accelerator on
your Apple ][, be sure to set speed to 1MHz.

     Similarly, you can check your software by substituting a joystick
for the KoalaPad.


010- I have a Koala Pad with a 9-pin DIN female plug. I guess it's
     a C-64 model. Can I convert a C-64 Koala Pad to work on my
     Apple II?

     Since the standard Commodore-64 9-pin DIN port is male, it looks
like your Koala Pad (with a female plug) is, indeed, intended to work on
a C-64, VIC-20, etc. machine.

     As to whether or not the C-64 Koala Pad can be used on an Apple II,
it looks like, probably, it can, if you can find or build an adaptor.
This is, really, a guess. It is based upon the capabilities of the C-64
Game port, time constant capacitor values used in the C-64, and the
probability that Koala Pad's makers would not wish to make major design
changes between Apple and C-64 models.

     Although C-64 joysticks are of the simple "switcher" type which
connect to Game port switch inputs, the C-64 Game port also includes X
and Y analog "paddle" inputs. These are at pin 9 (X) and pin 5 (Y).

     The C-64 manual does not ever seem to specify an optimal max R
value for the pots connected to these inputs; but, the capacitor part of
the expected R/C circuit is 1000 pF in each case and the caps go to
ground just as they do in the Apple II.

     In short, the C-64 "paddle" inputs look very much like the Apple II
joystick inputs. A _try_ at an adaptor would look something like the
following ...

To C-64 Koala Pad    To Apple II Game Port
 (9-pin male DIN)      (9-pin male DIN)

        1 ?
        2 ?   2nd Button -> 1
        3 ?
        4 ?
        5 <-  PDL1 (Y)   -> 8
        6 <- main button -> 7
        7 <-  +5V line   -> 2
        8 <-    GND      -> 3
        9 <-  PDL0 (X)   -> 5

     The above assumes that the C-64 Koala Pad will use C-64's "Fire
Button" input for its main button. The second button would, then,
connect to one of the four joystick switch inputs. (Actually, since all
of the switch inputs, including the Fire Button, are just inputs to a
port IC, any two may be the ones used to handle Koala Pad's buttons.)

     It should be possible to detect the button lines on the Koala Pad
connector using an Ohm meter (on R x 100 range) with one lead connected
to the GND pin (pin 8) and using the other lead to check pins 1, 2, 3,
4, and 6. A button lead similar to one on an Apple II should show up as
a 500-700 Ohm resistance.

     Again, we are dealing with guesses. If you decide to try making a
converter, be sure to post what you discover. Good luck!


From: Mark Wade

011- Does anyone have the pin-to-pin mapping that would allow me
     to construct a suitable internal cable for a IIe numeric

You need a female Dsub-15 to 11 pin female header.  If the female
Dsub-15 is numbered like this:
\                                        /
 \  8   7    6    5    4    3    2   1  /
  \  15   14   13   12   11   10   9   /

And the 11 pin header is numbered like this:

|                                     |
|  11  10  9  8  7  6  5  4  3  2  1  |


DB-15     |     Header

 12               11
 11               10
 10                9
  9                8
 NC                7
  7                6
  6                5
  5                4
  3                3
  2                2
  1                1

The header is as viewed on the motherboard.  The DB-15 is the female
connector that you would plug the keypad into.


from Rubywand

012- Is there some cable or card which lets a II user connect
     two joysticks?

     Yes. One is Paddle-Adapple from Southern California Research Group.
It is a small external card  with sockets for the joysticks. A ribbon
cable runs into the Apple II and plugs into the 16-pin Game socket.

     As noted in the "for Apple II, //e, & Franklin" model's data sheet,
Paddle-Adapple lets you switch between two sticks; or, with the switch
set to "A" plus proper jumper settings, you can access two two-button
sticks. The jumpers also allow programming the card for different X-Y
and button configurations.


From: Oliver Schmidt

013- How do I write programs for the Apple Graphics Tablet?

The Apple Graphics Tablet I know of is rather large and heavy; its pen
is attached to it with a (too short) cable; it makes funny sounds that
change when the pen is moved in/out the reach of of the tablet.

A long time ago I patched a few programs to make use of this tablet. To
make it clear in the first place - I don't have these patched versions
available anymore :-(. But I found a listing from which I can tell you

To detect the interface card, I looped over all slots to check in its
firmware for

$B0 at location $Cx01 and

$20 at location $Cx09

x being the slot number. I never found this 'signature' in any other

To check for the pen position one has to poll the tablet (again x being
the slot number):

LDA $CFFF ; switch off all extension ROMS

LDA $Cx00 ; switch on the extension ROM of the tablet

LDA #$Cx

STA $07F8 ; initialize some hidden text screen data area for the
            tablet firmware

JSR $CBB9 ; call well known location ;-) in tablet firmware

When the pen is in reach of the tablet (up or down) this routine will
return immediatly. Else it will block - fortunatly the routine checks
the keyboard strobe ($C010) too and will also return if a key is
pressed, even if the pen remains out of tablets reach.

After the routine has returned one can get the information:

$0280 contains the state of the pen (up or down), I don't know excatly
any more wich bit it is nor if one can distiguish between 'pen up' and
'pen out of reach but key pressed'

$0281, $0282 contains the absolute X position of the pen

$0283, $0284 contains the absolute Y position of the pen

As far as I can remember the values have about 12 bit resolution (!).
Usually I needed screen coordinates (280 x 192), so I dropped the 4
least significant bits and did some additional adjustment. Unfortunatly
I can't remember either what coordinates will be there in the 'out of
reach but key pressed' case.


From: Rubywand

014- My ][+ keyboard acts like the CTRL key is always pressed
     when it isn't. (Press 'G' get 'M' get CR, etc..)
     Is there a way to fix this problem?

     Are you sure that your CTRL key is not stuck? Try diddling the key.
You can, also, pull the keytop and shaft and see whether (carefully)
lifting out the small crossbar wire makes any difference. (If it does, a
squirt of Radio Shack Control Cleaner into the switch and a wipe with a
cotton swab may de-gunk things and help restore normal functioning.)

     Another possible source of the problem is a KB Controller IC pin
making poor contact with the line coming from the CTRL key circuit. (Try
removing and re-socketing the KB IC.)

     U1, a 7400 quad nand gate IC, could have gone bad or be making poor
contact at some pins. This could result in an 'always-pressed CTRL key'
signal at pin 11.

     When the CTRL key is not pressed, pins 12 and 13 of U1 (connected
to the CTRL key switch) should be at nearly 5V and pin 11 (which goes to
pin 19 of the KB Controller IC) should be at logic "0" (roughly 0V -

     If U1 pins 12 and 13 are at 0V (or very close) when the CTRL key is
not pressed, your CTRL key switch is, probably, stuck.

     If U1 pins 12 and 13 are at/near 5V and pin 11 is not near 0V, U1
is probably bad or making poor contact at some pins.

     If U1 pin 11 is near 0V and pin 19 of the KB Controller IC is not,
then, there is either a break in the line connecting the pins or one or
both IC's are making poor socket contact.

     If pin 19 of the KB Controller IC is near 0V when the CTRL key is
not pressed and near 4-5V when the CTRL key is pressed, then, if you
still have 'stuck CTRL key' symptoms, there is a good chance that the KB
Controller IC is messed up.

Note: all of this assumes that your KB is like the one diagrammed in the
Apple ][ Reference Manual on page 101.


From: Owen Aaland

015- Can I replace my bombed IIe keyboard with one from another IIe?

     All four styles of the early keyboards are interchangeable. The
first production machines have the keyboard mounted to the base pan
while later ones are mounted to the underside of the top of the case.
The mounting holes for all the keyboards except the platinum models are
located the same.


From: Bruce R. Baker

016- At my school we have a IIe that has some problem with its
     keyboard. When you push a key it keeps on repeating until
     you push another, which also repeats. Is there a cheap easy
     way to fix this?

     My experience is that this is more simple than it looks. You have
one stuck key. It is stuck down. Have you opened the machine and moved
the keyboard? If so you may have replaced it wrong, it is rubbing on one
of the edges. The key that is stuck is next to the edge.

     If this does not apply to you, often pressing all of the keys until
it stops (because by pressing on the right key, it comes unstuck) will


From: Dave Althoff

     My first suspicion is a stuck key, and if this is a beige ][e, the
first place I'd look is the [`/~] key, adjacent to the power light.


From: Owen Aaland 

     The escape is a likely key for this as it is located where it can
easily contact the case but does not exhibit any problems until another
key is pressed and then that key will repeat.


 From: Rubywand

     If the KB Encoder IC or the IOU IC is loose or has pins making poor
contact, you could get the symptoms described.

     Open the case and locate the KB Encoder (a big, 40-pin IC on the
right side of the motherboard just to the right of three ROMs). Use a
small, thin-blade screwdriver to scootch up the IC. (You want to get
some lifting for all pins, even if you end up just removing the IC.)
Press the IC back into the socket.

     Do the same with the IOU (a big, 40-pin IC just to the left of the
three ROMs).

     The idea of lifting up and re-socketing each IC is to let the
socket contacts scrape a fresh connection with each pin on the IC.


From: (System Administrator)

017- A while ago someone posted about how to read the joystick on
     a GS in native mode. They said that it was possible to read
     both paddles at once and therefore get much more accurate
Only the high bit of these locations is valid.  When the high bit of
either location becomes 0 then the corresponding analog input has timed

You will actually get more accurate results by reading them one after
the other with the accumulator set to 8 bits wide and the index
registers used to hold the counts (16 bits wide).  This allows for a
much faster loop, giving better resolution.  Assuming that this routine
is called from full native mode, the following code will do the trick:

strobe   equ   $C070       ; analog input timing reset
pdl0     equ   $C064       ; analog input 0
pdl1     equ   $C065       ; analog input 1

start    php               ; save processor status register
         phb               ; and data bank register
         sep   #%100000    ; make accumulator 8 bits wide
         lda   #0          ; make data bank = 0
         ldx   #0          ; initialize the counters
         lda   strobe      ; strobe the timing reset
loop1    inx               ; increment pdl0 count
         lda   pdl0        ; is high bit = 0?
         bmi   loop1       ; no, keep checking
         lda   strobe      ; yes, strobe the timing reset again
loop2    iny               ; increment pdl1 counter
         lda   pdl1        ; is high bit = 0?
         bmi   loop2       ; no, keep checking
         plb               ; yes, restore data bank
         plp               ; and processor status register
         rts               ; return to caller (could be RTL)

Notice that the actual counting loops are only 9 cycles long.  This
gives the best possible resolution.  You will need your counters to be
16 bits wide as the results will easily overflow the capacity of an 8
bit counter.

Using memory locations as counters will only serve to slow the counting
loop down. If X and Y contain valid data before entry, you will need to
save them off to the stack and pull them back in after interpreting the
joystick results. I have used this exact method to read the analog
inputs on my Science Toolkit box which connects to the joystick port.

The results have been extremely accurate (much more than would be needed
for a game which reads the joystick).


From: Dan DeMaggio

018- Is a Y-adapter available for my GS keyboard?

     Yes. Redmond Cable has an ADB Y-connector cable for separating your
mouse from the side of your keyboard.


From: Mark Wade

019- How do you use the Kensington TurboMouse with a IIgs?

The Version 3.0 Kensington TurboMouse ADB works fine on a later model
(post-Woz) IIgs. The Version 4.x TM will not work on a IIgs.

Dip switches:

Right handed use: (L but click, R but click lock) SW1 Up
Left handed use:  (R but click, L but click lock) SW1 Down

The other switches are for what they call "chording" and
are listed as:

          SW2  SW3  SW6
Command N Dn   Dn   Up
Command O Dn   Up   Dn
Command W Dn   Up   Up
Command S Up   Dn   Dn
Command P Up   Dn   Up
Command Q Up   Up   Dn
Command Z Up   Up   Up


From: Rubywand

020- My mouse feels very bumpy. Everyone says it needs cleaning but
     when I look inside there is just a little dust and the rubber
     treads on the rollers look okay. So, how am I supposed to get
     my mouse any cleaner?      

     It does sound like you have a gunked-up mouse. Rollers are whitish
plastic, black plastic, or metal-- they do not have treads. The "tread"
is gunk. 

     It is best to clean a mouse with the computer OFF. The main reason
is that, otherwise, it's hard to avoid unintended clicking on stuff that
could cause problems. There is no need to disconnect the mouse unless
you want to move to a better work area for the cleaning.

     First, get together a few supplies and tools:

A wooden desoldering stylus or flat-tipped plastic TV technician's tool
is handy for dislodging gunk. (Probably, a small jeweler's screwdriver
is okay. However, you do not want to scratch a roller.)

Small skinny long-nosed pliers are good for picking out globs of gunk
and dust.

Windex or some relatively safe spray cleaner.

Paper towels and a cotton swab.

     To open the mouse use fingernails to rotate the panel insert around
the ball opening on the bottom. The panel and ball should come out.
Spritz the ball and panel with cleaner (or put them in a glass with soap
and water). Wipe dry.

     Dampen a paper towel with cleaner and wipe the outside case. With a
cleaner-dampened paper towel, clean the cord for at least a foot or so
near the mouse.

     Look inside the mouse. You may see globs of dust and gunk. Remove
these--  pick them out-- as best you can.

     Inside, there should be 3-4 rollers. If it's been a month or more
since the last cleaning each will probably look like it has a dark gray
rubber tread. Use the desoldering stylus, etc. or a fingernail to
dislodge gunk on each roller.

The best way to dislodge gunk is to push the 'tread' sidewise (kind of
like removing a tire) as you work your way around the roller. Use the
skinny long-nosed pliers to pick out strips of the 'tread' as it

     Use a cleaner-dampened swab to finish cleaning each roller.

     Use the swap to wipe around and pick out any remaining dust or
gunk, replace the mouse ball, and rotate the plastic panel into place.

     One way to simplify mouse cleaning is regular timely use of an
Ergotron "Mouse Cleaner 360" or similar kit. The Ergotron kit includes a
couple velcro balls, cleaner, wipe cloth or shammy, and a mouse cleaner
track pad. You squirt cleaner on the proper size ball, stick it in your
mouse, run it around in a circular motion on the track pad, and finish
up with a wipe using the cloth or shammy.

     Such kits do not seem to be much help in removing established gunk
'treads'. (Actually, the Ergotron might get the job done; but, it would
take a _lot_ of revolutions. It is easier to dislodge 'treads' by hand
and use the Ergotron to get rid of residue.)  Cleaning kits can avoid
tread build-up if used every week or so.


021- What is the best kind of mouse pad?

     The best mouse pads are cloth-covered 1/8" - 1/4" rubber foam. The
cloth should have a slightly prickly feel when brushed by your finger
tips. Such pads offer some resistance to mouse movement. This makes
positioning easier and helps reduce fatigue.

     The worst mouse pads are plastic or plastic coated. These usually
offer little resistance to movement and transfer hand oils, dust, and
other gunk into the mouse so rapidly that cleaning becomes a nearly
daily chore.
     Cloth-covered pads do get dirty. It's a good idea to wash your
mouse pad every couple of months. (Use warm soapy water, rinse, blot
with towel, and let dry.)  


022- Does anyone know what is the best way to clean a keyboard
     after several months of using it without affecting the
     imprinted letters or numbers on the keys?

     First, if you do not have a picture of the keyboard, it's a good
idea to make a diagram of key locations.

     If the keyboard is a separate unit, remove the keyboard cover--
i.e. the 'shell' that surrounds the keys. Spritz it with a cleaner (like
Windex, Fantastik, etc.), wipe, and let soak in warm soapy water. 

     What you need to do next is pull the key tops. A puller tool which
lets you get around and under a key on two sides is very helpful; or,
you can use fingers and a small screwdriver or leter opener to pop off
the key tops. For SPACE and other large keys, take care to unhook
stabilizer bars and pay attention to how the bar for each is connected.

     Spritz each key top with Windex, Fantastik, etc., wipe, and let
soak in warm soapy water. The letters, numbers, etc. on key tops are,
usually, solid plastic and should not be in any danger of getting wiped
off. For sure, you would not want to use any petroleum distillate or
other solvent which attacks plastic for cleaning.

     Everything is rinsed, blotted with paper towels, and allowed a
couple hours to dry.

     Once the KB interior is de-dusted you can blot away remaining
moisture from key tops, etc. and put everything together. Install the
large key tops with stabilizer bars first, then press on the others. If
the keyboard is a separate unit, wipe/clean the cable.


023- Is there a fix for a bad trigger on a CH Products Flight Stick? 

     If the trigger on your "Flight Stick" doesn't always fire when
squeezed, the problem is likely to be too much space between the trigger
and the PB0 microswitch. A simple fix is to apply two or three layers of
self-stick label bits to the back of the trigger piece (easily accessed
once the handle is opened). To check your work, use an ohmmeter
connected across the button output or plug in the stick and RUN a
two-liner to display PB0 status:

     10 IF PEEK(49249)>127 THEN PRINT "X";
     20 GOTO 10

     Pressing the trigger should spit out X's. Once you know your stick
is fixed, just slap it together and you've got the hair-trigger
snap-action response "Flight Stick" is supposed to deliver.


From: Mitchell Spector

024- How can I improve the feel of my original (beige-key)
     IIc keyboard?

     You can improve the feel by removing the black rubber mat. This is
a spill-guard; but, people complained it hindered their typing so it was
removed in next generation IIc's. You can safely remove yours by just
lifting it up; it's attached by a few drops of glue.

     Some people claim typing is even further improved if you remove the
small metal clips in between each key stem (these produce a click sound
when you type). You can reverse all this if you do it carefully, I did


From: Supertimer

025- Can I replace my broken GS mouse with one from a Mac?

     Yes, if it is a Macintosh ADB mouse. The "teardrop" ADB Mouse II
that comes on newer Macs works great on the IIGS and can be found for a
few bucks in Mac for-sale groups. Third party ADB mice should work too.

Note: Mice for Mac Plus and before are not ADB so won't work. Mice for
the new iMac won't work because they are for the USB interface.


From: David Empson and David Wilson

026- What is the pinout for the IIe, //c, Laser and similar
     9-pin mouses?

The IIe/IIc/Mac Plus mouses can plug into the //c or IIc+ Game/Mouse
Port or, on a IIe, into the 9-pin socket of a Mouse Card. When plugged
into the //c or IIc+, several Game Port pins are redefined for use with
a mouse.

 Dsub-9 Female Socket on Computer    Dsub-9 Male Plug on Mouse
     ,---------------------.          ,---------------------.
     \  5   4   3   2   1  /          \  1   2   3   4   5  /
      \   9   8   7   6   /            \   6   7   8   9   /
       `-----------------'              `-----------------'

   Mouse         Usual //c, IIc+ Game Port Function

1  MOUSE ID      Pushbutton 1
2  +5V           +5V
3  GND           GND
4  XDIR          no Game Port function on //c, IIc+;
                 this TTL-compatible input can be read at $C066
5  XMOVE         Game Control 0 or PDL0 (Joystick X-axis)
6  n.c.          (no Game Port function on //c, IIc+)
7  MOUSE BUTTON  Pushbutton 0
8  YDIR          Game Control 1 or PDL1 (Joystick Y-axis)
9  YMOVE         no Game Port function on //c, IIc+;
                 this TTL-compatible input can be read at $C067


From: David Empson

027- How do I write programs which use the mouse?

The assembly language interface to the mouse firmware is documented in
three places:

- the reference material that was supplied with the AppleMouse card for
the IIe.

- the IIc Technical Reference Manual.

- the IIgs Firmware Reference Manual.

Interfacing to the mouse is somewhat complicated, especially if you want
to implement some kind of mouse cursor (usually requires writing an
interrupt handler).

The first problem is locating the mouse firmware.  It could be in any
slot for a IIe or IIgs, or either of two slots for the IIc.  The safest
method is just to do a slot search, looking for the mouse ID bytes:

$Cn05 = $38
$Cn07 = $18
$Cn0B = $01
$Cn0C = $20
$CnFB = $D6

On a ROM 3 IIgs, it is possible that the mouse firmware will not be
available, because this doesn't prevent the use of the mouse from GS/OS
(the Miscellaneous Toolset or Event Manager can still be used). An
AppleMouse card, if installed, is not used by the toolbox.

On a ROM 1 IIgs, the slot mouse firmware is used by the toolbox, so slot
4 must be set to "Mouse Port", or an AppleMouse card may be installed in
any slot.

Using the mouse firmware consists of calling the various parameters
provided by the firmware.  An entry point table is provided in the mouse
slot.  The routines common to all implementations are:

$Cn12    SETMOUSE      Sets mouse mode
$Cn13    SERVEMOUSE    Services mouse interrupt
$Cn14    READMOUSE     Reads mouse position
$Cn15    CLEARMOUSE    Clears mouse position to 0 (for delta mode)
$Cn16    POSMOUSE      Sets mouse position to a user-defined pos
$Cn17    CLAMPMOUSE    Sets mouse bounds in a window
$Cn18    HOMEMOUSE     Sets mouse to upper-left corner of clamp win
$Cn19    INITMOUSE     Resets mouse clamps to default values;
                       ets mouse position to 0,0

Each of the above locations contains the low byte of the entry point for
the routine.  The high byte is $Cn.  The usual method for calling these
routines is to set up a single subroutine which is patched with the
location of the appropriate routine as required.  You could also set up
a series of subroutines for calling each routine.

The general logic would be as follows:

Locate the mouse slot by searching for the ID bytes described earlier.
Patch the slot into the following routine:

TOMOUSE  LDX #$C1   ; Patch operand byte with slot in $Cn form
         LDY #$10   ; Patch operand byte with slot in $n0 form
         JMP $C100  ; Patch high byte of operand with slot in
                    ; $Cn form.  Low byte of operand must be
                    ; patched with entry point from table above

You should also set up a pair of locations on zero page containing
$Cn00, which will be used to look up the table.  You can then have code
as follows to call each of the routines:

MOUSEPTR EQU $00    ; (or some other pair of zero page locations)

         LDY #$12      ; Offset to entry point
         BNE GOMOUSE   ; Go to the mouse routine - always taken

         LDY #$13      ; Offset to entry point
         BNE GOMOUSE   ; Go to the mouse routine - always taken

[etc. - one routine for each mouse call you will be using]

GOMOUSE  TAX               ; Preserve the value in A
         LDA (MOUSEPTR),Y  ; Get the routine entry point
         STA TOMOUSE+5     ; Patch the JMP instruction
         TXA               ; Restore the value in A

; The following operand bytes must be patched by the
; initialization code which detects the mouse.

TOMOUSE  LDX #$C1          ; Set up slot in $Cn form in X
         LDY #$10          ; Set up slot in $n0 form in Y
         JMP $C100         ; Go to the mouse routine

With code like the above, your program can just use JSR INITMOUSE, etc.
to call the appropriate routine.

The mouse routines make use of screen holes for the slot containing the
mouse interface firmware/card.  The screen holes are as follows:

$0478 + slot        Low byte of absolute X position
$04F8 + slot        Low byte of absolute Y position
$0578 + slot        High byte of absolute X position
$05F8 + slot        High byte of absolute Y position
$0678 + slot        Reserved and used by the firmware
$06F8 + slot        Reserved and used by the firmware
$0778 + slot        Button 0/1 interrupt status byte
$07F8 + slot        Mode byte

You can access the screen holes by getting the mouse slot number in the
$Cn form (LDX TOMOUSE+1), then indexing off the above locations minus
$C0 with X (or just AND the value with $0F and use the base addresses

The screen holes should be used only as specified by the mouse routines
below. You should never write to them, except as specified by POSMOUSE.

The interrupt status byte is defined as follows:

Bit 7 6 5 4 3 2 1 0
    | | | | | | | |
    | | | | | | | \---  Previously, button 1 was up (0) or down (1)
    | | | | | | \-----  Movement interrupt
    | | | | | \-------  Button 0/1 interrupt
    | | | | \---------  VBL interrupt
    | | | \-----------  Currently, button 1 is up (0) or down (1)
    | | \-------------  X/Y moved since last READMOUSE
    | \---------------  Previously, button 0 was up (0) or down (1)
    \-----------------  Currently, button 0 is up (0) or down (1)

(Button 1 is not physically present on the mouse, and is probably
only supported for an ADB mouse on the IIgs.)

The mode byte is defined as follows.

Bit 7 6 5 4 3 2 1 0
    | | | | | | | |
    | | | | | | | \---  Mouse off (0) or on (1)
    | | | | | | \-----  Interrupt if mouse is moved
    | | | | | \-------  Interrupt if button is pressed
    | | | | \---------  Interrupt on VBL
    | | | \-----------  Reserved
    | | \-------------  Reserved
    | \---------------  Reserved
    \-----------------  Reserved

The button and movement status are only valid after calling READMOUSE.
Interrupt status bits are only valid after SERVEMOUSE and are cleared by
READMOUSE.  The appropriate screen hole information must be copied
elsewhere before enabling interrupts with CLI or PLP.

The routines are used as follows.  X and Y must be set up with $Cn and
$n0 in all cases.  Interrupts must be disabled before calling any of
these routines. Assume all registers are scrambled on exit unless
otherwise noted.


          Sets mouse operation mode.

   Entry: A = mouse operation mode ($00 to $0F) - see mode byte.

   Exit:  C = 1 if illegal mode entered.
          Screen hole mode byte is updated.


          Tests for interrupt from mouse and resets mouse's
          interrupt line.

   Exit:  C = 0 if mouse interrupt occurred.
          Screen hole interrupt status bits are updated to show
          current status.


          Reads delta (X/Y) positions, updates absolute X/Y pos,
          and reads button statuses from the mouse.

   Exit:  C = 0 (always).
          Screen hole positions and button/movement status bits are
          updated, interrupt status bits are cleared.


          Resets buttons, movement and interrupt status 0.
         (This routine is intended to be used for delta mouse
          positioning instead of absolute positioning.)

   Exit:  C = 0 (always).
          Screen hole positions and button/movement status bits are
          updated, interrupt status bits are cleared.


          Allows caller to change current mouse position.

   Entry: Caller places new absolute X/Y positions directly in
          appropriate screen holes.

   Exit:  C = 0 (always).
          Screen hole positions may be updated if necessary (e.g.


          Sets up clamping window for mouse user.  Power up default
          values are 0 to 1023 ($0000 to $03FF).

   Entry: A = 0 if entering X clamps, 1 if entering Y clamps.

          Clamps are entered in slot 0 screen holes as follows.
          NOTE: these are NOT indexed by the mouse slot number.

          $0478 = low byte of low clamp.
          $04F8 = low byte of high clamp.
          $0578 = high byte of low clamp.
          $05F8 = high byte of high clamp.

   Exit:  C = 0 (always).
          Screen hole position is set to top left corner of clamping
          window for the IIgs.

   Note:  The IIgs automatically homes the mouse when this call is
          made, but this doesn't happen for the IIc and AppleMouse


          Sets the absolute position to upper-left corner of
          clamping window.

   Exit:  C = 0 (always).
          Screen hole positions are updated.


          Sets screen holes to default values and sets clamping win
          to default value of 0 to 1023 in both X and Y directions,
          resets hardware.

   Exit:  C = 0 (always).
          Screen holes are updated.

The general method of using the mouse firmware is as follows:

- Call SETMOUSE specifying a mode of 1 (enabled, no interrupts).
- Call CLAMPMOUSE to set up the required clamps (once per ea axis).
- If necessary, call SETMOUSE again with the actual mode you want.
  You must set up a ProDOS interrupt handler if you want to use the
  interrupt modes.

If you are using polled mode, call READMOUSE as required to update the
mouse position and button status information.

If you are using interrupt mode, your interrupt handler should call
SERVEMOUSE to check for a mouse interrupt.  If none occurred, return to
ProDOS with C=1. If one did occur, note the type of interrupt (if
necessary), then call READMOUSE to the new position information, and
copy the data elsewhere.  Finally, return to ProDOS with C=0.

When your program is finished, it should disable the mouse by using
SETMOUSE with A=0, and remove the interrupt handler (if necessary).