LoadExecPS2 and ExecPS2

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
Raizor
Posts: 60
Joined: Sun Jan 18, 2004 12:27 am
Location: out there

LoadExecPS2 and ExecPS2

Post by Raizor »

Does anyone know if LoadExecPS2 calls ExecPS2 after loading the elf file? or is it a totally seperate entity? I've been hunting around for info but came up with nothing so far.

Thanks in advance,

Raizor
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

Yes, it does. LoadExecPS2() actually invokes another program, called EELOAD, which is copied from the BIOS to 0x82000 and executed. EELOAD takes over at step 1 below.

LoadExecPS2():
0. Wipe all EE RAM above 0x80000 and do a "full" EE peripheral reset.
1. Reset IOP with image specified as an argument, or default rom0:EELOADCNF.
2. Parse other args that I don't particularly remember off the top of my head :). These args specify extra modules to preload, whether or not the modules or executable uses MagicGate, etc.
3. sceSifLoadElf() on the file.
4. ExecPS2() the loaded image.

ExecPS2():
0. Do a soft EE peripheral reset.
1. Terminate all threads and delete all semaphores.
2. Setup the program's thread and execute the program.
Raizor
Posts: 60
Joined: Sun Jan 18, 2004 12:27 am
Location: out there

Post by Raizor »

MrBrown, Thank you for this detailed info. I really appreciate it.

Raizor
Post Reply