Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.
7 posts • Page 1 of 1
If you want the ability to do generic elf launching exactly like uLE, to get the same degree of compatibility to other elfs, then you will need to copy quite a lot of the methods used by uLE into your own program. This includes, but is not limited to, a special 'loader' subprogram that is compiled as a separate elf file which is embedded as data inside the main uLE program file.jgrimm wrote:ok, im not i t much of a c or c++ person but i can program my ps2, havent looked at ulaunchelf source much though i dont need u to do it for me, but could u tell me how? or at least give me a vauge idea? thx
uLE normally does not launch an external target elf directly, but instead does it by preparing the full pathname of that target elf and passing this as an argument in launching the 'loader' elf from embedded storage. It is this 'loader' program that then launches the real target elf.
The advantage of such a method, widely used in other PS2 homebrews as well, is that all the memory spaces normally used by uLE are freed up before the real target elf is launched. Thus there will be no memory conflicts with any such elfs, unless they happen to use the same memory segments in which the tiny 'loader' program resides. And those memory segments were of course chosen so as to avoid overlapping any area used by normal programs, including both commercial games and homebrews.
Inside the uLE source package you will find the "loader" subprogram source code in a subfolder with the same name, and the code of the main program that invokes this 'loader' is found in the file "elf.c".
For the rest you're on your own...
Best regards: dlanor