Page 1 of 1

Some questions about ps2 development

Posted: Thu Jul 15, 2004 6:41 pm
by ChocoT
Hi all,

First I thanx the ps2dev community to have made homebrew programming a reality. The jobs which has been made is really fantastic: disk io, filesystem, tcp ip, .... Great job guys !

However I have still some a whole bunch of unresolved pbs.

General problem wrt to other Dev Env:
---------------------------------------------

1) Are there any version information embedded with the .irx "drivers" ? Because I got .irx coming from all around the world, so it is hard to know which versions they are.

2) As opposite to Windows (I don't know for Linux), the .irx loading is not dynamic. In order for a module to work, it needs its dependency to be loaded beforehand, otherwise eroor occurs (-200 or -203). Is there any graph of dependency to know which .irx needs to be loaded ?

3) In Windows / Linux when the system wants to load a DLL / .so module in memory, it search for its name in the PATH or LD_LIBRARY_PATH variable. Is there any mean to specifiy a list of place where the to search for a particular .irx ?

=> Implementing sort of dynamic loading of irx using $PATH like mechanism would make a lots of thing simplier. Is there any technical difficulties you forsee before I try to implement it ? I think that in order to do that we need a sort of core libraries to be loaded (like a kernel).

ps2Client questions
----------------------

1) How do I mount a filesystem using ps2client ? In unix it is like

mount -tfat32 /hdd/0/ /MyData/

But as partitionning a HDD is NOT the same in Unix / ps2dev I can't find the proper syntax in the ps2client mount command. Could anyone gimme an example ? What is the proper name for the "filesystem" arg and "device" arg ?

Executing elfs on PS2
-------------------------

1) I made a simple program (a .elf executable). I want to send it several times to the ps2 after I make some correction on it. Is it possible using ps2client or ps2link WITHOUT rebooting my ps2 afterr each run ?

Executing NetFS on ps2-menuk 0.31
-----------------------------------------

1) When i press the select button on the ps2menu-k it should run the NetFS drivers. However it fails saying that it cannot find the necessary .irx. It seraches for those .irx on the psf0: device (in the ps2menu-k elf, there are reference to psf0:ps2netfs.irx, ...) ... What is the psf0: partition is it searching those .irx on ?

Thanx a lot for reading this email,
ChocoT.

Posted: Thu Jul 15, 2004 7:40 pm
by Drakonite
1. This is something I've complained about a lot... Especially with a few that broke compatibility with their old interface but left no way of knowing which was which. AFAIK any IOP module in ps2drv (which is now the iop part of ps2sdk) should contain version information.

2. The dependencies aren't very complex, in fact, only the net/hdd stuff has much for dependencies at all IMO. All of the IOP stuff should have dependency info in the readme's

3. Something like this has to be done on a per-program basis. There really isn't much reason for it to be worthwild. There are three main places to load IOP modules from, the director the program is being told it's being ran from (via argv), some hardwired path like 'host:' (ick), or what seems to be the most popular (and simplest for the user) to bloat your elf a bit by embeding all IOP modules needed that aren't in rom inside of the elf. If you aren't embedding the IOP modules and you can do like I do in some of my testing code, check the currentdir, check host:, check a hardwired path to memory card, and if can't find at any of those, give up and fail. (BTW, I don't mention hdd because if you can read from hdd you are probably about done loading)
I was quite in favor of sharing IOP modules between programs to cut down on excess files laying around, but your 1st question is a big reason it's never happened and why the current habits have been used enough it probably won't happen.

1. No type, they are all PFS.
mount <device> <fsname>
I think...
device will be something like "pfs0:"
fsname will be something like "hdd:partnamehere"
so, 'ps2client mount pfs1: hdd:YoYoYo' would mount the partition named 'YoYoYo' onto pfs1:.

1. If you read readme's and help output from ps2client, you'd notice there is a reset command which resets the programs on the PS2 so you are ready to run another one. It's MUCH faster than rebooting ;)

1. Sounds like a problem with ps2menu-k. I'd very much recommend using the official ps2menu and maybe encourage kayla to submit some of his improvements back to the ps2menu cvs.
Thanx a lot for reading this email
Your welcome....but... this is a message board, not email...

Posted: Fri Jul 16, 2004 6:26 am
by ChocoT
Thanx Drakonite for your reply.

On the depedency stuff
--------------------------
I really do see an added value to make an automatic load of .irx, in a single and small kernel.elf, which would act as "ps2menu.elf" is acting now. However as u mentionned if people are used to it...

On the ps2menu / ps2mnu-k
---------------------------------
Ok, I know use ps2menu.elf as boot.elf. It runs well, and the mount command works... However if I mount the boot partition for example, I can't do a dir on it ! Any clue on that ?

Also, when I boot (ps2menu 2.6b), I got the ps2netfs command working with ps2client (mount, devlist, ...) BUT I don't have access to ps2link commands. So I start by the ps2menu the ps2link.elf, but then I lose access to ps2netfs part of ps2client...

What do I need to do to get ps2link AND ps2netfs running ?

My ideal setup env fo homebrew ps2 dev
-----------------------------------------------
What I basically wants when I boot up my ps2 for homebrew dev is to have all basical services launched:
- ps2netfs so that I can play with filesystems,
- ps2link to send / execute program and irx on my ps2.
- ps2ftpd to easily view all my files on my ps2.

=> this would be an ideal spec for my kernel.elf.

Thanx for reading my post.

ChocoT.

Posted: Fri Jul 16, 2004 6:35 am
by blackdroid
just load ps2netfs after loading ps2link. or use ps2link from cvs and have it autoloaded on bootup.

Posted: Fri Jul 16, 2004 7:11 am
by ooPo
I'd like ps2link to automatically load ps2netfs, if the irx is found.

Get on it! :)

Posted: Fri Jul 16, 2004 7:58 am
by Drakonite
ooPo wrote:I'd like ps2link to automatically load ps2netfs, if the irx is found.

Get on it! :)
CVS of ps2link can automatically load IOP modules you specify in a config file. And if <sarcasm>the great oopo</sarcasm> can't compile from CVS...then.... :P

Posted: Fri Jul 16, 2004 8:40 am
by blackdroid
ooPo wrote:I'd like ps2link to automatically load ps2netfs, if the irx is found.

Get on it! :)
sorry ps2link wont help you find elves or irxes under your bed.

Posted: Fri Jul 16, 2004 9:34 am
by ooPo
It uses a config file now? Wow, that was fast. :)

Posted: Fri Jul 16, 2004 9:39 am
by blackdroid
I guess you just delete cvs mail without any regard whatsoever of the wisdom +10 it will give.

Posted: Fri Jul 16, 2004 9:46 am
by ooPo
GETCHU!!!