USB KB
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
:?:
Ripplar
:?:
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...
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...
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 @ <[email protected]>
anysuggestions at what to look at. The stuff I'm trying to requires keyboard access.
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 @ <[email protected]>
anysuggestions at what to look at. The stuff I'm trying to requires keyboard access.
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.
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.
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
ripplar
Sorry for bumping such an old thread, but I've been away for a while...
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.
I am working on a similar thing, and I think the problem is with inlink.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'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.
There's a win32 version of ps2client on my site if you quickly want to give it a try:
http://www.oopo.net/consoledev/files/ps2client.exe
http://www.oopo.net/consoledev/files/ps2client.exe