]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - ADB.txt
integrate V-USB support into ps2_usb
[max/tmk_keyboard.git] / ADB.txt
diff --git a/ADB.txt b/ADB.txt
index b98cf6761003ec96a9681ff94fa4809b3424d0fd..63005b3dda798326642462ee9dab6a73cbe54855 100644 (file)
--- a/ADB.txt
+++ b/ADB.txt
@@ -3,11 +3,14 @@ ADB Protocol
 
 Resources
 ---------
+ADB - The Untold Story: Space Aliens Ate My Mouse
+    http://developer.apple.com/legacy/mac/library/#technotes/hw/hw_01.html
 Apple IIgs Hardware Reference Second Edition [p80(Chapter6 p121)]
     ftp://ftp.apple.asimov.net/pub/apple_II/documentation/Apple%20IIgs%20Hardware%20Reference.pdf
 ADB Keycode
     http://72.0.193.250/Documentation/macppc/adbkeycodes/
     http://m0115.web.fc2.com/m0115.jpg
+    [Inside Macintosh volume V, pages 191-192]
 ADB Signaling
     http://kbdbabel.sourceforge.net/doc/kbd_signaling_pcxt_ps2_adb.pdf
 ADB Overview & History
@@ -20,11 +23,24 @@ AVR ATtiny2131 ADB to PS/2 converter(Japanese)
 
 Pinouts
 -------
-    Female socket from the front
+    ADB female socket from the front:
+    __________
+    |        | <--- top
+    | 4o  o3 |
+    |2o    o1|
+    |   ==   |
+    |________| <--- bottom
+      |    |   <--- 4pins
 
-      4o  o3
-     2o    o1
-        ==
+
+    ADB female socket from bottom:
+
+    ========== <--- front
+    |        |
+    |        |
+    |2o    o1|
+    |4o    o3|
+    ---------- <--- back
 
     1: Data
     2: Power SW(low when press Power key)
@@ -32,6 +48,7 @@ Pinouts
     4: GND
 
 
+
 Commands
 --------
     ADB command is 1byte and consists of 4bit-address, 2bit-command
@@ -61,9 +78,9 @@ Commands
     3:  mice
 
     Registers:
-    0: application(keyobard/mice use to store its data.)
+    0: application(keyobard uses this to store its data.)
     1: application
-    2: application
+    2: application(keyboard uses this for LEDs and state of modifiers)
     3: status and command
 
 
@@ -111,15 +128,17 @@ Communication
     keep low for 300us to request.
 
 
-Keyboard data(register0)
-    This 16bit data can contains 2 keycodes and 2 released flags.
-    First keycode is palced in upper nibble. When one keyocode is sent,
-    lower nibble is 0xFF.
+Keyboard Data(Register0)
+    This 16bit data can contains two keycodes and two released flags.
+    First keycode is palced in upper byte. When one keyocode is sent,
+    lower byte is 0xFF.
     Release flag is 1 when key is released.
 
-    15 14 . . . . . 8 7 6 . . . . . 0
-    |  |keycode1      | |keycode2
-    |released(1)      |released(1)
+    1514 . . . . . 8 7 6 . . . . . 0
+     | | | | | | | | | +-+-+-+-+-+-+-   Keycode2
+     | | | | | | | | +---------------   Released2(1 when the key is released)
+     | +-+-+-+-+-+-+-----------------   Keycode1
+     +-------------------------------   Released1(1 when the key is released)
 
     Keycodes:
     Scancode consists of 7bit keycode and 1bit release flag.
@@ -131,4 +150,24 @@ Keyboard data(register0)
     the switch has a special scancode 0x7F7F, so you can
     also read from Data line. It uses 0xFFFF for release scancode.
 
+Keyboard LEDs & state of keys(Register2)
+    This register hold current state of three LEDs and nine keys.
+    The state of LEDs can be changed by sending Listen command.
+    
+    1514 . . . . . . 7 6 5 . 3 2 1 0
+     | | | | | | | | | | | | | | | +-   LED1(NumLock)
+     | | | | | | | | | | | | | | +---   LED2(CapsLock)
+     | | | | | | | | | | | | | +-----   LED3(ScrollLock)
+     | | | | | | | | | | +-+-+-------   Reserved
+     | | | | | | | | | +-------------   ScrollLock
+     | | | | | | | | +---------------   NumLock
+     | | | | | | | +-----------------   Apple/Command
+     | | | | | | +-------------------   Option
+     | | | | | +---------------------   Shift
+     | | | | +-----------------------   Control
+     | | | +-------------------------   Reset/Power
+     | | +---------------------------   CapsLock
+     | +-----------------------------   Delete
+     +-------------------------------   Reserved
+
 END_OF_ADB