[comp.sys.amiga.tech] More answers about 2000 keyboard on a 500

davidc@pyr.gatech.EDU (David Carter) (11/11/89)

[Subject was: 2000 kbd to 500]

In article <3604.AA3604@slaka.sirius.se> micke@slaka.sirius.se (Mikael
Karlsson) writes:
>Question: How does the A2000 detect a reset?  Is there any HW involved?
When you hold Ctrl-A-A on the 2000 keyboard and release any of the three keys,
the keyboard sends a special keycode that "requests" a reset.  This is
intended to allow the 2000 to finish up things like disk writes.  However
if the keyboard doesn't receive the acknowledgement after about a second,
it pulls down the KBCLOCK line which causes hardware in the 2000 to yank the
reset line to the 68000.  This is a fail-safe, in case the 2000 is too
confused to answer.

>You can't do a 3-finger reset [on a 2000 keyboard attached to an A500].
Add transistor Q1 (type 2N3904) to the 2000 keyboard and you'll have it.
See my previous posting, or email for details.

This transistor causes the keyboard to immediately yank the reset line to
the 68000 as soon as all three keys are pressed.  It also resets the
keyboard processor.

So an UNMODIFIED 2000 keyboard on an A500 will not cause a reset because the
500 ignores the "reset" keycode, and the keyboard does not yank the reset
line (pin 3).  And an UNMODIFIED 500 keyboard on a 2000 will not cause a
reset because pressing ctrl-A-A immediately resets the keyboard's CPU
before it has a chance to send out the "reset" keycode; in fact, after the
500 keyboard "re-awakens," the A2000 thinks those three individual keys are
still pressed!  So "A" comes out as "ctrl-A", "N" and "M" will switch
windows, etc. until you press and release each of the three keys.

>Is there a difference in the ROMs between the A500 and the A2000?
I've been told that there is a difference in the keyboard ROMs, but after
hooking up a 500 keyboard to a 2000 (and removing the transistor mentioned
above) it functions the same as a "real" 2000 keyboard.  And since the same
1.3 ROM and disk is sold for both machines, the code on the Amiga side is
identical.

[The reason it took me so long to post this followup is because I had to go
back and reconfirm what I thought I had observed a year ago: Press ctrl-A-A
on the 500 keyboard (with the transistor removed) connected to an A2000 and
the reset happens immediately -- caused by the "reset" keycode.  But when I
disconnect the KBDATA line, preventing the keyboard from seeing the A2000's
acknowledgement, the reset happens about 0.75 seconds later -- when the
KBCLOCK line gets pulled down.]

Questions I still haven't answered:
    What causes the A500 to NOT respond to the "reset" keycode?  Is there
    conditional code somewhere that says "If I'm a 500, then I'll ignore
    this keycode"?  Does it show up as a rawkey in either machine?  Where
    should I look to find out more about this?


>Why did I have to swap KBDATA and KBCLOCK?  Have I done anything wrong?
The A500 schematics are wrong; they show pins 1 and 2 reversed.  How could
I tell for sure?  On the 8520 chip, pin 40 is the clock input that clocks
the data into pin 39.

>Would it be possible to connect both keyboards at the same time?
I hadn't thought about this.  It would be tricky, since the keyboard provides
the clock signal, and the data line is actually bi-directional (the Amiga
sends back acknowledgements to the keyboard).  If a keyboard ignores ack's
when it's not expecting them, and if you never tried to type on both keyboards
simultaneously, I think you could actually "OR" two keyboards into one Amiga.

>Where can I find a specification of the data sent from the keyboard?
The Amiga Hardware Manual (1985, the original one for the 1000) lists the
codes, which still apply to the corresponding keys on the 500/2000.
The new Amiga Hardware Reference Manual (1989, Addison-Wesley, for 1000,
500, 2000) includes the codes for the new keys on the 500/2000 as well.


David Carter		davidc@pyr.gatech.edu