port 60h wonder
I would try Bios setup to see if you can get any info about keyboard there, i would also try some 32bit hobby OS, with idt setup to see if they work.
Also have you tyred a exterior keyboard ?.
Also have you tyred a exterior keyboard ?.
Last edited by Dex on Wed Mar 19, 2008 7:52 am, edited 1 time in total.
Try http://www.lvr.com/hidpage.htm
And check theres no legac support in the BIOS.
And check theres no legac support in the BIOS.
just want to share with you guys a link to usb programming in assembly:
http://www.frontiernet.net/~fys/usb.htm
other assembly codes of the same author (quite great):
http://www.frontiernet.net/~fys/index.htm
http://www.frontiernet.net/~fys/usb.htm
other assembly codes of the same author (quite great):
http://www.frontiernet.net/~fys/index.htm
only contains windows code like delphi vc++ etc.Dex wrote:Try http://www.lvr.com/hidpage.htm
And check theres no legac support in the BIOS.
If you are serious about OS programming then stay away from real hardware as long as you can. Use Bochs, for example. As for port 60h, I'd be very surprised if it doesn't work on your system. If the port was absent, it should return 0xff, not 0xaa. 0xaa indicates to me the port is working just fine. See for example here and also here on how to communicate with the keyboard controller. Try e.g. the diagnostics echo (0xee) or setting the keyboard lights (0xed) and see if that works. If not, try resetting the controller (0xff). Or maybe you should simply first enable it (0xf4, 0xf6).Philip wrote:i found out the problem,
it is because of my tablet pc compaq tc1000
port 60h is not the keyboard port as i tried
to write a small program in real mode and run under dos to check but
the value from port 60h is also always AAh
JAL
you cant
simple as that. you cant
there is no way to simply 'read from the usb port' -- this is not a simple port read, like the keyboard port
1) you must first find the usb port, which means supporting PCI PnP and scanning the PCI bus to find the USB controller
2) once you have identified and located the USB controller, you must initialize it
3) once you have initialized it, you must learn to comunicate with it -- which is very complicated
i dont know more than that, as i havent done it myself (compatability with USB devices is one of the last things you do when writing an OS...)
this is what people have been trying to tell you, and have pointed you to the appropriate documentation
the much easier approach would be to forget about USB for now, and simply use the traditional interface, to do this you can either:
1) use a VM -- Bochs, VMware, VPC, and QEMU are the most commonly used ones, there are other advantages to using them besides just keyboard
2) go into your BIOS setup program, and enable legacy keyboard compatibility (to get into the BIOS, you may need to connect a PS/2 keyboard though... a lot of systems wont recognize a USB keyboard)
simple as that. you cant
there is no way to simply 'read from the usb port' -- this is not a simple port read, like the keyboard port
1) you must first find the usb port, which means supporting PCI PnP and scanning the PCI bus to find the USB controller
2) once you have identified and located the USB controller, you must initialize it
3) once you have initialized it, you must learn to comunicate with it -- which is very complicated
i dont know more than that, as i havent done it myself (compatability with USB devices is one of the last things you do when writing an OS...)
this is what people have been trying to tell you, and have pointed you to the appropriate documentation
the much easier approach would be to forget about USB for now, and simply use the traditional interface, to do this you can either:
1) use a VM -- Bochs, VMware, VPC, and QEMU are the most commonly used ones, there are other advantages to using them besides just keyboard
2) go into your BIOS setup program, and enable legacy keyboard compatibility (to get into the BIOS, you may need to connect a PS/2 keyboard though... a lot of systems wont recognize a USB keyboard)
It's relatively difficult, as JAAMan wrote (at least not as easy as PS/2, as you need a USB stack of drivers: PCI to detect it, USB controller, USB HID class driver, keyboard driver, etc.). However, if you can get into the BIOS setup with the keyboard, chances are large that it has legacy support enabled. That means that normal keyboard reading should work, although not all commands may be supported, depending on what is emulated. You could try booting into e.g. FreeDOS, and if that works without problems, you know for sure legacy support is enabled (as DOS lacks USB support).Philip wrote:hi jal, thanks for the links
but my keyboard is USB HID, so just cant read from port 60h
if you know how to read from usb port, pls tell me
JAL