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 

Hello World not working

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



Joined: 02 Jan 2007
Posts: 4

PostPosted: Tue May 01, 2007 12:41 pm    Post subject: Hello World not working Reply with quote

Hello guys, I'm new here.

I don't have an ethernet adapter, so I use LaunchElf with a mp3 player. i've already run some code from the tutorials in ps2dev.org. But every sample that came with PS2SDK doesn't run. Ps2 just hang up. I've tried doing a simple hello world, and this also does not work. LaunchElf just says "Loading mass:hello.elf" and nothing happens.

Here is my code:
Makefile
Code:
EE_BIN = hello.elf
EE_OBJS = hello.o
EE_LIBS = -ldebug

all: $(EE_BIN)

clean:
   rm -f *.elf *.o *.a

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal


hello.c
Code:
#include <tamtypes.h>
#include <kernel.h>
#include <sifrpc.h>
#include <stdio.h>
#include <debug.h>

int main(int argc, char *argv[])
{
   SifInitRpc(0);

   init_scr();
   scr_printf("Hello, world!\n");
   printf("Hello, world!\n");
   
   while(1) {}
   
   return 0;
}


It compiles fine, but when I run nothing happens. I wonder if shouldn't I reset dma and gs, as done in the tutorials.

Sorry for my bad english, I'm brazilian.
Any idea?
Back to top
View user's profile Send private message
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