simple hello world, can someone help me ?

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

Moderators: cheriff, Herben

Post Reply
ps2freak
Posts: 4
Joined: Thu Jul 22, 2004 2:54 am

simple hello world, can someone help me ?

Post by ps2freak »

hello,

i will that this hello world program run under the ps2.
The code is:

Code: Select all

#include "stdio.h";

void main()
{
     printf("Hello World !!!\n");
     printf("(C)2004 by ps2freak");
}
i have found an example in the ps2sdk directory:

Code: Select all

#include <tamtypes.h>
#include <sifcmd.h>
#include <kernel.h>
#include <sifrpc.h>
#include "sio.h"

int main&#40;&#41;
&#123;   
   SifInitRpc&#40;0&#41;; 
/*
   init_scr&#40;&#41;;
   scr_printf&#40;"Hello, world!\n"&#41;; // hello world in the screen
*/
   printf&#40;"Hello, world!\n"&#41;;
   nprintf&#40;"Hello, again, from Naplink RPC!\n"&#41;;
   
   sio_init&#40;115200, 0, 0, 0, 0&#41;;
   sio_printf&#40;"Hello from EE SIO!\n"&#41;;

   /* Return to the bootloader or PS2 browser. */
   return 0;
&#125;
this code i have edit into the following:

Code: Select all

#include <tamtypes.h>
#include <sifcmd.h>
#include <kernel.h>

int main&#40;&#41;
&#123;   
   SifInitRpc&#40;0&#41;; 

   printf&#40;"Hello, world!\n"&#41;;
   printf&#40;"&#40;C&#41;2004 by ps2freak"&#41;;

   /* Return to the bootloader or PS2 browser. */
   return 0;
&#125;
Ist this correct ?

my system is winxp and i have visual c++ 6.0 standard

the ps2sdk is under C:\ps2sdk

How can i compile this program for a ps2 system ?

thanks.
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

Okay. I have to tell you that you are a bit getting on my nerves.

Please, please, oh pretty please with sugar on top, go READ the other posts on the forum, go READ the various documentations around the website (which is http://ps2dev.org in case you missed something) before posting dumb posts.

First, big hint: the toolchain. This beast is mandatory to get a PS2 compiler. No, you can't compile PS2 code using Microsoft Visual Studio.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
ps2freak
Posts: 4
Joined: Thu Jul 22, 2004 2:54 am

Post by ps2freak »

hmm very shit support here.

now i have files for visual studio 6 and they works finde. thanks and goodbye. :lol:
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post by blackdroid »

its not a kindergarten live with it, if you are told to read up, go read, or dont bother asking.
Kung VU
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

(C)2004 by ooPo
Post Reply