This converter allows PC-98 keyboards to be connected to modern computers via an Arduino
- Connect your keyboard to your Arduino according to the chart below, you can move the pins if you also change them in the Arduino code.
- Upload
pc98_usb.ino
to your Arduino - Enable DFU Programmer mode then flash
Arduino-keyboard-0.3.hex
to your Arduino using dfu-programmer or Flip
3.2sudo dfu-programmer atmega16u2 erase
3.3sudo dfu-programmer atmega16u2 flash Arduino-keyboard-0.3.hex
(FlashArduino-usbserial-uno.hex
to return to arduino mode) - Your Arduino/PC-98 Keyboard should act like a USB keyboard.
Even though this adapter currently doesn't support sending commands here is a list of the commands the keyboard will accept.
0xFA
Acknowledged0xFB
Not Ready?0xFC
Not Acknowledged
-
0x95
Enables/Disables the Gui & Menu keys for the keyboards that have them
0x95 0x00
Disable Gui & Menu keys
0x95 0x03
Enable Gui & Menu keys -
0x96
Get current JIS conversion mode
Returns0xA0 0x86
= Automatic conversion mode
Returns0xA0 0x85
= Normal mode -
0x99
Unknown, returns0xFB
-
0x9C
Keyboard repeat speed
Format:0x9C 01111111
Bit 7 - Unused
Bit 6-5 - Delay before repeat (11 = 1000ms, 10 = 500ms, 01 = 500ms, 00 = 250ms)
Bit 4-0 - Repeat speed (11111 = Slowest, 00001 = Fastest (default)) -
0x9D
Keyboard LED Settings
0x9D 0x60
Returns the LED state in this format:0000KC0N
, K = Kana, C = Caps, N = Num
0x9D 0111KC0N
Sets the LED state, K = Kana, C = Caps, N = Num -
0x9F
Returns the keyboard type Returns0xA0 0x80
on new keyboards
Repeating scancodes are sent internally from the PC-98 Keyboard, some newer models have a command to stop key repeating but this adapter handles it completely in software so it works on all models.
As a result there is a ~20ms delay (can be changed) when typing but its barely noticeable and no keys are dropped/missed (see typing demo below)
Img.0006.1-1.mp4
I have only been able to test this with a PC-9801R Keyboard but most other models should work.
The PC-9801V might not work due to it requiring any command to init.
The PTOS Keyboard may or may not work since it uses quite a different layout.
If you have any PC-98 Keyboard please let me know if it works or not.
TMK PC-9801 Wiki
Hardware Manual - Keyboard Protocol
Hardware Manual - Keyboard Interface
Keyboard Interface & Commands
Different Keyboard Models
Keycodes & Miscellaneous