Does a USB keyboard still send IRQ1 or is it all done via the USB controller? And what about the mouse?
I ask because I've gotten the "roll your own" bug ::) (thanks Bogdan...I think)
Initially, while in real mode and if the bios is set for it, then it will simulate the legacy keyboard by translating the usb keyboard input - so it appears the keyboard is still a legacy one, and can be used as such. When you set up your own interrupt handlers then it becomes your problem - and the keyboard only comes in through the usb controller (as it is, and always was, a usb device.)
Same for the mouse.
(Unless it's the chipset that magically does this, then I suppose you could enable it - with the help of bios - and it should just work; but I don't think that's what happens.)
Yes usually BIOS will emulate USB mouse and keyboard as PS/2 mouse and keyboard while in real mode. In protected mode this emulation might or might not continue.
From my experience I would say that 80% of BIOS will emulate USB mouse and keyboard in real mode while only 50% or less will continue this emulation when the CPU is in protected mode.
The emulation is usually done via SMM code that is inaccessible even to OS programmers. You might have an option in your BIOS setup for enabling/disabling this kind of emulation.
The bottom line: you can get lucky 50% of the times but normally you will need some USB drivers for mouse and keyboard as soon as you are in protected mode :D. And do not forget that USB drivers are kind of complicated to write.
Why isn't anything easy?
Thanks for the info guys.
let me know what you find out.
im about to test switching to p mode myself and find out if the usb works or not.
well it doesn't work on my dell optiplex 240gx i think. latest bios edition.
not i have to find out how to right usb drivers for it.
Mark Larson posted some USB-related code that might contain some useful information here (http://www.masm32.com/board/index.php?topic=392.msg2437#msg2437).
Can't get the 2 links to work...help us donkey! :bdg
Quote from: Mark_Larson on January 14, 2005, 04:41:33 PM
Donkey has been kind enough to host both files. Here are the links. Thanks Donkey!!!
http://www.members.shaw.ca/contact_donkey/files/markl/USBCOMP.ZIP
http://www.members.shaw.ca/contact_donkey/files/markl/ICH2.ZIP
And thanks MichaelW for your good memory.
not workin
The links do not work, but ICH2.ZIP is still available as an attachment on the post that I linked. The other is just an EXE, no source.