ADB Keyboard

I have an old Apple ADB Keyboard... anyone know how to hook it up? I saw the PS/2 library, but that wasn't much help.

I have been working on ADB, but its kind of a pita and has taken a back burner, I have nothing useful at the moment

Last time I looked for info on ADB, I couldn't find anything useful...

Thanks to all of you for your advice.. I think I'll stick with an old PS/2 keyboard.

That would account for the dearth of data.

???
Lots available google ADB hacking and data from Apple

An overview of the ADB can be found here:-

See also:-

Finally here is an application note describing the protocol and flow diagram for an ADB PIC emulator.
http://www.eetasia.com/ARTICLES/2000JUN/2000JUN02_CT_AN8.PDF

The Apple crowd aren't much into hacking.They are mostly appliance users.

and arduino users only know how to toggle a LED, in fact my metropolitan area I know a small group of mac hackers, and I am the only one that I know of that uses an arduino

And Mac is a single-source (read:monopoly) closed world. That would account for the dearth of data.

anything pre jobs return is very openly documented, and if its not on apples own website the documentation is often endorsed by apple, and this is not some "after the fact" thing most of the documentation was regularly kept up to date when it was new

But apparently you will still have to work out what all the codes are for each key down and key up. Nobody seems to have documented that.

no you just don't understand the protocol

here are the hex codes to an extended keyboard

http://72.0.193.250/Documentation/macppc/adbkeycodes/

and here is the packet structure for keyboard devices

notice there is a bit flag for released, ADB does not use 2 different keycodes for each key like ps/2

I have not delt with "faking" a ADB host, what I was doing was making a ps/2 to ADB adapter, dealing with apple ADB host is a bit of a PITA cause of the single wire bidirectional serial protocol and the fact that the extreamly tight but very loose timing specs would vary from generation to generation (and since its single wire you have to be johnny on the spot with timing)

If I had a ADB keyboard (actually one is in the mail) I imagine it would be pretty easy to host from an arduino, if one understands the protocol

after the project I am working on is over I will try to do it with the mouse I have, and hopefully by then my keyboard will have arrived

which null's the original project in the first place, but heck I have an arduino already kinda acting like a slave device anyway, might as well do something with it

considering ADB was killed back in 1999 I fail to see why anything current would matter in this discussion

and most everything post 1999 is USB, firewire (which is openly documented), PPC based units which is openly documented, especially in its quirks, and post that its a intel PC with open source sun firmware

does apple really need to document a x86 pc, sata and pci-e vga, with a usb keyboard?

PS: for the record I am not really an apple fan, I have 3 pc's and a xbox, for my apple collection I have a 1984 apple //c and a 1986 mac SE

so dont think I am getting all fanboi on you

anything pre jobs return is very openly documented

Jobs was around for the Apple 1, right? That doesn't leave much! :slight_smile:
(but Apple has certainly swung back and forth WRT how mod-friendly vs "closed" their products are. The current powermacs are wonders of easy expandability, while the original Macs were responsible for introducing "long bladed Torx drivers" to many a toolbox.)

Lots available google ADB hacking and data from Apple

An overview of the ADB can be found here:-
Apple Desktop Bus - Wikipedia

A rather brief overview. "The decoding transceiver ASIC was available only by request." Pretty far from a protocol specification...

See also:-
Silly Hardware Hacks
Apple Adjustable Keyboard USB Hack | Hackaday

Both of which are projects that seem to consist of ripping out the ADB guts of an apple product and replacing them with something more modern (USB)

Finally here is an application note describing the protocol and flow diagram for an ADB PIC emulator.
http://www.eetasia.com/ARTICLES/2000JUN/2000JUN02_CT_AN8.PDF

And this is about the only thing I've ever seen about getting a microcontroller to talk ADB...

Whatever. You need to have a pretty compelling reason to want to go to much trouble to support an "ancient" and comparatively complex protocol when you can pick up a PS/2 keyboard for less than $10...

aye, my drift with dealing with it in the first place is EBAY pirates want at least 15$ + 20$ shipping for some ratty old yellow keyboard with snot on it

I pick up really nice feeling ps/2 keyboards for 25 cents at the thrift store

in my case I kind of need a ADB keyboard to use my SE, but I happened to work out a deal with a vintage mac community member for peanuts before finishing my project

