-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
output periodically stops while holding down a key with PC98 converter #666
Comments
I guess the keyboard sends scan code repeatedly for the key for some reason. The converter send a command for keyboard to prevent key repeating only once at startup. If the command works the keyboard should not repeat key. Try these steps and post debug outputs on 'hid_listen'.
|
Output holding down a:
|
Your keyboard is repeating the key with make and break scan code. This behaviour is not compatible to mordern USB keyboard. Some PC98 keyboards can stop the repeating behaviour by command but others doesn't support the command unfortunately. Apply this patch and check debug outputs again to see if the keyboard supports the command.
If you can't build firmware yourself I'll do for you. Let me know microcontroller model name of your converter? |
Also, Does Capslock LED work as expected on your keyboard? |
Please do build it for me. The microcontroller model name is ATmega32U2. Actually, capslock doesn't work properly. When I press the capslock key, the LED lights up, however, the whole keyboard becomes unresponsive until I replug it. And then when it does start working again, it's stuck in capslock for some reason. The same thing doesn't happen with the kana key, which is also a locking key. |
Hmm, the converter may fail to send commands for some reason. Can you try this firmware to see debug outputs? You will see outputs like below.
|
The keyboard functions exactly as it did before.
|
It seems that the keyboard accept the 'repeat setting' command(9C, 70) with ACK(FA) successfully. But pressing CapsLock should not be stuck, what happen on hid_listen when pressing CapsLock? |
These are the results of opening hid_listen, plugging in the converter, then plugging in the keyboard, and pressing caps twice. The keyboard doesn't work when plugging in the keyboard before the converter.
But then other times I can't even press caps twice, and the keyboard freezes up on the first time I press caps. Then it logs the following:
It seems that the keyboard cycles between these two whenever I freeze up the keyboard by pressing caps, and then unplug and replug it from the converter. |
The converter doesn't support hot-plug basically at this point, with some keyobards you will have to connect keyboard into converter first. Some keyboards need to be intinitialized and the converter does initialization procedure only on startup. (Dboard sono1 works with hot-plug but PC-9801V keyboard doesn't.) Does the CapsLock key work when you connect keyboard first? I'll look into diffrence between my two keyboards to improve support for hot-plug. |
The keyboard doesn't work at all if it's plugged into the converter before the converter is plugged into the computer. After checking it with the unpatched firmware, it seems that this behavior is unique to the patch. With the unpatched firmware, the keyboard functions regardless of whether I plug in the usb or keyboard first. But how capslock functions doesn't change no matter in which order you connect things. |
Consulting with PC98 documents I changed code of sending command slightly. This may change the behaviour. Try updated firmware and can you post log with press capslock? After some research I found that hot-pluging keyboard is impossible or very difficult due to limitation of PC98 keyboard hardware design. So you have to connect keyboard with converter ant then plug them into USB port. Otherwirse PC98 keyboard may not be initialized correctly. |
Amazing! The keyboard now functions as it should. Both the key repeat and capslock issue have been fixed. Thank you, hasu-san! Log with pressing caps four times:
|
RDY high pulse(>=37us) is required to allow keyboard to send next data. https://archive.org/stream/PC9800TechnicalDataBookHARDWARE1993/PC-9800TechnicalDataBook_HARDWARE1993#page/n157
Great. Thank you for your report. |
I've been trying to game on my FC-9801-KB6, but I keep running into this problem, where when holding keys down, the keyboard stops outputting whatever key is held down for a very small amount of time. Every 0.2 seconds or so. It makes my character stutter when moving forwards for example. This doesn't happen with modifier keys like shift or alt.
The text was updated successfully, but these errors were encountered: