Hello World not working

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

Moderators: cheriff, Herben

Post Reply
n2liquid
Posts: 4
Joined: Tue Jan 02, 2007 7:27 pm

Hello World not working

Post by n2liquid »

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: Select all

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: Select all

#include <tamtypes.h>
#include <kernel.h>
#include <sifrpc.h>
#include <stdio.h>
#include <debug.h>

int main&#40;int argc, char *argv&#91;&#93;&#41;
&#123;
   SifInitRpc&#40;0&#41;;

   init_scr&#40;&#41;;
   scr_printf&#40;"Hello, world!\n"&#41;;
   printf&#40;"Hello, world!\n"&#41;;
   
   while&#40;1&#41; &#123;&#125;
   
   return 0;
&#125;
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?
Post Reply