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 

Ps2SDK mouse driver issue ?

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



Joined: 31 Aug 2004
Posts: 244
Location: Somewhere over the rainbow

PostPosted: Tue Feb 22, 2005 6:40 pm    Post subject: Ps2SDK mouse driver issue ? Reply with quote

Hello,

I've got a strange behavior using the mouse driver and even looking at the code I don't know really why...

So let me explain...

After you have loaded a decent USBD.IRX and then the PS2MOUSE.IRX drivers, you call :

Code:
if(PS2MouseInit() < 0) {...


to check is the mouse is well initialized...

My issue is :
- If a mouse is connected, works fine, returns 0
- If NO mouse attached to the ps2... it returns 0 !!!!! (and not -1)

Same behavior with PS2ReadMouse.... (strange isn't it)

Any idea ?
_________________
- TiTAN Art Division -
http://www.titandemo.org
Back to top
View user's profile Send private message Visit poster's website
Shazz



Joined: 31 Aug 2004
Posts: 244
Location: Somewhere over the rainbow

PostPosted: Fri Feb 25, 2005 6:16 pm    Post subject: Reply with quote

Ok solved by Pixel....

:D

For those you are interested, the init() only check the IOP RPC communication, not the connection of any mouse (as the keyboard driver does), you have to check the number of mouse connected using PS2MouseEnum()

Sinple but when you don't know... :D
_________________
- TiTAN Art Division -
http://www.titandemo.org
Back to top
View user's profile Send private message Visit poster's website
moofasa



Joined: 18 Feb 2005
Posts: 7
Location: S.Korea

PostPosted: Sun May 15, 2005 3:22 pm    Post subject: PS2MouseEnum() returns 0. Reply with quote

Hello.

I've tried mouse to be working.
but the PS2MouseEnum() returns always 0.

simplified code is like below:
Code:
//Load 2 Modules
SifLoadModule( "host:USBD.IRX", 0, NULL );
SifLoadModule("host:PS2MOUSE", 0, NULL );

//Init PS2Mouse
PS2MouseInit();
PS2MouseEnum();


With that code and my usb mouse( Logitech mx510, Dual Optical ),
LoadModule and MouseInit return values bigger than 0.
but, PS2MouseEnum just returns 0.

Am i doing something wrong?
_________________
Sorry, for my poor English.~
Back to top
View user's profile Send private message MSN Messenger
rinco



Joined: 21 Jan 2005
Posts: 255
Location: Canberra, Australia

PostPosted: Sun May 15, 2005 3:47 pm    Post subject: Reply with quote

do you have PS2MOUSE?

most people have PS2MOUSE.IRX.
Back to top
View user's profile Send private message
moofasa



Joined: 18 Feb 2005
Posts: 7
Location: S.Korea

PostPosted: Sun May 15, 2005 4:50 pm    Post subject: Reply with quote

Oh. I mistyped.

of course I loaded "host:PS2MOUSE.IRX"
and it returns acceptable id, not -203.

hmm.. should I try with another mouse~?
_________________
Sorry, for my poor English.~
Back to top
View user's profile Send private message MSN Messenger
rinco



Joined: 21 Jan 2005
Posts: 255
Location: Canberra, Australia

PostPosted: Sun May 15, 2005 5:26 pm    Post subject: Reply with quote

I'm not sure what PS2MouseEnum does.

But according to libmouse.c it returns -1 on failure.

So what is wrong with it returning 0? What are you trying to achieve?
Back to top
View user's profile Send private message
moofasa



Joined: 18 Feb 2005
Posts: 7
Location: S.Korea

PostPosted: Sun May 15, 2005 6:02 pm    Post subject: Reply with quote

What I want to get is the current status of mouse( position, buttons, ...)
but PS2ReadMouse fills the structure with 0 value.

so I doubt if the mouse is initialized corretly, and did that kind of check.

ps. as Shazz wrote before, PS2MouseEnum seems to return the number of connected mouse.
If a mouse is connected, then It should normally return 0?
_________________
Sorry, for my poor English.~
Back to top
View user's profile Send private message MSN Messenger
rinco



Joined: 21 Jan 2005
Posts: 255
Location: Canberra, Australia

PostPosted: Sun May 15, 2005 7:53 pm    Post subject: Reply with quote

If you are using usbd.irx from ps2sdk, you may see something like this:

Currently WIP. Do not USE!!!!!!!!!!!!!!!!

You may wish to try usbd.irx from a ps2 game.
Back to top
View user's profile Send private message
moofasa



Joined: 18 Feb 2005
Posts: 7
Location: S.Korea

PostPosted: Mon May 16, 2005 10:30 am    Post subject: Reply with quote

Thank you very much, rinco.
got an idea from your hint.

(getting a working usbd.irx and bin2s-ing... and so on)
_________________
Sorry, for my poor English.~
Back to top
View user's profile Send private message MSN Messenger
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