[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Q-Drive 40 Mb SCSI ID?
Previously wsquires@lonestar.utsa.edu (William H. Squires) wrote:
>
> 2) Does anyone have the techie specs for both the ADB bus (especially
> concerning the uP used in the std GS keyboard) and the IBM-style
> keyboards. I'm pretty sure both use serial comm protocols, but I'm not
> sure about much else. I want to make a set of videogame 'controllers'
> like nintendo or sega, but I want each to chain on the ADB port...
>
> ...of 'mini' keyboards with the keys laid out in a control diamond, with
> two extra keys user programmable (hardware or software; I don't know
> yet) for 'fire' buttons. Has anyone else already done this? If not, is
> anyone interested? Can I even make such a product, or does Apple hold
> the (C) on the ADB bus/devices? Could I make it using different
> hardware?
[I didn't see the original posting with this question, so I've
extracted this part from Herbert Fung's reply.]
There is sufficient documentation on the Apple Desktop Bus protocols
and hardware interface in the IIgs Firmware Reference and IIgs
Hardware Reference manuals. Refer also to the ADB Toolset in TB Ref
Volume 1 (and the additional information in Volume 3). There may be
some additional useful information in the Event Manager chapters.
There is further useful information about the keyboard registers and
software interface in Volume V of Inside Macintosh.
Apple seem to have a strange attitude to ADB. On the Macintosh, they
regard it as a "trade secret" - you have to go to some trouble to get
information about the ADB hardware specs. Despite that, they're
printed for all to see in the IIgs reference manuals!
In short, the ADB bus uses three wires: power, ground and data. The
computer acts as a bus master, and all ADB devices can only respond to
messages from the computer (this is why you can't plug two computers
onto the same bus - their polls would collide). The bus is
open-collector. Data is encoded using pulse width modulation: the
pulse width distinguishes between zero and one bits. Addresses are
assigned dynamically (standard devices start out with a fixed address,
and can be reassigned through a collision detection mechanism, which
allows you to plug in multiple keyboards and distinguish between them
from specially written software).
I don't know what CPU the keyboard uses (I haven't opened mine up for
a while). I don't think the mouse uses a CPU - its address is
hard-wired and it has fixed responses.
I'm not familar with the exact mechanism used by IBM keyboards, but it
shouldn't be too hard to find out. I think the CPU used is usually an
8051 or equivalent. The protocol uses TTL-level signals, with a data
and clock line. I don't know if it has start bits, as such.
In an IBM XT (or clone) the data is unidirectional - the keyboard sends
8-bit "make" and "break" codes to the computer, where they cause an
interrupt. Bit 7 distinguishes between the two signals, and the lower
bits contain the keyboard scan code (there is a table of these in the
reference manual for many clones). An extended keyboard on an XT will
generate the Caps Lock/Num Lock/Scroll Lock lights itself, which means
it is possible to get them out of sync with the computer!
In an IBM AT (or clone), the data is bidirectional. The indicator
lights are controlled from the computer, but I don't know what else is
sent to the keyboard.
--
David Empson
dempson@swell.actrix.gen.nz
Snail mail: P.O. Box 27-103, Wellington, New Zealand