From: tmk Date: Mon, 15 Oct 2018 12:37:52 +0000 (+0900) Subject: pc98_usb: Fix RDY line and startup for PC-9801V X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=fddc6a7b47fa581690e7827630e74172452cff80;p=max%2Ftmk_keyboard.git pc98_usb: Fix RDY line and startup for PC-9801V --- diff --git a/converter/pc98_usb/README b/converter/pc98_usb/README index 4d0d0bfe..4c35ed32 100644 --- a/converter/pc98_usb/README +++ b/converter/pc98_usb/README @@ -170,14 +170,21 @@ NOTES ### RDY -Current firmware does not control RDY line and it is drived as low to receive data always. While sending command firmware drive the line high. - PC98 host keeps RDY line high to prevent keyboard from sending data while processing. https://archive.org/stream/PC9800TechnicalDataBookHARDWARE1993/PC-9800TechnicalDataBook_HARDWARE1993#page/n359 +PC-9801V keyboard requires RDY pulse as acknowledgement from host, it doesn't next data without this. Dboard doens't need this. + + ### Inhibit key repeating The command(9Ch, 70h) works with Raku Raku keybaord but not with Dboard. ### LED indicater -Dboard has LEDs but it seems to ignore LED control command. +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. + +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. + + +## PC-9801V +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. diff --git a/converter/pc98_usb/config.h b/converter/pc98_usb/config.h index c74b434b..d3898d90 100644 --- a/converter/pc98_usb/config.h +++ b/converter/pc98_usb/config.h @@ -19,8 +19,8 @@ along with this program. If not, see . #define CONFIG_H #define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x9898 -#define DEVICE_VER 0x0100 +#define PRODUCT_ID 0x9801 +#define DEVICE_VER 0x0101 #define MANUFACTURER t.m.k. #define PRODUCT PC98 keyboard converter #define DESCRIPTION converts PC98 keyboard protocol into USB diff --git a/converter/pc98_usb/matrix.c b/converter/pc98_usb/matrix.c index 39afb43c..84a29382 100644 --- a/converter/pc98_usb/matrix.c +++ b/converter/pc98_usb/matrix.c @@ -71,12 +71,12 @@ static void pc98_inhibit_repeat(void) RETRY: pc98_send(0x9C); code = pc98_wait_response(); - if (code != -1) xprintf("PC98: send 9C: %02X\n", code); - if (code != 0xFA) goto RETRY; + if (code != -1) xprintf("send 9C: %02X\n", code); + if (code != 0xFA) return; pc98_send(0x70); code = pc98_wait_response(); - if (code != -1) xprintf("PC98: send 70: %02X\n", code); + if (code != -1) xprintf("send 70: %02X\n", code); if (code != 0xFA) goto RETRY; } @@ -87,12 +87,12 @@ static void pc98_led_set(void) RETRY: pc98_send(0x9D); code = pc98_wait_response(); - if (code != -1) xprintf("PC98: send 9D: %02X\n", code); - if (code != 0xFA) goto RETRY; + if (code != -1) xprintf("send 9D: %02X\n", code); + if (code != 0xFA) return; pc98_send(pc98_led); code = pc98_wait_response(); - if (code != -1) xprintf("PC98: send %02X: %02X\n", pc98_led, code); + if (code != -1) xprintf("send %02X: %02X\n", pc98_led, code); if (code != 0xFA) goto RETRY; } @@ -158,6 +158,12 @@ uint8_t matrix_scan(void) matrix[ROW(code)] |= (1<