Page 1 of 1
very strange keyboard activity
Posted: Mon Nov 03, 2008 8:33 am
by xDDunce
ok, so i finally got my modules working, but now my keyboard is behaving strangely.
it was working fine about a week ago, and now it only works the first time u load it up in both bochs and microsoft virtual pc. i am yet to try it on real hardware so i cannot be sure if it is due to the emulators or not. i can upload a cd image if you want to try it out.
im completely stumped by this error
thanks in advance!
James.
Re: very strange keyboard activity
Posted: Mon Nov 03, 2008 9:31 am
by ~
Of course, it would be good if you uploaded a bootable image.
Re: very strange keyboard activity
Posted: Mon Nov 03, 2008 9:44 am
by kmtdk
well
fist it would help with some more info, but lets start from the beginnig:
does the keyboard stop reacting ?
does the keyboard strokes dont get though your kernel
... and so on...
but are you sure that you dont send some "commands" to the keyboard ( assuming you have updatede some part of the keyboard code) .
or are you sure that you dont owerride the "keyboard data" or something simulary
KMT dk
Re: very strange keyboard activity
Posted: Mon Nov 03, 2008 10:21 am
by octa
johnsy2008 wrote:now it only works the first time u load it up in both bochs and microsoft virtual pc.
wat does this mean ??
u restart the os by ur own code or press the reset button in emulator.
Re: very strange keyboard activity
Posted: Mon Nov 03, 2008 10:47 am
by xDDunce
ok, the cd image can be found
here
prave wrote:johnsy2008 wrote:now it only works the first time u load it up in both bochs and microsoft virtual pc.
wat does this mean ??
u restart the os by ur own code or press the reset button in emulator.
this means, when i mount it using virtual cd, it works in bochs AND virtual pc. but if i press the restart button in the emulator(s), or close the emulator and reopen it, the keyboard stops working all together.
if i unmount the image then remount it, it will work again. but again, just for the first time.
and this is all i can see. as far as i know, the commands are not getting through, but i could be mistaken.
Re: very strange keyboard activity
Posted: Mon Nov 03, 2008 10:57 am
by kmtdk
i can tell for bochs:
i get same type of errors, and i think it is because that "bochs" dont write the "bios" and that stuff again when presing reboot
but on RHW it will work
KMT dk
Re: very strange keyboard activity
Posted: Mon Nov 03, 2008 11:30 am
by xDDunce
thanks KMT dk. i would have tried it on real hardware but i was fearing hardware failure... my parents dnt like the thought of me poking around a computer. they arent like me
well, ill just have to stick with it when trying things in bochs and virtual pc, but i will try it out on real hardware more often.
thanks all!
James.
Re: very strange keyboard activity
Posted: Mon Nov 03, 2008 11:42 am
by ~
It works normally in real hardware. The only thing it doesn't do is to handle the keyboard LED's or handle functions for multibyte scan codes, like PrtScr.
So it must be an issue with an emulator that I guess would make for a better code if solved. If Linux and other major OS's can run properly under Bochs, your code should also be able to do that, or it could possibly weaken as you add new things.
However, the most important is to assure that it will run as intended on any PC.
Re: very strange keyboard activity
Posted: Mon Nov 03, 2008 12:21 pm
by xDDunce
well, as i have succeeded in getting modules working, i was planning on taking things out of my kernel and then fulfilling their FULL requirements.
until then, im just using the basics, so i have something to fall back on when making the full featured version.
thanks for the help everyone!
Re: very strange keyboard activity
Posted: Mon Nov 03, 2008 5:35 pm
by pcmattman
Do you reset the keyboard and put it into a known state in your keyboard driver? If not, you never know what condition the keyboard might be in at boot-time.
Re: very strange keyboard activity
Posted: Tue Nov 04, 2008 9:31 am
by xDDunce
no, i don't reset the keyboard. i just register the interrupt handler and carry on expecting everything to have been done fine.
how would i go about resetting the keyboard? i guess i should do this, as it will eliminate the possibility of it happeneing on RHW.
Thanks for the advice.
James.
Re: very strange keyboard activity
Posted: Tue Nov 04, 2008 7:55 pm
by pcmattman
If you Google something like "keyboard reset C" or similar you should be able to find some code. If you're still totally stuck I can show you what I do in my keyboard driver.