Page 1 of 1

working sample for usb keyboad?

Posted: Tue Sep 06, 2005 4:26 am
by holiday
Is there a working sample for using a usb keyboard on the ps2?

I came across: /archive/ps2hid/iop/ps2kbd/ps2kbd.com in cvs (author is TyRaNiD). Looks like exactly what I need.

I added -lkbd & -lmouse to my list of libs when compiling, and put #include libkbd.h, libmouse.h, stdio.h & debug.h in thew source as well. Changed the printf to scr_printf so that the output goes to the ps2 screen. It compiled fine, using PS2SDK

PS2KbdInit() returns non zero result, so the keyboard should be initialized, but the keyboard doesn't respond to capslock, nor numlock. Of course the program doesn't sense any keyboard input either.

It relies on usbd.irx, ps2mouse.irx and ps2kbd.irx, of which I have tried compiling them into the elf as well. These 3 .irx's were in the ps2sdk.

The keyboard hardware is fine, and works under blackrhino.

So is there another sample for usb keyboards or can anyone give me a hint as to what i've missed?

Posted: Tue Sep 06, 2005 7:11 am
by holiday
I tried another usbd.irx (one from naplink ps2client) and that worked. The reasons why are not clear to me right now, but I vaguely recall this being discussed elsewhere. I'm not terribly curious atm, but I thought in case some other newbie did that same thing as I did, it would be documented.

holiday42

Posted: Tue Sep 06, 2005 2:58 pm
by TyRaNiD
I think some of the newer revisions of the usb driver dont play ball properly with the basic rom kernel, the naplink one and the one on the ps2linux dvd are know to work.

Of course really should have finished the free usb driver, oh well...

Posted: Tue Sep 06, 2005 5:31 pm
by radad
I think the usbd.irx to use is the one from the ps2linux kit (it is also the one from naplink, etc). The usbd.irx from the ps2sdk is an attempt to rewrite as the source of the other is not available and has distribution issues. I dont think this new one is finished yet and hasn't been worked on for a while.