Page 1 of 1

Padman Xpadman and Remote control

Posted: Fri Sep 10, 2004 10:51 pm
by krilon
Hi!

I have just started testing out libpad in ps2sdk, my goal is to use the remote control (yet another multimedia-player initiative, getting back to that later).

I have managed to get the rom0:/padman.irx to work. It works for both the Dual Shock and parts of the remote control (typically the buttons that match the dual shock). However it does not handle the extra buttons, and dumping the pad_state does not seem to indicat that anything else is present.

I then tried to use xpadman, but I have been unsuccessful in getting it to work. It loads ok and it seems to init ok (padInit, padMaxPorts() and padMaxSlots() returns ok) padGetModVersion returns 774 (if I remember correcly), but padGetState returns ERROR. So what am I doing wrong?!
My test is based on pad.c (Pukko's pad test). I have a PAL 30004R if that matters. I will add the output from loading the XPADMAN when I get home, but it identifies itself as "Pad Driver for OSD (2000/12/05 18:05) 392, 128"

Can somebody help me out here?!

Also can somebody explain the difference between PADMAN and XPADMAN?! Will XPADMAN support the remote control or is there some othere IRX I need to use?!

I mentioned earlier that I am writing a media-player. It seems that that is the thing to do at the moment!!! What if we pull together?! Have a look at http://ps2mc.sf.net. I am currently porting the GUILIB part of XBMC (which will allow skinning). I have not done anything to get a divx player running (I have scanned the ffmpeg code, but not much more).

Posted: Fri Sep 10, 2004 11:32 pm
by pixel
My main point actually is to make ffmpeg working, and if I can, make it working fast (that is, with some asm magic in it). I don't quite wanna bother with any gui whatsoever. So, if gui-gurus are over there, welcome.

And on a side note, I don't have the answer to your question :P

Posted: Fri Sep 10, 2004 11:59 pm
by krilon
My main driver is to get a good (as good as XBMC) FREE mediaplayer for the PS2. With such a great open-source community on the PS2 we should be able to get a FREE media-player out there. I really like the XBMC so I want to use the best parts of that as a platform for ps2mc.

Another part of this is to learn PS2DEV (I am quite new with the PS2 dev, so I have a long way to go).

The reason for starting with the GUILIB was actually just to learn some GS-stuff.

Are you planning (or already using) to use the IPU for IDCT and color conversion?! Can the IPU be used for macro-block decoding even for divx, i.e is the mb the same for MPEG-2 and MPEG-4 (it seems so from the ffmpeg code, but I have not tested this). I guess the hard-bit is to get fast motion decoding?! Can the VU be used for some of this, or is that a dead-end?! It seems like such a waste having the VUs do nothing.

Posted: Sat Sep 11, 2004 3:02 am
by pixel
I actually have no idea. My main point is:

-) First, make something which WORKS, even if it's fully software on the EE.
-) Second, enable and test the already present ffmpeg's IDTC MMI code. (it is not used at all in the code actually)
-) Third, move some audio codecs to the IOP
-) Fourth, bug blackdroid, tyranid or any other ASM/MMI/IPU/VU wizard around here to get things optimized :P


Anyway, if you really wanna collaboration, build up a nice GUI, I'll provide the grunt player library.

Posted: Sun Sep 12, 2004 7:41 am
by J.F.
I don't think any audio codec beyond ADPCM will run full speed on the IOP. People tried for years to do audio codecs on the PS1, but I haven't seen one yet that worked in real-time.

However, the IOP is ideally suited to loading the data from the source and doing the container stream splitting. Why have the EE seperate the video and audio streams inside an AVI when the IOP can for free as it's reading the data from the CD/HDD/ENet/USB.

I agree - get it working, then make it work better. Once a code base has been established, others can help make improvements. Some folks don't want to do all the work needed to make a player, but they will work on one little piece. Until someone does all the "grunt work," they won't be able to work on the little piece they are willing to work on.

As to the IR remote, the PS2 Linux uses an entirely different access method than the other controllers. I suspect that the IRR uses a completely different serial protocol than the pads and you'll have to communicate with it directly using the serial IRX rather than PADMAN/XPADMAN.

Posted: Sun Sep 12, 2004 7:57 am
by pixel
So, why are ps2reality guys having an ogg.irx thing? :P

Anyway, I am actually decoding some DivX frames now... The biggest problem is not porting ffmpeg itself. It's understanding how it works. Documentation and examples are bad...

Posted: Mon Sep 13, 2004 3:54 am
by TyRaNiD
You do need to access the remote control in a special way in order to retrieve all the buttons, there is RMMAN in rom1 which you can use however you need the EE side RPC code in order to access it (plus some pain in actually using the thing).

I got around to committing the EE side code into ps2sdk in librm, I haven't tested it on anything but my own PS2 with an official Sony remote control, YMMV.

Posted: Mon Sep 13, 2004 7:16 am
by J.F.
pixel: The ogg folks made a special integer only deoder meant for low-power RISC chips like the ARM. I imagine it MIGHT run full speed on the IOP. I should probably test that by making an ogg player that runs off the IOP similar to the simple mp3 players for ps2sdk.

TyRaNiD: Cool. Been looking forward to trying some IRR support. I'll have to check it on mine. I have the official Sony remote as well, but it's probably a different PS2 at least. :)

remote control support

Posted: Wed Dec 15, 2004 4:44 am
by florinsasu
in order to have remote control support you have to load rom1:rmman (that also uses sio2man from rom1) or rom0:xrmman2 from newer bioses (>50k).

the first one has support for ir receiver and the second one have support for the built in ir (and uses the new sceCdSCmdApply2 call 112 in xcdvdman).

rmman has ee side support in ps2sdk, support that is a bit incorrect...
i have the corrections. anyone with access and willing to do the change?