From dab922c86c4d38794a3d3a559100418f8e3af9ee Mon Sep 17 00:00:00 2001 From: tmk Date: Mon, 23 Jul 2018 09:53:35 +0900 Subject: [PATCH] pc98_usb: Update README --- converter/pc98_usb/README | 104 +++++++++++++++++++++------ converter/pc98_usb/unimap_rakuraku.c | 2 +- converter/pc98_usb/unimap_trans.h | 26 ++++++- 3 files changed, 107 insertions(+), 25 deletions(-) diff --git a/converter/pc98_usb/README b/converter/pc98_usb/README index 3fc0a4b9..0914f229 100644 --- a/converter/pc98_usb/README +++ b/converter/pc98_usb/README @@ -5,6 +5,7 @@ Target MCU is ATMega32u2 but other USB capable AVR will also work. Connector --------- +On host/converter: 8Pin mini DIN ___ ___ @@ -41,29 +42,58 @@ Frame format: 1-Start bit(Lo), 8-Data bits, Odd-Parity, 1-Stop bit Build Firmware -------------- -Just use 'make' +Just use 'make' to bild firmware - $ cd pc98_usb + $ make clean $ 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 -http://www.tsp.ne.jp/~sawada/mago/src/gka98at.asm - -scan code: -http://ixsvr.dyndns.org/usb2pc98 - -NEC PC-9801-98-S02 - raku raku keyboard: -https://deskthority.net/photos-f62/nec-pc-9801-98-s02-t5212.html +To flash firmware + + $ make dfu + +then push button on converter to flash firmware. + + + +PC98 Scan Codes +--------------- + ,---. ,---. ,------------------------. ,------------------------. ,------------------------. + |Pau| |PrS| | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10| | F11| F12| F13| F14| F15| + `---' `---' `------------------------' `------------------------' `------------------------' + ,-------------------------------------------------------------. ,-------. ,---------------. + | Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bspc| |Ins|Del| |Hom|End| -| /| + |-------------------------------------------------------------| |-------| |---------------| + | Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | |PgD|PgU| | 7| 8| 9| *| + |-------------------------------------------------------`Enter| |-------| |---------------| + |Ctl|Cap| A| S| D| F| G| H| J| K| L| ;| '| \| | | Up | | 4| 5| 6| +| + |-------------------------------------------------------------| |-------| |---------------| + | Shift | Z| X| C| V| B| N| M| ,| .| /| RO| Shift | |Lef|Rig| | 1| 2| 3| =| + `-------------------------------------------------------------' |-------| |---------------| + ^3|Kana|Gui|Alt|MHEN| Space |HENK|Alt|Gui|App|^2 | Down | | 0| ,| .| ^1| + `-------------------------------------------------------' `-------' `---------------' + ^1: Enter on keypad is identical to Enter on alphanumeric portion. + ^2: Right Alt is ALT on DIGITAL WAVE Dboard while Menu on PC-9821 keyboard. + App is HOME key on PC98XL keyboard. + ^3: Caps and Kana are locking keys, either mechanically or by firmware emulation. + + + ,---. ,---. ,------------------------. ,------------------------. ,------------------------. + | 60| | 61| | 62 | 63 | 64 | 65 | 66 | | 67 | 68 | 69 | 6A | 6B | | 52 | 53 | 54 | 55 | 56 | + `---' `---' `------------------------' `------------------------' `------------------------' + ,-------------------------------------------------------------. ,-------. ,---------------. + | 00 | 01| 02| 03| 04| 05| 06| 07| 08| 09| 0A| 0B| 0C| 0D| 0E | | 38| 39| | 3E| 3F| 4D| 41| + |-------------------------------------------------------------| |-------| |---------------| + | 0F | 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 1A| 1B| | | 36| 37| | 42| 43| 44| 45| + |-------------------------------------------------------` 1C | |-------| |---------------| + | 74| 71| 1D| 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| | | 3A | | 46| 47| 48| 49| + |-------------------------------------------------------------| |-------| |---------------| + | 70 | 29| 2A| 2B| 2C| 2D| 2E| 2F| 30| 31| 32| 33| 70/7D | | 3B| 3C| | 4A| 4B| 4C| 4D| + `-------------------------------------------------------------' |-------| |---------------| + | 72 | 77| 73| 51 | 34 | 35 | 79| 78| 5E| | 3D | | 4E| 4F| 50| 1C| + `-------------------------------------------------------' `-------' `---------------' + 5E: HOME on PC98XL keyboard + 79: ALT on DIGITAL WAVE Dboard + 77,78,79: Left Win, right Win and Application on PC-9821 keyboard @@ -76,7 +106,7 @@ response from keyboard: FCh: NACK Inhibit repeating key: - 0x9C, 0x70 + 9Ch, 70h LED control: 9Dh 7xh @@ -87,3 +117,35 @@ LED control: ||`-- ? |`--- CapsLock `---- Kana + +Enabling Win and App key on PC-9821 keyboard: + 95h, 03h + + + +Raku Raku keyboard support +-------------------------- +NEC PC-9801-98-S02 - raku raku keyboard: +https://deskthority.net/photos-f62/nec-pc-9801-98-s02-t5212.html + +To build firmware for the keyboard + + $ make KEYMAP=rakuraku clean + $ make KEYMAP=rakuraku + $ make KEYMAP=rakuraku dfu + +Its scan code map is very different from standard types. This is not tested. + + + +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 +http://www.tsp.ne.jp/~sawada/mago/src/gka98at.asm + +scan code: +http://ixsvr.dyndns.org/usb2pc98 diff --git a/converter/pc98_usb/unimap_rakuraku.c b/converter/pc98_usb/unimap_rakuraku.c index 816d8c9c..fda43b17 100644 --- a/converter/pc98_usb/unimap_rakuraku.c +++ b/converter/pc98_usb/unimap_rakuraku.c @@ -24,7 +24,7 @@ const action_t actionmaps[][UNIMAP_ROWS][UNIMAP_COLS] __attribute__ ((section (" #else const action_t actionmaps[][UNIMAP_ROWS][UNIMAP_COLS] PROGMEM = { #endif - /* + /* TODO: test ,---------------------------------------------------------------. |Pau|PrS| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|PgD|PgU|End|Hom| `---------------------------------------------------------------' diff --git a/converter/pc98_usb/unimap_trans.h b/converter/pc98_usb/unimap_trans.h index 4155b2f1..c6aae07f 100644 --- a/converter/pc98_usb/unimap_trans.h +++ b/converter/pc98_usb/unimap_trans.h @@ -22,9 +22,28 @@ along with this program. If not, see . #include "unimap.h" -/* Mapping to Universal keyboard layout +/* Mapping PC98 scan codes to UNIMAP layout codes * - * Universal keyboard layout + * PC98 scan codes + * ,---. ,---. ,------------------------. ,------------------------. ,------------------------. + * | 60| | 61| | 62 | 63 | 64 | 65 | 66 | | 67 | 68 | 69 | 6A | 6B | | 52 | 53 | 54 | 55 | 56 | + * `---' `---' `------------------------' `------------------------' `------------------------' + * ,-------------------------------------------------------------. ,-------. ,---------------. + * | 00 | 01| 02| 03| 04| 05| 06| 07| 08| 09| 0A| 0B| 0C| 0D| 0E | | 38| 39| | 3E| 3F| 4D| 41| + * |-------------------------------------------------------------| |-------| |---------------| + * | 0F | 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 1A| 1B| | | 36| 37| | 42| 43| 44| 45| + * |-------------------------------------------------------` 1C | |-------| |---------------| + * | 74| 71| 1D| 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| | | 3A | | 46| 47| 48| 49| + * |-------------------------------------------------------------| |-------| |---------------| + * | 70 | 29| 2A| 2B| 2C| 2D| 2E| 2F| 30| 31| 32| 33| 70/7D | | 3B| 3C| | 4A| 4B| 4C| 4D| + * `-------------------------------------------------------------' |-------| |---------------| + * | 72 | 77| 73| 51 | 34 | 35 | 79| 78| 5E| | 3D | | 4E| 4F| 50| 1C| + * `-------------------------------------------------------' `-------' `---------------' + * 5E: HOME on PC98XL keyboard + * 79: ALT on DIGITAL WAVE Dboard + * 77,78,79: Left Win, right Win and Application on PC-9821 keyboard + * + * UNIMAP layout * ,-----------------------------------------------. * |F13|F14|F15|F16|F17|F18|F19|F20|F21|F22|F23|F24| * ,---. |-----------------------------------------------| ,-----------. ,-----------. @@ -75,11 +94,12 @@ const uint8_t PROGMEM unimap_trans[MATRIX_ROWS][MATRIX_COLS] = { |-------------------------------------------------------------| |-------| |---------------| | Shift | Z| X| C| V| B| N| M| ,| .| /| RO| Shift | |Lef|Rig| | 1| 2| 3| =| `-------------------------------------------------------------' |-------| |---------------| - |Kana|Gui|Alt|MHEN| Space |HENK|Alt|Gui|App|^2 | Down | | 0| ,| .| ^1| + ^3|Kana|Gui|Alt|MHEN| Space |HENK|Alt|Gui|App|^2 | Down | | 0| ,| .| ^1| `-------------------------------------------------------' `-------' `---------------' ^1: Enter on keypad is identical to Enter on alphanumeric portion. ^2: Right Alt is ALT on DIGITAL WAVE Dboard while Menu on PC-9821 keyboard. App is HOME key on PC98XL keyboard. +^3: Caps and Kana are locking keys, either mechanically or by firmware emulation. */ #define UNIMAP_PC98( \ K48, K46, K3A,K3B,K3C,K3D,K3E, K3F,K40,K41,K42,K43, K44,K45,K68,K69,K6A, \ -- 2.46.2