Page 1 of 1

Test the new ps2client...

Posted: Thu Feb 26, 2004 7:40 am
by ooPo
I've been busy the past week fixing ps2client, mostly because my toolchain is fairly broken and I haven't gotten around to reverting to older patches and rebuilding. Code cleanup, bugfixing, adding some new commands, etc... its all in cvs now. What this means is I'd like people to test it. Play with it. Break it a bit. I want to make sure its fairly solid before I tag it and make a release.

Some things that are new:

1) Finally, execiop works. Yay!

2) New ps2netfs commands. These let you do basic fileio on the ps2 when the ps2netfs module is loaded:

ps2client <hostname> copyfrom <source> <destination>
ps2client <hostname> copyto <source> <destination>
ps2client <hostname> delete <filename>
ps2client <hostname> devlist
ps2client <hostname> dir <directory>
ps2client <hostname> format <device>
ps2client <hostname> mkdir <directory>
ps2client <hostname> mount <device> <fsname>
ps2client <hostname> rename <source> <destination>
ps2client <hostname> rmdir <directory>
ps2client <hostname> sync <device>
ps2client <hostname> umount <device>

3) New listen-mode to just capture log output from ps2link:

ps2client <hostname> listen

4) Timeout values for some ps2link commands. This will allow ps2client to exit after a specified number of milliseconds of inactivity from ps2link. Works good for scripts that load a bunch of irx files, in fact here's the one I use for ps2netfs testing:

## Load the MC modules.
ps2client 192.168.100.10 execiop host:sio2man.irx 1000
ps2client 192.168.100.10 execiop host:mcman.irx 1000

## Load the HDD modules.
ps2client 192.168.100.10 execiop host:ps2atad.irx 1000
ps2client 192.168.100.10 execiop host:ps2hdd.irx 7000
ps2client 192.168.100.10 execiop host:ps2fs.irx 2000

## Load ps2netfs itself.
ps2client 192.168.100.10 execiop host:ps2netfs.irx 1000

5) Build-time options for chatty/debug output, and cygwin sockets since they are a bit different than the unix-style sockets I've been using:

make install CHATTY=YES DEBUG=YES CYGWIN=YES

6) New 'wxvu' commands (untested):

ps2client <hostname> dumpmem <filename> <offset> <size> [timeout]
ps2client <hostname> startvu <0/1>
ps2client <hostname> stopvu <0/1>
ps2client <hostname> dumpreg <filename> <type> [timeout]
ps2client <hostname> gsexec <filename> <size> [timeout]

7) Documentation of the ps2link and ps2netfs protocols in the fancy new doc directory.

Hmm, I can't think of anything else in particular. Poke around with it. Have fun. Etc etc.

Re: Test the new ps2client...

Posted: Thu Feb 26, 2004 11:26 am
by Drakonite
ooPo wrote: ## Load the MC modules.
ps2client 192.168.100.10 execiop host:sio2man.irx 1000
ps2client 192.168.100.10 execiop host:mcman.irx 1000

## Load the HDD modules.
ps2client 192.168.100.10 execiop host:ps2atad.irx 1000
ps2client 192.168.100.10 execiop host:ps2hdd.irx 7000
ps2client 192.168.100.10 execiop host:ps2fs.irx 2000

## Load ps2netfs itself.
ps2client 192.168.100.10 execiop host:ps2netfs.irx 1000
If this is the format for doing timeouts... What happens if I want to send a number as the first argument to what is being run?

Posted: Thu Feb 26, 2004 12:30 pm
by ooPo
Simple. You can't send arguments yet. :)

I just added the timeout stuff this afternoon. I haven't quite figured out what I'm going to do with it yet. Any suggestions?

I probably should move to a proper way of parsing arguments with getopt or something... Hmm.

Posted: Thu Feb 26, 2004 12:40 pm
by Drakonite
Yeah.. having even a halfway proper argument parsing would be nice.

-t1000 or something for timeouts.

If nothing else, put the time out BEFORE the filename to load, then when you finally get around to allowing arguments (why aren't you yet?!?!) it'll work out better.

Posted: Thu Feb 26, 2004 3:42 pm
by ooPo
Made some changes, here's a blurb from readme.txt:
Basic usage:

ps2client [-h hostname] [-t timeout] <command> [arguments]

The hostname is the actual address, or ip of the PS2. If none is
specified, ps2client will check for a hostname in $PS2HOSTNAME.

Timeout is the length of inactivity (in ms) that ps2client will wait
before exiting. If none is specified, -1 (never exit) is assumed.

<command> is what you would like the ps2 to do. Some valid
commands are reset, poweroff, execiop and execee. See below
for a full listing.

[argument] is an optional argument for the given command.
Next is argument passing with execee and execiop.

Posted: Wed Mar 03, 2004 2:40 pm
by ooPo
I've just imported my latest changes to ps2client. Arguments to execee/execiop are working great, a bug with large transfers in ps2netfs commands has been been fixed and there's a whole bunch of error checking and reporting.

So, give it a try. If nothing big pops up in the next day or so I'm going to tag and release it.

Now to write some documentation...

Posted: Mon Mar 08, 2004 3:17 pm
by ooPo
Tagged, released. Fetch the source for ps2client v2.0.0 at my site:

http://www.oopo.net/consoledev

Re: Test the new ps2client...

Posted: Mon Jun 21, 2004 2:21 pm
by redfiat
ooPo wrote: ## Load the MC modules.
ps2client 192.168.100.10 execiop host:sio2man.irx 1000
ps2client 192.168.100.10 execiop host:mcman.irx 1000

## Load the HDD modules.
ps2client 192.168.100.10 execiop host:ps2atad.irx 1000
ps2client 192.168.100.10 execiop host:ps2hdd.irx 7000
ps2client 192.168.100.10 execiop host:ps2fs.irx 2000

## Load ps2netfs itself.
ps2client 192.168.100.10 execiop host:ps2netfs.irx 1000
Whenever I try these commands from cygwin each command
appears to hang or not return to shell (I was expecting it
to behave like a unix daemon).

For example:
$ ps2client execiop host:ps2netfs.irx 2000
IOP cmd: 33554432 args
arg 0: 2000 (0)
PS2_TcpFileDriver - v1.0 - Copyright (c) 2004 adresd
iomanx not found
loadmodule: id 34, ret 1
I then have to CTRL C to get out of it.
I also tried leaving it running , starting a new cygwin and
loading another irx, but that gives errors , Bind Socket Failed. (-1)
Connect to textlog failed.( -3)

btw, I've setup a env variable called PS2HOSTNAME with my
PS2 ip address.

Also I've not been able to load iomanx.irx due to the same reason -
when I try to execiop it it hangs too.

Please can someone point me in the right direction to get this working.
Im trying to enable use of ps2client to copy files to/from the ps2 and my pc.

Posted: Mon Jun 21, 2004 2:32 pm
by redfiat
Further to this, I've now discovered that after the CTRL C
the drivers appear to stay loaded.
However when I try and load iomanx.irx it does not load
$ps2client execiop host:iomanx.irx 1000
IOP cmd: 33554432 args
arg 0: 1000 <0>
loadmodule: id 40, ret 1
CTRL^C
So I cannot load ps2netfs as it moans that it cant find iomanx.irx !

Posted: Mon Jun 21, 2004 2:35 pm
by ooPo
Those specific instructions were written back when ps2client had a built-in timeout value. This didn't work so well, so now you can specify one on the command line. Try this instead:

## Load the MC modules.
ps2client -t 1 execiop rom0:SIO2MAN
ps2client -t 1 execiop rom0:MCMAN

## Load the HDD modules.
ps2client -t 1 execiop host:ps2atad.irx
ps2client -t 7 execiop host:ps2hdd.irx -n 2 -o 4
ps2client -t 2 execiop host:ps2fs.irx

## Load ps2netfs itself.
ps2client -t 1 execiop host:ps2netfs.irx

The timeout value is how long (in seconds) to wait since the last bit of activity from the PS2 before quitting. Notice that ps2hdd.irx needs extra time to for the disc to spin up. Also notice that you can add arguments on the command line as well.

Enjoy!

Posted: Mon Jun 21, 2004 3:19 pm
by redfiat
Thanks :)

