Is Dell Keyboard Controller acting odd?
Posted: Tue Mar 24, 2009 8:10 pm
Or is it my code?
I have several Dell computers here which I'm testing my OS on. The keyboard is a standard USB keyboard. Whenever I type, the interrupt fires perfectly and I read the proper input port (btw, my code works fine on other computers). Everything goes smoothly until I try to type quickly. I then seem to fill up some buffer somewhere and not enough interrupts are fired (???) for me to read out all the characters. Anywho, the next time I strike a key, my interrupt fires and I read out a character which I obviously typed awhile ago. If I keep typing the same character (or a sentence), I keep receiving old characters until my new text starts coming through. In other words, the buffer somewhere stays permanently behind from that point forward.
I tried reading the keyboard status port whenever I get an interrupt, but it shows that the keyboard buffer is empty as soon as I read one character. Obviously, there are more characters somewhere.
So, then I tried always reading 10 characters every time I got an interrupt no matter what the status port said. This doesn't fix the problem either since the keyboard always returns the same character all 10 times. In other words, this buffer somewhere is only incremented one character no matter how many times I read it per interrupt.
Is something seriously wrong with my code? I've been doubting whether the whole OS has been loaded into memory by my bootsector. I recently switched to loading my OS from a USB stick using the same bootsector which I've used for my HD and floppy loads. The bootsector obviously loads something, but my stage 2 code keeps telling me that the load was only partial.
So, my question is: is the keyboard behaviour that I am experiencing normal on some systems, or should I look towards the obvious (my code isn't all loaded == quirky bugs)?
Brett
I have several Dell computers here which I'm testing my OS on. The keyboard is a standard USB keyboard. Whenever I type, the interrupt fires perfectly and I read the proper input port (btw, my code works fine on other computers). Everything goes smoothly until I try to type quickly. I then seem to fill up some buffer somewhere and not enough interrupts are fired (???) for me to read out all the characters. Anywho, the next time I strike a key, my interrupt fires and I read out a character which I obviously typed awhile ago. If I keep typing the same character (or a sentence), I keep receiving old characters until my new text starts coming through. In other words, the buffer somewhere stays permanently behind from that point forward.
I tried reading the keyboard status port whenever I get an interrupt, but it shows that the keyboard buffer is empty as soon as I read one character. Obviously, there are more characters somewhere.
So, then I tried always reading 10 characters every time I got an interrupt no matter what the status port said. This doesn't fix the problem either since the keyboard always returns the same character all 10 times. In other words, this buffer somewhere is only incremented one character no matter how many times I read it per interrupt.
Is something seriously wrong with my code? I've been doubting whether the whole OS has been loaded into memory by my bootsector. I recently switched to loading my OS from a USB stick using the same bootsector which I've used for my HD and floppy loads. The bootsector obviously loads something, but my stage 2 code keeps telling me that the load was only partial.
So, my question is: is the keyboard behaviour that I am experiencing normal on some systems, or should I look towards the obvious (my code isn't all loaded == quirky bugs)?
Brett