Subject: Re: Keystone Interface (ADB)
To: None <mcmahill@alum.mit.edu>
From: Colin Wood <cwood@ichips.intel.com>
List: port-mac68k
Date: 12/01/1997 23:50:11
Dan McMahill wrote:
> 
> 
> I have a Kinesis Keyboard (PC keyboard) which I connect
> to my Mac IIci with a PC->ADB converter box made by
> Silicon Valley Bus Co.  The converter is a "Keystone
> - Macintosh ADB Interface for PC Keyboard and Mouse".

Interesting....
 
> For the most part, it works fine, but there are a few
> minor (but annoying) problems.
> 
> 1)  The page up/down, home, and end keys don't work.
>     In fact a little test program which used getchar()
>     and then prints the code on the screen shows nothing
>     being generated by those keys.
> 
> 2)  Same for function keys
> 
> 3)  There is a "keypad" key which when pressed activates the
>     numerical keypad (which shares keys with jkluiom,.).
>     This key seems inactive.

Sounds like the default keyboard driver doesn't handle some of this
device's keycodes....

> 4)  If I run xdm, I get "phantom" key presses if I type faster 
>     than about 20-30 words per min.  For example, I might get
>     "thte" when typing "the" (I'm sure its not me).

Probably some kind of buffering problem, maybe the keyup/keydown sequences
aren't being registered properly.

> 
> Anyway, here's what I know:
> 
> A)  I get the same behaviour under MacOs when booting _without_
>     extensions.

Ah, well, this is pretty much the way NetBSD works :-)

> B)  If I boot with the Keystone Control control panel, then those
>     keys work as desired.

Well, all we have to do is figure out how the control panel works, then
:-)

> C)  Silicon Valley Bus Co, will provide a library under MacOs to allow
>     you to write code to directly access some of the extra I/O lines
>     on their box.

Extra?  On which side?  Do you mean extra registers?

> D)  I saw something in the manual which makes me think the main feature
>     of their driver is to load some registers in the converter box on
>     power up.

Probably so.  If it's an ADB device, it can do whatever it wants with
registers 1 and 2.

> E)  They have ignored my requests for more info.
> 
Not surprising :-)
> 
> Some of what I don't know (and would like suggestions on) is:
> 
> a)  Where do I even begin to try and make this work right?

Download a copy of ADB Parser 5.0.7 from dev.apple.com (it's somewhere in
the devworld/Tool_Chest/ hierarchy, I think).  Get a copy of ResEdit with
the code editor extensions, and get a copy of MacsBug.  Then you need to
start figuring out how the driver behaves under NetBSD vs. under MacOS.

> b)  Is there a way to find out what their driver loads on power up
>     and make NetBSD do it to?

Hopefully, yes.  First, how does the device show up under NetBSD?  Does it
show up as a keyboard and a mouse?  Do they have any strange parameters?
Does it show up as any other kind of device?

Using ADB Parser, how does the device report itself?  What is it's default
(original) ADB address and device handler?  What are the ADB address and
device handler with and without the control panel enabled?

Using ResEdit's code editor, you'll probably want to take a look at the
INIT code in the control panel.  This might give you a handle on what the
driver is doing, especially if it communicates like a standard ADB device
(i.e. using the ADBOp command).

You might also want to read the appropriate TechNotes and chapter of
Inside Mac Devices for more info.

Hopefully, the above will give you a bit of a starting point.

I hope this helps.

Later.

-- 
Colin Wood                                 cwood@ichips.intel.com
Component Design Engineer - MD6                 Intel Corporation
-----------------------------------------------------------------
I speak only on my own behalf, not for my employer.