-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Fixed keyboard lockup during PC cold start (when power applied) #27
Conversation
based on @Hamberthm fixes for esp-32. See issue #21 Hamberthm's comments: * On my 486 PC, ACKs were being missed by the host controller during LED set command handling. This made the process to end and the controller to ignore the keyboard after that command. This makes it stable. * Testing in my Toshiba 205CDS with a combined port, DEVICE ID command was failing to write the ID properly. Added some loops to shield time to the controller and get them properly. * The interface was missing some commands in one of my sytems because of waiting to send the 0xAA "BAT test success". BAT success should always be sent a couple of houndred of milliseconds after power up, regarding state.
To be honest, this project do not have much activity :-D i am 100% happy to see some, but i have to admit i've kinda grown apart from understanding the code base and i am no longer much familiar with PS2 protocol, because i rarely use it nowadays. Can you please give me detailed description of the changes made in code (and describe what the possible drawbacks might be - if any)? I am sorry for being too investigative. But i think people tend to run this library with various old platforms which might have peculiarities in their PS2, so i just wanna make sure we're not breaking stuff for someone else by fixing the compatibility with these. It should be OK as long as we're sticking to PS2 standard and common practices, but i don't have many PS2 devices to test this (except for maybe USB PS2 converter dongle, which might not be typical use case anyway). So it's kinda hard for me to review any changes. That said i would be happy if people would help me review each others pull requests. (or at least provide some links to relevant PS2 standard documentation which explains why the changes are correct) |
OK I understand your point. No problem at all - I'll keep those changes in my branch and add are reference to issue #21. Thanks. |
Hello @Harvie! First of all, thank you SO much for the work you did on this project. When I started my project bt2ps2 using your code as a base, I bumped into these issues. Keep in mind you have issues open for this for a while now (check #21) so I strongly suggest you to apply this commit to help out those people. I think you should be safe introducing these changes, I did and for the moment I improved compatibility vastly. None of these changes broke compatibility on any of the systems I tried them in and I have many OK confirmations on the project an no complain for a BIOS reject, yet. All of this assuming @ole00 didn't add some major things but I don't see any. Your project has major relevance on this area and many people is taking it as a base for their own (like me), so keep that in mind. I'm here for any help I can provide! Cheers |
i don't think you do understand :-) i am not suggesting i am in any way opposed to merging this. i just want to understand the changes first and make sure it will not break anything else. no reason to close this :-) |
@Harvie. I think you made a strong point that unless I'm able to test the new changes extensively on a bunch of different hardware I can't be sure whether the changes will bring regressions to other people's hardware using the existing ps2dev code. I have only one PC I can test the new changes with, and I'm not the author of these changes, so I really can't guarantee the new code will bring improvements (I believe it will - as Hamberthm explained above). My intention with this merge request was to bring the attention that: 1) the issue exists, 2) the issue has a solution that works (tested with Arduino NANO and ATtiny 84) - I was not sure whether you might be interested and if you are then great. If not, then it''s fine as well.
|
That is cool! I am always happy to see projects like these.
Actualy all i want is the "second pair of eyes".
Thank you.
Perfect. I'll just merge it and if someone has complaints, he can always open new issue. |
Would you be please so kind and helped me peer review this other PR? |
Seems like a shield to prevent data loss or corruption during write(), in case of the host sending I/O requests during the process. It introduces a test on write() to check if either the DATA or CLK lines are low before doing the actual write. In the event of a request, it will store whatever command the host sends in a 16-byte buffer prior to doing the actual write. The patch seems well done and makes the code more immune against what is (in my opinion) poorly implemented protocol like in the mentioned HP analyzer. However, I have a question and I will proceed to ask them there in #25 . After my doubts are clear, I'll test the changes in my project and report back! |
based on @Hamberthm fixes for esp-32. See issue #21
Hamberthm's comments:
On my 486 PC, ACKs were being missed by the host controller during LED set command handling. This made the process to end and the controller to ignore the keyboard after that command. This makes it stable.
Testing in my Toshiba 205CDS with a combined port, DEVICE ID command was failing to write the ID properly. Added some loops to shield time to the controller and get them properly.
The interface was missing some commands in one of my sytems because of waiting to send the 0xAA "BAT test success". BAT success should always be sent a couple of houndred of milliseconds after power up, regarding state.