forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

smallest ps2 program.

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
shdi_us



Joined: 15 Jul 2009
Posts: 4

PostPosted: Wed Jul 15, 2009 4:00 pm    Post subject: smallest ps2 program. Reply with quote

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
Back to top
View user's profile Send private message
misfire



Joined: 06 Sep 2004
Posts: 120
Location: Germany

PostPosted: Wed Jul 15, 2009 5:33 pm    Post subject: Reply with quote

Use the prebuilt PS2SDK provided here for Windows dev and take a look at the samples.
Back to top
View user's profile Send private message
shdi_us



Joined: 15 Jul 2009
Posts: 4

PostPosted: Thu Jul 16, 2009 6:15 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
shdi_us



Joined: 15 Jul 2009
Posts: 4

PostPosted: Thu Jul 16, 2009 6:29 am    Post subject: Reply with quote

is a make file similar to a batch file?
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Thu Jul 16, 2009 7:56 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message AIM Address
shdi_us



Joined: 15 Jul 2009
Posts: 4

PostPosted: Thu Jul 16, 2009 1:24 pm    Post subject: Reply with quote

uhm, well thanks for the warm invitation, but i now have the .elf i wanted. thank you misfire.


hahahahaha j.f.= jerk fiend.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Thu Jul 16, 2009 1:40 pm    Post subject: Reply with quote

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. :)
Back to top
View user's profile Send private message AIM Address
jgrimm



Joined: 29 Nov 2009
Posts: 27

PostPosted: Sun Nov 29, 2009 2:17 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group