Page 1 of 1
smallest ps2 program.
Posted: Wed Jul 15, 2009 4:00 pm
by shdi_us
Im trying to build a really small elf, that relies on the least amount of hardware or calls i guess. here is and example i found but i cant get it to compile.
#include <kernel.h>
#include <sifrpc.h>
int main (void)
{
SifInitRpc (0);
init_scr();
scr_printf ("ps2dev");
SleepThread (();
return 1;
}
what do i name this file?
I guessed and named it main.cpp, but it returns errors at int main (
can you explain these to me?
ee-gcc main.cpp -c -o main.o -Ic:/ps2dev/ps2lib/ee/include/
ee-gcc main.o -Tlinkfile -o ps2.elf -Lc:/ps2dev/ps2lib/ee/lib -lgcc -lkernel -lmc -lpad
im using ps2dev.exe from here:
http://resource.gameres.com/ps2DevEnvironment.exe
Posted: Wed Jul 15, 2009 5:33 pm
by misfire
Use the prebuilt PS2SDK provided
here for Windows dev and take a look at the samples.
Posted: Thu Jul 16, 2009 6:15 am
by shdi_us
prebuilt PS2SDK installed. thank you
still a little clues on compiling this, but im do some attempts
notepad
#include <kernel.h>
#include <sifrpc.h>
int main (void)
{
SifInitRpc (0);
init_scr();
scr_printf ("PS2 roolz!");
SleepThread (();
return 1;
}
and saved as main.cpp
k, now when i run this command
ee-gcc main.cpp -c -o main.o -Ic:/mysys/1.0/local/ps2dev/ps2dev/ps2lib/ee/include
i get a huge list of errors starting with
kernel.h no such file or directory
Posted: Thu Jul 16, 2009 6:29 am
by shdi_us
is a make file similar to a batch file?
Posted: Thu Jul 16, 2009 7:56 am
by J.F.
shdi_us wrote:is a make file similar to a batch file?
No, now go away and learn to use gcc before coming back. We don't give basic lessons on programming here. There are literally THOUSANDS of other sites the DO give basic lessons.
Posted: Thu Jul 16, 2009 1:24 pm
by shdi_us
uhm, well thanks for the warm invitation, but i now have the .elf i wanted. thank you misfire.
hahahahaha j.f.= jerk fiend.
Posted: Thu Jul 16, 2009 1:40 pm
by J.F.
You misunderstand - I'm the NICE one. You don't want to see the response you get from asking things like "what's the difference between makefiles and batch files?" for some of the people here. I simply told you to go learn some basic skills first. Your parentage, ancestry, and mating habits didn't come into question at all. :)
Posted: Sun Nov 29, 2009 2:17 am
by jgrimm
hey shdi_us could u plz show me how u got it to work because i tried a similar program wich compiled with no errors but only show a black screen when i run it with ulaunchELF