]> git.friedersdorff.com Git - max/tmk_keyboard.git/blob - converter/pc98_usb/README
pc98_usb: Fix scan code description
[max/tmk_keyboard.git] / converter / pc98_usb / README
1 PC98 to USB keyboard protocol converter
2 =======================================
3 Target MCU is ATMega32u2 but other USB capable AVR will also work.
4
5
6 Connector
7 ---------
8 On host/converter:
9
10     8Pin mini DIN
11        ___ ___
12       /  |_|  \
13      / 8  7  6 \
14     | 5    4  3 |
15      \_ 2   1 _/
16        \_____/
17      (receptacle)
18
19
20 Wiring: You can change this with editing config.h.
21
22     Pin mini DIN        MCU
23     ----------------------------------
24     1  ~RST(TXD)        PD3
25     2   GND             GND
26     3  ~RDY             PD4
27     4   RXD             PD2
28     5  ~RTY             PD1
29     6   NC
30     7   NC
31     8   5V              VCC
32
33
34
35
36 Protocol
37 --------
38 Signal: Asynchronous, Positive logic, 19200baud, Least bit first
39 Frame format: 1-Start bit(Lo), 8-Data bits, Odd-Parity, 1-Stop bit
40
41
42
43 Build Firmware
44 --------------
45 Just use 'make' to bild firmware for TMK PC98 converter.
46
47     $ make clean
48     $ make
49
50 To flash firmware
51
52     $ make dfu
53
54 then push button on converter to flash firmware.
55
56 If you are using ATMega32u4 based board instead of premade TMK PC98 converter(ATMega32u2) use following commands.
57
58     $ make -f Makefile.32u4 clean
59     $ make -f Makefile.32u4
60     $ make -f Makefile.32u4 dfu
61
62
63
64 PC98 Scan Codes
65 ---------------
66     ,---. ,---. ,------------------------. ,------------------------. ,------------------------.
67     |Stp| |Cpy| | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10| | F11| F12| F13| F14| F15|
68     `---' `---' `------------------------' `------------------------' `------------------------'
69     ,-------------------------------------------------------------. ,-------.  ,---------------.
70     | Esc|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|JPY|Bspc| |Ins|Del|  |Hom|Hlp|  -|  /|
71     |-------------------------------------------------------------| |-------|  |---------------|
72     | Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|      | |RUp|RDn|  |  7|  8|  9|  *|
73     |-------------------------------------------------------`Enter| |-------|  |---------------|
74     |Ctl|Cap|  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  \|     | |  Up   |  |  4|  5|  6|  +|
75     |-------------------------------------------------------------| |-------|  |---------------|
76     | Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /| RO| Shift | |Lef|Rig|  |  1|  2|  3|  =|
77     `-------------------------------------------------------------' |-------|  |---------------|
78        |Kana|Win|GRP|NFER|       Space        |XFER| ^2|Win| ^3|    | Down  |  |  0|  ,|  .| ^1|
79        `-------------------------------------------------------'    `-------'  `---------------'
80     ^1: Enter on keypad is identical to Enter on alphanumeric portion
81     ^2: ALT on DIGITAL WAVE Dboard while Menu on PC-9821 keyboard
82     ^3: HOME on PC98XL keyboard
83     ^4: CAPS and Kana are locking keys, either mechanically or by firmware emulation
84
85
86     ,---. ,---. ,------------------------. ,------------------------. ,------------------------.
87     | 60| | 61| | 62 | 63 | 64 | 65 | 66 | | 67 | 68 | 69 | 6A | 6B | | 52 | 53 | 54 | 55 | 56 |
88     `---' `---' `------------------------' `------------------------' `------------------------'
89     ,-------------------------------------------------------------. ,-------.  ,---------------.
90     | 00 | 01| 02| 03| 04| 05| 06| 07| 08| 09| 0A| 0B| 0C| 0D| 0E | | 38| 39|  | 3E| 3F| 4D| 41|
91     |-------------------------------------------------------------| |-------|  |---------------|
92     |  0F  | 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 1A| 1B|      | | 36| 37|  | 42| 43| 44| 45|
93     |-------------------------------------------------------`  1C | |-------|  |---------------|
94     | 74| 71| 1D| 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28|     | |   3A  |  | 46| 47| 48| 49|
95     |-------------------------------------------------------------| |-------|  |---------------|
96     |   70    | 29| 2A| 2B| 2C| 2D| 2E| 2F| 30| 31| 32| 33| 70/7D | | 3B| 3C|  | 4A| 4B| 4C| 4D|
97     `-------------------------------------------------------------' |-------|  |---------------|
98        | 72 | 77| 73| 51 |        34          | 35 | 79| 78| 5E|    |   3D  |  | 4E| 4F| 50| 1C|
99        `-------------------------------------------------------'    `-------'  `---------------'
100     5E: HOME on PC98XL keyboard
101     79: ALT on DIGITAL WAVE Dboard
102     77,78,79: Left Win, right Win and Application on PC-9821 keyboard
103
104
105
106 PC98 keyboard commands
107 ----------------------
108 http://www.webtech.co.jp/company/doc/undocumented_mem/io_kb.txt
109
110 response from keyboard:
111     FAh: ACK
112     FCh: NACK
113
114 Inhibit repeating key:
115     9Ch, 70h
116
117 LED control:
118     9Dh 7xh
119
120     second byte:
121     0111 xxxx
122          |||`- NumLock
123          ||`-- ?
124          |`--- CapsLock
125          `---- Kana
126
127 Enabling Win and App key on PC-9821 keyboard:
128     95h, 03h
129
130
131
132 Raku Raku keyboard support
133 --------------------------
134 NEC PC-9801-98-S02 - raku raku keyboard:
135 https://deskthority.net/photos-f62/nec-pc-9801-98-s02-t5212.html
136
137 To build firmware for the keyboard
138
139     $ make KEYMAP=rakuraku clean
140     $ make KEYMAP=rakuraku
141     $ make KEYMAP=rakuraku dfu
142
143 Its scan code map is very different from standard types. This is not tested.
144
145
146
147 Other PC98 converter projects and resource
148 ------------------------------------------
149 PC-9800シリーズ テクニカルデータブック HARDWARE 編 1993年 p139, p343
150 https://archive.org/stream/PC9800TechnicalDataBookHARDWARE1993/PC-9800TechnicalDataBook_HARDWARE1993#page/n151
151 https://archive.org/stream/PC9800TechnicalDataBookHARDWARE1993/PC-9800TechnicalDataBook_HARDWARE1993#page/n355
152
153 PC98 to USB
154 http://davy.nyacom.net/kbd98usb/
155
156 PC98 to PS/2
157 http://www.tsp.ne.jp/~sawada/mago/c_gka98at.htm
158 http://www.tsp.ne.jp/~sawada/mago/src/gka98at.asm
159
160 scan code:
161 http://ixsvr.dyndns.org/usb2pc98
162
163
164
165 NOTES
166 -----
167 ### Tested on
168 - PC-9801V
169 - DIGITAL WAVE Dboard
170
171
172 ### RDY
173 PC98 host keeps RDY line high to prevent keyboard from sending data while processing.
174
175 https://archive.org/stream/PC9800TechnicalDataBookHARDWARE1993/PC-9800TechnicalDataBook_HARDWARE1993#page/n359
176
177 PC-9801V keyboard requires RDY pulse as acknowledgement from host, it doesn't next data without this. Dboard doens't need this.
178
179
180 ### Inhibit key repeating
181 The command(9Ch, 70h) works with Raku Raku keybaord but not with Dboard.
182
183 ### LED indicater
184 Dboard has LEDs but replys with FA to 9D command but ignore it. The LED indicates just its internal states. Dboard replays with FA to 9C command but it doesn't seem to understand repeat setting.
185
186 PC-9801V has no LEDs and doesn't accept LED command. It replys with 9D to 9D command. PC-9801V doesn't accept repeat setting command. It replys with 9C to 9C command.
187
188
189 ## PC-9801V
190 Note that you have to connect this keyboard with converter before plug in USB port. It seems this keyboard requires for host to send any command before starting to send scan code.