I've tried that and here are the results - not good - still complains
about iomanx not being found.
ps2client -t 1 execiop rom0:SIO2MAN
IOP cmd: 16777216 args
loadmodule: id 30, ret 0

ps2client -t 1 execiop rom0:MCMAN
IOP cmd: 16777216 args
loadmodule: id 31, ret 0

ps2client -t 1 execiop host:ps2atad.irx
IOP cmd: 16777216 args
ATA device driver v1.0 - Copyright (c) 2003 Marcus R. Brown
atad_driver: Driver loaded.
loadmodule: id 32, ret 0

ps2client -t 7 execiop host:ps2hdd.irx
IOP cmd: 83886080 args
arg 0: -n (0)
arg 1: 2 (3)
arg 2: -o (5)
arg 3: 4 (8)
ps2hdd: PS2 APA Driver v1.1 (c) 2003 Vector
ps2hdd: max open = 4, 3 buffers
ps2hdd: 17:55:29 86/20/2004
ps2hdd: disk0: 0x04a8b570 sectors, max 0x00200000
ps2hdd: checking log...
ps2hdd: drive status 0, format version 00000002
ps2hdd: driver start.
loadmodule: id 33, ret 0

ps2client -t 2 execiop host:ps2fs.irx
IOP cmd: 16777216 args
ps2fs: Playstation Filesystem Driver v1.0
ps2fs: (c) 2003 Sjeep, Vector and Florin Sasu
ps2fs: Max mount: 1, Max open: 2, Number of buffers: 8
ps2fs: Warning: 12 buffers may be needed, but only 8 buffers are allocated
ps2fs: Driver start.
loadmodule: id 34, ret 0

ps2client -t 1 execiop host:iomanx.irx
IOP cmd: 16777216 args
loadmodule: id 35, ret 1

ps2client -t 1 execiop host:ps2netfs.irx
IOP cmd: 16777216 args
PS2_TcpFileDriver - v1.0 - Copyright (c) 2004 adresd
iomanx not found
loadmodule: id 36, ret 1
Note, I tried this with and without the attempt at loading iomanx.irx.
Neither worked.

Posted: Mon Jun 21, 2004 4:25 pm
by ooPo
Hmm, I don't know anything about that. Perhaps someone else will see this and be able to help you.

Posted: Mon Jun 21, 2004 9:05 pm
by blackdroid
as I said in another thread try a newer version of ps2link.
www.thethirdcreation.net/tools/ps2link-v1.23.zip

Posted: Wed Jun 30, 2004 5:31 am
by 606u
Somehow I've managed to run ps2link and ps2netfs (you should consider a tutorial or something). So far I can execute basic commands, such as "./ps2client.exe dir mc0:/PS2LINK/", etc. I even succeed in mounting the HDD ("./ps2client.exe mount hdd:/" works nevertheless command returns "[ERROR] Mount device failed. (-1)"; that point needs explanation, I think) and now I'm able to execute "./ps2client.exe dir hdd:":

Code: Select all

  ---------x     262144 06-27-2004 09&#58;03&#58;54 __mbr
  -r--------     262144 06-27-2004 09&#58;03&#58;54 __net
  -r--------     524288 06-27-2004 09&#58;03&#58;54 __system
  -r--------    1048576 06-27-2004 09&#58;03&#58;54 __sysconf
  -r--------    1048576 06-27-2004 09&#58;03&#58;54 __common
  -r--------    1048576 06-27-2004 09&#58;03&#58;54 __boot
  --w-----w-     262144 06-26-2004 20&#58;30&#58;09 linux 2
  --w-----wx    2097152 06-26-2004 20&#58;29&#58;49 linux 1
  -r--------    1048576 06-27-2004 20&#58;14&#58;05 PS2MENU-K MC Backup
So, here goes my question: how can I mount a HDD partition (__common, or PS2MENU, for example) and how to copy some files inside (using "ps2client copyto ...")?

Thanks in advance.

PS: I'm using ps2link-1.22, ps2client-2.0.0 and IRX-files from ps2drv-1.2 and libhdd-1.2.

Edit: It looks like first "./ps2client.exe dir hdd:" fails and the from the second further it works. I guess that "./ps2client mount ..." doesn't have influence at all.