Page 1 of 2
Mouse Driver Problems
Posted: Fri May 18, 2007 6:37 am
by Lprogster
Hi all
I have yet another problem... Trying to get input from the mouse.
..See next post...
Thanks yet again,
Lster
Posted: Fri May 18, 2007 11:26 am
by Lprogster
...
Thanks,
Lster
Posted: Fri May 18, 2007 12:05 pm
by Brynet-Inc
Lprogster wrote:Update: I think the mouse is of the USB type - would that make any difference?
Thanks,
Lster
"You think?", If you can't identify a USB connector... Is OSDev for you?
You could always see if your BIOS supports PS/2 legacy emulation..
Shouldn't be that hard to support the native USB connectivity though...
http://www.usb.org/developers/devclass_docs/HID1_11.pdf
http://www.usb.org/developers/hidpage/
http://en.wikipedia.org/wiki/USB_human_ ... vice_class
Posted: Fri May 18, 2007 12:49 pm
by Lprogster
Thanks for links. Brilliant
.
My physical mouse is USB, but I'm using Qemu. That's why I'm not sure about the hardware...
Than you again,
Lster
Posted: Fri May 18, 2007 1:04 pm
by Brynet-Inc
Lprogster wrote:Thanks for links. Brilliant
.
My physical mouse is USB, but I'm using Qemu. That's why I'm not sure about the hardware...
Than you again,
Lster
Uhh, Well QEMU is an emulator.. Your host hardware wouldn't make any difference at all.. It's likely emulating a PS/2 mouse to the guest operating system.
Posted: Fri May 18, 2007 4:20 pm
by pcmattman
QEMU emulates a PS/2 mouse. So does Bochs (unless you tell it otherwise).
I know, because I use my cursor in QEMU... my mouse is USB and my OS only supports PS/2 so far. I plan to implement USB soon...
Posted: Sat May 19, 2007 3:05 am
by Lprogster
Are there any tutorials for either PS/2 mouse or USB mouses/ devices? Everything I find, I can't understand!
Posted: Sat May 19, 2007 7:58 pm
by pcmattman
Well, go to my project's sourceforge site, browse the CVS (Go to CPP_Kernel folder) and then look at my mouse driver... It's a hack job but it works.
If you want better code, look at Linux's source, or rewrite mine.
Posted: Sun May 20, 2007 3:00 am
by Lprogster
Thank you loads for that pcmattman. I think it is nearly working, but I keep getting the mouse input to my keyboard_handler (at IRQ1)! This means loads of strange characters on the screen - shouldn't that input go to IRQ12?
Anyone had this problem before?
Thanks,
Lster
Posted: Sun May 20, 2007 3:15 am
by pcmattman
No, my problem was the keyboard data going to IRQ 12 (which is fixed anyway).
Have you mapped the interrupts properly?
Posted: Sun May 20, 2007 4:52 am
by Lprogster
Every thing's OK now... I confused some code... Beware of copy and paste!
Thank you pcmattman - again,
Lster
Posted: Sun May 20, 2007 5:11 am
by pcmattman
No worries!
Posted: Sun May 20, 2007 5:23 am
by Lprogster
One last question though...
...See later...
I hope I'm being coherent enough.
Anyhow - thank you for the code,
Lster
Posted: Sun May 20, 2007 8:48 am
by AndrewAPrice
Lprogster wrote:Why doesn't this work:
You have to initialise the stack.. then there's no reason why it shouldn't work!
Posted: Sun May 20, 2007 8:53 am
by Lprogster
...
Thanks,
Lster