### 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.
#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
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;
}
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;
}
matrix[ROW(code)] |= (1<<COL(code));
}
}
+
+ // PC-9801V keyboard requires RDY pulse.
+ // This is not optimal place though, it works.
+ PC98_RDY_PORT |= (1<<PC98_RDY_BIT); // RDY: high
+ _delay_us(20);
+ PC98_RDY_PORT &= ~(1<<PC98_RDY_BIT); // RDY: low
return code;
}