comparatively complex protocol

its actually easier to implement than ps/2 as far as whats going on, and its capabilities ... if you mind piecing the puzzle together from about 2 dozen documents, which is why I have a 3 ring binder full of nothing but ADB snippets

oh and that pdf from microchip, has the timings wrong, it would not work with anything older than a beige G3, and that is pushing it

Hey there, yes, someone (me) does want to interface ADB with an Arduino. Not a mouse or a keyboard -- but a large (12x18) Wacom tablet. Wacom products are just over-expensive and I happen to have a fully working ADB one in my hands.

Mind you, I am only asking about the ADB signaling part -- not the Wacom protocol, HID stuff or whatever else.

I was reading that Microchip app note (the only piece of info with enough details about the ins and outs of ADB that I can find.)

You mentioned that the timings are off -- Do you think we can find some info about the "good" timings then? (other than looking at the scope -- which I will do anyway mind you).

Onto another note: Where/how could I get the "Tool Chest" sdk thingy from Apple? In particular, I am looking for the "ADB Analyzer" -- they use to have it on their FTP until fairly recently.

well (I dont have my notes in front of me) the microchip example note should be ok for emulating a ADB host device its the other way around that would not work as the ADB signal timing is based on clock speed in all pre power pc model computers

for what I consider valid timings you need to go back to the first computer that had ADB, the apple //GS, and since its a woz design its documented, look at

ftp://ftp.apple.asimov.net/pub/apple_II/documentation/Apple%20IIgs%20Hardware%20Reference.pdf

all your usual and you should know info starts on page 76 and the timing ranges are on page 80 under table 6-8

as you can see most of the inporatant bits are based on percentages of whatever speed the clock is running at within ranges, the microchip application note hard codes these values, but again its nothing that should effect emulating a host device with a microcontroller

Oh wow!

You're a gem Osgeld! :slight_smile: Steve Wozniak is quite thorough indeed.

Yes, you got it right: I want to emulate an "ADB host" -- and only for a single device -- which is far easier.

I would very much like to see a dump of the ADB data to verify that I am reading this bus correctly (I have a Mac Classic II in a box somewhere in the basement). That is why I am looking for the ADB Analyzer (or any other tool that could do that from within the mac). I will have a little bit of reverse-engineering to do on the protocol and using the scope to check all the packets is going to be a pain.

background: I know a little bit of the protocol for the serial version of the Wacoms. I am pretty sure the same packets are just "tunneled" through ADB, but I have to discover how. I have the imateosx opensource project that deals with the griffin imate and Wacom tablets. So with all that knowledge bits I hope it will be straightforward to "connect the dots". :stuck_out_tongue:

I dont know how wacom did it, but there is a ID built into ADB for absolute pointing devices (tablets) so it may just be using that data format (which is the same as relative ie mouses devices in structure, but instead of change its hard coordinates)

I think I might have some adb sniffing poking software, I will have to check my windows drive tomorrow, though I know I dont have that exact title so if you find it let me know :slight_smile:

If the Apple keyboard is valuable and practically undocumented, and a PS2 PC keyboard is a throwaway item (I have 2 you could have here) and well documented, the way forward to me at least is obvious. :slight_smile:

Filename wise, this is what I was looking for: (That's Mac software obviously).

ADB_Analyzer_1.06D6.sit which was located here:

ftp://ftp.apple.com/developer/Tool_Chest/Devices_-_Hardware/Apple_Desktop_Bus/ADB_Analyzer_1.0D6.sit.hqx

If the Apple keyboard is valuable and practically undocumented,

they are only valuable on ebay ... wasnt long ago one could pick up the extended keyboards with mechanical switches for a song and a dance

and the keyboard is the most documented part of ADB, just no one has make a nice little lib for it (yet)

bernard_: Ill see what I can dig up

plop

http://cheesefactory.us/filecenter/apple/ADB_Analyzer_1.0d6.sit

thanks for finding the file!

I contacted the "imateosx project" guy (simon stapleton/tufty) and he replied me today with a lot of info and files on ADB. :smiley: In addition to emailing me, he also signed up on forum.bongofish.co.uk (where I am an admin).

fyi, here's the topic:
http://forum.bongofish.co.uk/index.php?topic=1738.0