working sample for usb keyboad?

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
holiday
Posts: 5
Joined: Sun Aug 21, 2005 10:17 am
Location: Minnesota, USA

working sample for usb keyboad?

Post 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?
holiday
Posts: 5
Joined: Sun Aug 21, 2005 10:17 am
Location: Minnesota, USA

Post 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
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post 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...
radad
Posts: 246
Joined: Wed May 19, 2004 4:54 pm
Location: Melbourne, Australia

Post 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.
Post Reply