| View previous topic :: View next topic |
| Author |
Message |
ripplar
Joined: 03 May 2004 Posts: 8
|
Posted: Sun May 16, 2004 5:25 am Post subject: USB KB |
|
|
Here's a question I have downloaded the new sdk that is ava. My question is if I use the ps2kdb.h in the sdk/ee/include directory what is the command or what do I need to put in my code to init the kbd. If I was to load up the sdk/iop/irx/ps2kbd.irx would that make the cin command work or do I need something else to type in beside that like init_kbd()
Ripplar
:?: |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Sun May 16, 2004 7:22 pm Post subject: |
|
|
You also currently need a usb driver, which you can get off a few game disks.
It should be called something like usbd.irx, load that module first before the one for the kbd and then just init the keyboard library. |
|
| Back to top |
|
 |
ripplar
Joined: 03 May 2004 Posts: 8
|
Posted: Mon May 17, 2004 12:57 pm Post subject: |
|
|
Thanks alot TyRaNiD for the help but I guess I need to typ init_kbd() and then type what input I need inside the () for ex...
int a, b ,c
scr_printf("enter 2 numbers\n");
init_kbd(a);
init_kbd(b);
scr_printf("these numbers equal ... when added\n");
c=add (a,b);
something along these line would this allow input from a kb to get intergers a and b..
still having trouble... |
|
| Back to top |
|
 |
ripplar
Joined: 03 May 2004 Posts: 8
|
Posted: Wed May 19, 2004 11:59 am Post subject: Ok |
|
|
I figure some more info out and here is my problem when I try to compile
the following code:
#include <tamtypes.h>
#include <sifcmd.h>
#include <kernel1.h>
#include <sifrpc.h>
#include <libkbd.h>
// The above file are part of the PS2LIB and are used in the following functions
// The code below is try to get the PS2 keyboard to react
int main()
{
PS2KbdInit();
return 0;
}
ee-gcc -D_EE -fshort-double -fno-builtin -O2 -G0 -c -Wall -I/usr/local/ps2dev/ps
2lib/ee/include -I/usr/local/ps2dev/ps2lib/common/include -I. kbd.c -o kbd.o
kbd.c:16:2: warning: no newline at end of file
ee-gcc -nostartfiles -T/usr/local/ps2dev/ps2lib/ee/startup/linkfile -L/usr/local
/ps2dev/ps2lib/ee/lib -o kbd.elf /usr/local/ps2dev/ps2lib/ee/startup/crt0.o kbd
.o -lkernel
kbd.o: In function `main':
kbd.o(.text+0x8): undefined reference to `PS2KbdInit'
collect2: ld returned 1 exit status
make: *** [kbd.elf] Error 1
Now I have wverything set according to Dan Peori toolchanin.sh file @ <peori@oopo.net>
anysuggestions at what to look at. The stuff I'm trying to requires keyboard access. |
|
| Back to top |
|
 |
pixel
Joined: 30 Jan 2004 Posts: 791
|
Posted: Wed May 19, 2004 2:01 pm Post subject: |
|
|
Now where in the world did you see a libkbd.h file in ps2lib ?
There is one in ps2hid. But now I wonder how this file got in your include path. Anyway, that libkbd is part of the ps2hid package. So, you actually need to add -lkbd to your linking phase, so that the libkbd portion of ps2hid will get linked in. If you presumabily compiled ps2hid correctly, and that the libkbd.a lies under some library searching path. _________________ pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department. |
|
| Back to top |
|
 |
ooPo Site Admin
Joined: 17 Jan 2004 Posts: 2032 Location: Canada
|
Posted: Wed May 19, 2004 2:09 pm Post subject: |
|
|
Simple translation:
Find out which directory contains libkbd.a, then add this to your flags:
-L/path/to/your/libraries -lkbd |
|
| Back to top |
|
 |
ripplar
Joined: 03 May 2004 Posts: 8
|
Posted: Thu May 20, 2004 9:49 am Post subject: Thanks |
|
|
| Thanks ooPo for your input I will let you know what's going on with this after I try you inputs.. Also I'm using PS2SDK to get my libkbd libs I just added the different file into my $PS2LIB include directories. |
|
| Back to top |
|
 |
ripplar
Joined: 03 May 2004 Posts: 8
|
Posted: Thu Jun 03, 2004 9:51 am Post subject: ok |
|
|
I have added my my lkdb to my make file and compiled it correctly with out error. I have a new proble when using Pukklink v1.0b and Inlink v1.3.7 I load my usbd.irx file fine. It tells me USB Driver(Version 1.1.0) (all good I assume). Now the fun part it seems to lockup and I have to turn off my ps2 after tring to load the file ps2kbd.irx. It does apsolutely nothing. I tell me loading file then drops connection due to time out or lost. Please help...
ripplar |
|
| Back to top |
|
 |
ripplar
Joined: 03 May 2004 Posts: 8
|
Posted: Thu Jun 03, 2004 9:53 am Post subject: opps |
|
|
| forgive my spelling having a long day |
|
| Back to top |
|
 |
mharris
Joined: 25 Jan 2004 Posts: 155 Location: Annapolis, MD, USA
|
Posted: Thu Oct 28, 2004 3:43 am Post subject: |
|
|
Sorry for bumping such an old thread, but I've been away for a while...
| ripplar wrote: | | I have added my my lkdb to my make file and compiled it correctly with out error. I have a new proble when using Pukklink v1.0b and Inlink v1.3.7 I load my usbd.irx file fine. It tells me USB Driver(Version 1.1.0) (all good I assume). Now the fun part it seems to lockup and I have to turn off my ps2 after tring to load the file ps2kbd.irx. It does apsolutely nothing. I tell me loading file then drops connection due to time out or lost. Please help... |
I am working on a similar thing, and I think the problem is with inlink.
I'm in the process of moving my dev environment from emacs+linux to eclipse+windows (mostly because my windows machine is newer and faster than my aging linux box). In any event, I have the same issue when I try to run it from inlink 1.3.7 on the WinXP machine: it loads and inits the SCE usbd.irx OK, but loading ps2kbd.irx hangs the PS2 and inlink gets a socket error. The PS2 must be physically switched off.
Interestingly, when I load the identical .elf and .irx files from my Linux machine (via pksh) it has no problems at all and behaves as expected. So my guess is that it's inlink. I haven't yet tried building a Win32 version of pksh to try out; that's next. |
|
| Back to top |
|
 |
ooPo Site Admin
Joined: 17 Jan 2004 Posts: 2032 Location: Canada
|
|
| Back to top |
|
 |
|