I noticed that some Apps like PS2PSXe can accept a launch argument Example:
ps2psxe.elf -cdimage=
Im working on a homebrew application and want to be able to create a second application that accepts some arguments such as the main executable of a game (and its arguments) and when this application starts up running some type of file operation on the memorycard for example, and then pass an argument to the second application when its loaded
For example This Code Snippet Launches the PS2LOGO that is displayed when launching a disc however the code is passing an argument to ps2logo that contains an elf that accepts it own arguments in this case a games main executable (socom combined assault) and i am also passing another set of arguments to its executable that cause it to load directly into LAN mode using the save profile in slot 0.
In my Case im not trying to Load PS2LOGO im trying to boot up my own application that accepts arguments like this runs some code that i have written, for example add some files to the memorycard the issue is Im not very skilled in C and so i dont know the terminology of things very well or where to begin on writing code that will allow my homebrew app to recognize the arguments thrown at it when it is being launched.
Essentially
In my First App I would want to Write some code like this that specifies the arguments that need to be passed to the second program.
Example
the Second program would then run and then it would take the arguments passed to it when it is booted and run what its programmed to do and then launch the program specified in the above sample code with its arguments (scus_975.45) the problem is i dont know how to write code that would allow my "program2.elf" to accept these launch arguments in the first place.
So in program one I would include the second Sample Code Snippet that launches my program2.elf, program2 then accepts the launch arguments, runs its code and then executes socom CA main executable with the arguments i supplied for it in program one.
So basically I want program to be able to accept a set of launch arguments like the socom ca main executable
Im sorry if this sounds repetitive or erroneous but i dont know else how to describe my issues.
Would anyone know how i could make my program be capable of accepting a launch argument?
Thanks in Advance
-Based_Skid
ps2psxe.elf -cdimage=
Im working on a homebrew application and want to be able to create a second application that accepts some arguments such as the main executable of a game (and its arguments) and when this application starts up running some type of file operation on the memorycard for example, and then pass an argument to the second application when its loaded
For example This Code Snippet Launches the PS2LOGO that is displayed when launching a disc however the code is passing an argument to ps2logo that contains an elf that accepts it own arguments in this case a games main executable (socom combined assault) and i am also passing another set of arguments to its executable that cause it to load directly into LAN mode using the save profile in slot 0.
Code:
char *argvs[1];
argvs[0] = "cdrom0:\SCUS_975.45;1";
argvs[1] = "--mission";
argvs[2] = "ui_lan";
argvs[3] = "--profile";
argvs[4] = "0";
argvs[5] = NULL;
LoadExecPS2("rom0:PS2LOGO", 5, argvs);
Essentially
In my First App I would want to Write some code like this that specifies the arguments that need to be passed to the second program.
Example
Code:
char *argvs[1];
argvs[0] = "cdrom0:\SCUS_975.45;1";
argvs[1] = "--mission";
argvs[2] = "ui_lan";
argvs[3] = "--profile";
argvs[4] = "0";
argvs[5] = NULL;
LoadExecPS2("mc0:/folder/program2.elf", 5, argvs);
So in program one I would include the second Sample Code Snippet that launches my program2.elf, program2 then accepts the launch arguments, runs its code and then executes socom CA main executable with the arguments i supplied for it in program one.
So basically I want program to be able to accept a set of launch arguments like the socom ca main executable
Im sorry if this sounds repetitive or erroneous but i dont know else how to describe my issues.
Would anyone know how i could make my program be capable of accepting a launch argument?
Thanks in Advance
-Based_Skid