hi, now, i think i can intial the mouse via program the 8042.
but i can read data from mouse:(
if i don't move the mouse, i can read the keyboard data from the port 0x60 .
but if i move the mouse even only one time, i can't read any data. i hit the keyboard, and the bochs reports that: the keyboard's buffer is full. but i can't read data from 0x60 now,that's very strange!
what can i do?
thank you very much!
how can i read data from mouse?
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:how can i read data from mouse?
don't try to read more values from the 8042 than available (you can know it by probing the status register (0x64 iirc). The 8042 will not always have 3 bytes of mouse data ready when IRQ12 is fired, but it's guaranteed to have at least 1 byte of such data.
Also, make sure you receive and acknowledge the IRQ first (check my answer in your other post.
btw, if you can avoid posting in multiple threads for a single problem
Also, make sure you receive and acknowledge the IRQ first (check my answer in your other post.
btw, if you can avoid posting in multiple threads for a single problem
Re:how can i read data from mouse?
now, i can fire the irq12 by mouse, but when i move or click the mouse, the boches will shut down
why?
why?
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:how can i read data from mouse?
chances are that you're mishandling IRQ, then. usually, only triple-faults will restart the Bochs.
Re:how can i read data from mouse?
yes, i forget map the irq.
now it can work will!
thank you very much!!!!:)
now it can work will!
thank you very much!!!!:)