]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - converter/ibm4704_usb/ibm4704.txt
ibm4704_usb: Fix scan code range for Alps 102-key
[max/tmk_keyboard.git] / converter / ibm4704_usb / ibm4704.txt
index c17d172af1dc5b0652c45a8dc3ac0979972a5ad3..73c8a3b9ff2bf3a1fc014237e91ff97675ab1555 100644 (file)
@@ -1,10 +1,16 @@
-4704 Keyboard
-=============
-Keyboard Models:
-    Model 100 6019273 50-key (grid layout)
-    Model 200 6019284 62-key Alpha(60% layout)
-    Model 300 6019303 77-key Expanded Alpha
-    Model 400 6020218 107-key Full key
+IBM 4704 Keyboard
+=================
+IBM capacitive switch models:
+    6019273 Model 100 50-key (grid layout)      http://kishy.ca/?p=894
+    6019284 Model 200 62-key Alpha(60% layout)  http://kishy.ca/?p=894
+    6019303 Model 300 77-key Expanded Alpha     http://deskthority.net/photos-f62/ibm-6019303-t8502.html
+    6020218 Model 400 107-key Full key          http://kishy.ca/?p=894
+
+Alps switch(vintage Green) models:
+    5954339 Japanese 102-key    http://deskthority.net/post87127.html#p87127
+    6112883 Japanese 102-key    http://geekhack.org/index.php?topic=52888.msg1194489#msg1194489
+    6112884 Japanese 102-key    http://geekhack.org/index.php?topic=50437.msg1193047#msg1193047
+    6341739 Chinese 102-key     http://geekhack.org/index.php?topic=52888.msg1176566#msg1176566
 
 Resourse
 --------
@@ -16,11 +22,19 @@ http://ed-thelen.org/comp-hist/IBM-ProdAnn/4700.pdf
 
 
 
-4704 Keyboard Protocol
-======================
-On powering up the keyboard sends keyboard id; A3h for 6019284(62-key), for example.
-After that firmware enters FC command mode and waits for parameter data from host
-so that it doesn't send any scancode until you send 'FF'(End of FC command).
+IBM 4704 Keyboard Protocol
+==========================
+On powering up keyboard sends keyboard ID; A3h for 6019284(62-key), for example.
+After that the keyboard enters FC command mode and waits for parameter data from host
+so that it doesn't send any scancode until you send 'FF'(End of FC command mode).
+
+    Keyboard                    ID
+    -------------------------------
+    Model 100 50-key            A2h
+    Model 200 62-key            A3h
+    Model 300 77-key            A4h
+    Model 400 107-key           A5h
+    Japanese/Chinese 102-key    A6h
 
 
 Connector
@@ -43,15 +57,15 @@ Keyboard to Host
 ----------------
 Data bits are LSB first and Pairty is odd. Clock has around 60us high and 30us low part.
 
-            ____      __   __   __   __   __   __   __   __   __   ________
-    Clock       \____/  \_/  \_/  \_/  \_/  \_/  \_/  \_/  \_/  \_/
+            ____       __   __   __   __   __   __   __   __   __   _______
+    Clock       \_____/  \_/  \_/  \_/  \_/  \_/  \_/  \_/  \_/  \_/
                  ____ ____ ____ ____ ____ ____ ____ ____ ____ ____    
     Data    ____/    X____X____X____X____X____X____X____X____X____X________
                 Start   0    1    2    3    4    5    6    7    P  Stop
 
 Start bit:  can be long as 300-350us.
 Inhibit:    Pull Data line down to inhibit keyboard to send.
-Timing:     Host reads bit while Clock is hi.
+Timing:     Host reads bit while Clock is hi.(rising edge)
 Stop bit:   Keyboard pulls down Data line to lo after 9th clock.
 
 
@@ -113,30 +127,41 @@ NOTE: When break code is enabled the key sends scancode with setting 7th bit on
 and without it on release. That is, '`' sends 80h on press and 00h on release.
 
 
-keyboard command
+Keyboard command
 ----------------
-    FF  Soft Reset(0008h)
-    FE  Resend(00e8h)
-    FD  Buzzer stop?(00edh)
-    FC  Set Key flag(00f6h)
-    FB  Soft Reset(0008h)
-    FA  Reset(0000h)
+Keyboard accepts these commands from host.
+
+        Description                             Entry point
+    -----------------------------------------------------------
+    FF  Soft Reset                              0008h
+    FE  Resend                                  00e8h
+    FD  Buzzer(emits a short beep)              00edh
+    FC  Set Key Flag                            00f6h
+    FB  Soft Reset                              0008h
+    FA  Reset                                   0000h
     
 
 Keyboard response
 -----------------
-    FF  Not exist. [Outgoing buffer cannot have FFh(00h in fact)]
-    FE  Overflow(key event/receive data)        at 00c5h, 0346h
-    FE  Memory test error                       at 0224h
-    FD  Command out of bound                    at 00d8h
+Keyobard sends these bytes to host.
+
+        Description                             Entry point
+    -----------------------------------------------------------
+    FE  Overflow(key event/receive data)        00c5h, 0346h
+        Memory test error                       0224h
+    FD  Command out of bound                    00d8h
         Key out of bound
-    7E  Read/Parity error in receive from host  at 00bch
+    7E  Read/Parity error in receive from host  00bch
+    80-FB? scan code(make)
+    00-7B? scan code(break)
+    note: Alps model spits scan code 7B(FB) at least.
 
 
-Set Key flag command(FC)
+Set Key Flag command(FC)
 ------------------------
 After 'Power on Reset' firmware enters this command mode and waits for data from host,
 so that you don't need to send 'FC' and it doesn't send any scancode until you send 'FF'.
+With Alps models you need to send 'FC' command to enter this mode.
 
 Data sent from host:
 
@@ -145,16 +170,17 @@ Data sent from host:
          |   `-----`--- scan code
          `------------- enable bit(0: enable repeat, 1: enable break)
 
-    00-77   Enable repeat(78-7F: invalid scancode)
-    80-F7   Enable break(F8-FF: invalid scancode)
+    00-7B?  Enable repeat
+    80-FB?  Enable break
     FE      Resend(011ah) no need to use
     FF      End(0114h) exits FC command mode.
 
 Response from keyboard:
     FD      Out of bound - Invalid scancode
+    --      OK - No response means that command is accepted.
 
 Examples:
     To enable break code of all keys.
 
-    FC 80 81 ... F7 FF
+    FC 80 81 ... FB FF