I'm totally a newbie to PS2 programming so sorry for my stupidness, just recently take a look at PS2SDK. I also coded some simple programs, work fine on Naplink but totally failed from other loaders such as LaunchELF even the "Hello world" that was bundled in PS2SDK1.2
I did these steps for the "Hello world !" ELF:
FTP -> mc0:/HELLO.ELF --> boot LaunchELF -->FileBrower --> execute --> freeze...nothing
(Here Helloworld from PS2SDK for your easy ref.)
Code: Select all
#include <tamtypes.h>
#include <sifcmd.h>
#include <kernel.h>
#include <sifrpc.h>
#include "sio.h"
int main()
{
SifInitRpc(0);
/*
init_scr();
scr_printf("Hello, world!\n"); // hello world in the screen
*/
printf("Hello, world!\n");
nprintf("Hello, again, from Naplink RPC!\n");
sio_init(115200, 0, 0, 0, 0);
sio_printf("Hello from EE SIO!\n");
/* Return to the bootloader or PS2 browser. */
SleepThread();
}
Moreover, how do we know the location that our ELF was loaded ? Supposed to be in arg[0] but see nothing in Naplink.
Thx
NEWBIE