PS/2 to PCjr Keyboard Converter Firmware BUGFIX
Posted: Thu Mar 17, 2016 7:22 pm
Notice to existing and future purchasers of my PS/2 to PCjr keyboard converter:
This evening I was testing a converter I'm getting ready to send out and discovered some missing functionality. When NUMLOCK is on and you press SHIFT, the top row of number keys responds exactly the same as the keypad keys, which prevents you from typing symbols (!@#$%^&*()) when NUMLOCK is on. I decided to see how easy it would be to add an exception for the top row of keys that toggles NUMLOCK off while shift is being held down, and further discovered that my error handling code for reading from the PS/2 keyboard was completely broken.
The first bug is very noticeable, and I'm not sure how I didn't catch it during initial development (or maybe I did and just assumed it was a PCjr quirk, which it could be, but really that's no excuse for me not attending to it). The second bug is probably something that never would have been noticed if not for my poking around in the code to fix the first bug, and essentially means the converter would never detect a failed read from the PS/2 keyboard, and would always pass whatever scan code it thought it read.
I'm in a testing phase right now, but if all goes well, I will release the new code shortly. If you have the means, you'll be able to download the code and reprogram your own microcontroller and be on your way. Otherwise, you can contact me, and I'll do what I can to help you upgrade to the latest code.
Changes in progress:
-Adding an exception for the top row of number keys that toggles Numlock OFF on a keypress while shift is being held down and ON on a key release while shift is being held down. This is turning out to be a little trickier than I originally thought and may require a couple more nights of debugging, but as of right now it's pretty close to being there.
-Adding parity detection. Error detection previously just consisted of waiting for a time-out period and throwing an error if not enough bits were received. Now there will also be actual parity detection, and resends of misread keypresses will be requested from the PS/2 keyboard.
NOTE: If you're satisfied with your converter as-is, it's not strictly necessary to upgrade to the latest code, I just wanted to make sure this information was out there in case people *are* having issues.
This evening I was testing a converter I'm getting ready to send out and discovered some missing functionality. When NUMLOCK is on and you press SHIFT, the top row of number keys responds exactly the same as the keypad keys, which prevents you from typing symbols (!@#$%^&*()) when NUMLOCK is on. I decided to see how easy it would be to add an exception for the top row of keys that toggles NUMLOCK off while shift is being held down, and further discovered that my error handling code for reading from the PS/2 keyboard was completely broken.
The first bug is very noticeable, and I'm not sure how I didn't catch it during initial development (or maybe I did and just assumed it was a PCjr quirk, which it could be, but really that's no excuse for me not attending to it). The second bug is probably something that never would have been noticed if not for my poking around in the code to fix the first bug, and essentially means the converter would never detect a failed read from the PS/2 keyboard, and would always pass whatever scan code it thought it read.
I'm in a testing phase right now, but if all goes well, I will release the new code shortly. If you have the means, you'll be able to download the code and reprogram your own microcontroller and be on your way. Otherwise, you can contact me, and I'll do what I can to help you upgrade to the latest code.
Changes in progress:
-Adding an exception for the top row of number keys that toggles Numlock OFF on a keypress while shift is being held down and ON on a key release while shift is being held down. This is turning out to be a little trickier than I originally thought and may require a couple more nights of debugging, but as of right now it's pretty close to being there.
-Adding parity detection. Error detection previously just consisted of waiting for a time-out period and throwing an error if not enough bits were received. Now there will also be actual parity detection, and resends of misread keypresses will be requested from the PS/2 keyboard.
NOTE: If you're satisfied with your converter as-is, it's not strictly necessary to upgrade to the latest code, I just wanted to make sure this information was out there in case people *are* having issues.