Page 2 of 2

Re: Memory contents different on real hardware

Posted: Wed Jun 04, 2014 12:46 pm
by Octocontrabass
What hardware are you using? Have you tried plugging in a different keyboard?

Re: Memory contents different on real hardware

Posted: Thu Jun 05, 2014 9:14 am
by onlyonemac
I'm using a Samsung SDK3500 keyboard - I'll try another one if I remember.

Re: Memory contents different on real hardware

Posted: Thu Jun 05, 2014 2:38 pm
by Octocontrabass
The chipset you're using is just as important as the keyboard, since there's a good chance the keyboard controller isn't passing all of your commands to the keyboard:
When I tried writing data to the output buffer, I found the keyboard controller only forwards the "Set LED state" command and "Set Typematic Rate/Delay" command. It does not allow any other commands to be sent to the keyboard. However, it does emulate the keyboard's response by placing "acknowledge" (0xFA) in the input buffer when appropriate (or 0xEE in response to the "Echo" command.) Furthermore, if the keyboard sends it an erroneous byte, the keyboard controller takes care of error handling (sends the "Retry" command; if byte still erroneous; sends error code to keyboard and places error code in input buffer.)
On an entirely separate note, it looks like you may not be parsing scan codes correctly. Those extra scan codes you're receiving shouldn't be the same as the shift key.

Re: Memory contents different on real hardware

Posted: Fri Jun 06, 2014 12:04 am
by iansjack
Not to mention the fact that there is no such thing as the shift key. There is a left shift key and a right shift key; they produce different scan codes.