From f68c5bf0d30dc1300c71dabc63d2c2970f7337c9 Mon Sep 17 00:00:00 2001 From: tmk Date: Fri, 22 Feb 2013 09:53:46 +0900 Subject: Add initial files for PC98 --- converter/pc98_usb/README | 79 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 converter/pc98_usb/README (limited to 'converter/pc98_usb/README') diff --git a/converter/pc98_usb/README b/converter/pc98_usb/README new file mode 100644 index 0000000000..7b4f95ca25 --- /dev/null +++ b/converter/pc98_usb/README @@ -0,0 +1,79 @@ +Sun to USB keyboard protocol converter +====================================== +Target MCU is ATMega32u4 but other USB capable AVR will also work. +Supported keyboards: Sun Type 5 Keyboard, CTCSP SHORT TYPE KEYBOARD(CKUB) + +CTCSP SHORT TYPE KEYBOARD: http://imgur.com/a/QIv6p + + + + +Connector +--------- + 8Pin mini DIN + ___ ___ + / |_| \ + / 8 7 6 \ + | 5 4 3 | + \_ 2 1 _/ + \_____/ + (receptacle) + + Wiring: + Pin mini DIN MCU + ---------------------------------- + 1 GND GND + 2 GND GND + 3 5V + 4 RX/TX(Mouse) + 5 RX PD3 + 6 TX PD2 + 7 GND GND + 8 5V VCC + + +Protocol +-------- +Singnal: Asynchronous, Negative logic, 1200baud, No Flow control +Frame format: 1-Start bit, 8-Data bits, No-Parity, 1-Stop bit + + AVR USART engine expects positive logic while Sun keyboard signal is negative. + To use AVR UART engine you need exteral inverter in front of RX and TX pin. + Otherwise you can software serial routine to communicate the keyboard. + +This converter uses software method, you doesn't need any inverter part. + + +Commands From System To Keyboard + 0x01 Reset + Keyboard responds with following byte sequence: + Success: 0xFF 0x04 0x7F + Fail: 0x7E 0x01 0x7F + 0x02 Bell On + 0x03 Bell Off + 0x0A Click On + 0x0B Click Off + 0x0E LED + followed by LED status byte: + bit: 3 2 1 0 + LED: CapsLk ScrLk Compose NumLk + 0x0F Layout + Keyboard responds with 'Layout Response' 0xFE 0xXX + +Commands From Keyboard To System + 0x7F Idle + means no keys pressed. + 0xFE Layout Response + 0xFF Reset Response(followed by 0x04) + +Reference + http://kentie.net/article/sunkbd/page2.htm + http://kentie.net/article/sunkbd/KBD.pdf + + +Build Firmware +-------------- +Just use 'make' + $ cd sun_usb + $ make +Then, load the binary to MCU with your favorite programmer. -- cgit v1.2.3 From 84a3d4d2a1fbcc3cabdd8c20805845833601c47b Mon Sep 17 00:00:00 2001 From: tmk Date: Sat, 23 Feb 2013 01:15:03 +0900 Subject: Edit README of PC98 --- converter/pc98_usb/README | 102 ++++++++++++++++++++-------------------------- 1 file changed, 44 insertions(+), 58 deletions(-) (limited to 'converter/pc98_usb/README') diff --git a/converter/pc98_usb/README b/converter/pc98_usb/README index 7b4f95ca25..7d9547d508 100644 --- a/converter/pc98_usb/README +++ b/converter/pc98_usb/README @@ -1,79 +1,65 @@ -Sun to USB keyboard protocol converter -====================================== +PC98 to USB keyboard protocol converter +======================================= Target MCU is ATMega32u4 but other USB capable AVR will also work. -Supported keyboards: Sun Type 5 Keyboard, CTCSP SHORT TYPE KEYBOARD(CKUB) -CTCSP SHORT TYPE KEYBOARD: http://imgur.com/a/QIv6p +Connector +--------- + 8Pin mini DIN + ___ ___ + / |_| \ + / 8 7 6 \ + | 5 4 3 | + \_ 2 1 _/ + \_____/ + (receptacle) -Connector ---------- - 8Pin mini DIN - ___ ___ - / |_| \ - / 8 7 6 \ - | 5 4 3 | - \_ 2 1 _/ - \_____/ - (receptacle) - - Wiring: +Wiring: You can change this with ediging config.h. + Pin mini DIN MCU ---------------------------------- - 1 GND GND + 1 ~RST PD1 2 GND GND - 3 5V - 4 RX/TX(Mouse) - 5 RX PD3 - 6 TX PD2 - 7 GND GND + 3 ~RDY PD4 + 4 RXD PD2 + 5 ~RTY PD5 + 6 NC + 7 NC 8 5V VCC + + Protocol -------- -Singnal: Asynchronous, Negative logic, 1200baud, No Flow control -Frame format: 1-Start bit, 8-Data bits, No-Parity, 1-Stop bit - - AVR USART engine expects positive logic while Sun keyboard signal is negative. - To use AVR UART engine you need exteral inverter in front of RX and TX pin. - Otherwise you can software serial routine to communicate the keyboard. - -This converter uses software method, you doesn't need any inverter part. - - -Commands From System To Keyboard - 0x01 Reset - Keyboard responds with following byte sequence: - Success: 0xFF 0x04 0x7F - Fail: 0x7E 0x01 0x7F - 0x02 Bell On - 0x03 Bell Off - 0x0A Click On - 0x0B Click Off - 0x0E LED - followed by LED status byte: - bit: 3 2 1 0 - LED: CapsLk ScrLk Compose NumLk - 0x0F Layout - Keyboard responds with 'Layout Response' 0xFE 0xXX - -Commands From Keyboard To System - 0x7F Idle - means no keys pressed. - 0xFE Layout Response - 0xFF Reset Response(followed by 0x04) - -Reference - http://kentie.net/article/sunkbd/page2.htm - http://kentie.net/article/sunkbd/KBD.pdf +Singnal: Asynchronous, Positive logic, 19200baud, Least bit first +Frame format: 1-Start bit(Lo), 8-Data bits, Odd-Parity, 1-Stop bit + +This converter uses software method for testing purpose. AVR UART engine will work better. + + Build Firmware -------------- Just use 'make' - $ cd sun_usb + + $ cd pc98_usb $ make + Then, load the binary to MCU with your favorite programmer. + + + +Other PC98 converter projects and resource +------------------------------------------ +PC98 to USB +http://davy.nyacom.net/kbd98usb/ + +PC98 to PS/2 +http://www.tsp.ne.jp/~sawada/mago/c_gka98at.htm + +PC98 keyboard commands +http://www.webtech.co.jp/company/doc/undocumented_mem/io_kb.txt -- cgit v1.2.3 From fea6792f1636a716e799539b072930461bfcba67 Mon Sep 17 00:00:00 2001 From: tmk Date: Sun, 24 Feb 2013 18:10:50 +0900 Subject: New keymap of PC98 --- converter/pc98_usb/README | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'converter/pc98_usb/README') diff --git a/converter/pc98_usb/README b/converter/pc98_usb/README index 7d9547d508..23f1b614e6 100644 --- a/converter/pc98_usb/README +++ b/converter/pc98_usb/README @@ -60,6 +60,11 @@ http://davy.nyacom.net/kbd98usb/ PC98 to PS/2 http://www.tsp.ne.jp/~sawada/mago/c_gka98at.htm +http://www.tsp.ne.jp/~sawada/mago/src/gka98at.asm PC98 keyboard commands http://www.webtech.co.jp/company/doc/undocumented_mem/io_kb.txt + + +Inhibit repeating key: +0x9C, 0x70 -- cgit v1.2.3