forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

USB KB

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
ripplar



Joined: 03 May 2004
Posts: 8

PostPosted: Sun May 16, 2004 5:25 am    Post subject: USB KB Reply with quote

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
View user's profile Send private message Send e-mail
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Sun May 16, 2004 7:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
ripplar



Joined: 03 May 2004
Posts: 8

PostPosted: Mon May 17, 2004 12:57 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
ripplar



Joined: 03 May 2004
Posts: 8

PostPosted: Wed May 19, 2004 11:59 am    Post subject: Ok Reply with quote

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
View user's profile Send private message Send e-mail
pixel



Joined: 30 Jan 2004
Posts: 791

PostPosted: Wed May 19, 2004 2:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Wed May 19, 2004 2:09 pm    Post subject: Reply with quote

Simple translation:

Find out which directory contains libkbd.a, then add this to your flags:

-L/path/to/your/libraries -lkbd
Back to top
View user's profile Send private message Visit poster's website
ripplar



Joined: 03 May 2004
Posts: 8

PostPosted: Thu May 20, 2004 9:49 am    Post subject: Thanks Reply with quote

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
View user's profile Send private message Send e-mail
ripplar



Joined: 03 May 2004
Posts: 8

PostPosted: Thu Jun 03, 2004 9:51 am    Post subject: ok Reply with quote

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
View user's profile Send private message Send e-mail
ripplar



Joined: 03 May 2004
Posts: 8

PostPosted: Thu Jun 03, 2004 9:53 am    Post subject: opps Reply with quote

forgive my spelling having a long day
Back to top
View user's profile Send private message Send e-mail
mharris



Joined: 25 Jan 2004
Posts: 155
Location: Annapolis, MD, USA

PostPosted: Thu Oct 28, 2004 3:43 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Thu Oct 28, 2004 4:35 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group