Page 1 of 1
Starting out..
Posted: Wed Jul 26, 2006 4:02 pm
by doc.o
Hello, i've just now started getting into ps2dev. I have not found a single example of what the ps2 uses as a header file; as opposed to #include <stdio.h> that window's uses. More like a hello world starter. Maybe more direct if someone could show me a short snippet of 'translation' to this.
Code: Select all
#include <stdio.h>
int main()
{
printf("Hello world!\n");
return(0);
}
Thanks :)
Posted: Wed Jul 26, 2006 4:22 pm
by Drakonite
That should pretty much compile and run just fine ;)
....there are lots of examples in svn and with ps2sdk.
Posted: Wed Jul 26, 2006 4:25 pm
by doc.o
Drakonite wrote:That should pretty much compile and run just fine ;)
....there are lots of examples in svn and with ps2sdk.
It doesn't launch after I compile it for some reason, i figured it was because the ps2 use's different header rather than stdio.h.
EDIT: It still is giving problems.. I tried it thru ps2link and emulator, it prints nothing to my TV screen at all but does print into the output of ps2link via PC screen.
Posted: Thu Jul 27, 2006 10:04 am
by doc.o
nevermind had to use debug.h along with scr_printf.
Posted: Thu Jul 27, 2006 9:24 pm
by Drakonite
doc.o wrote:
EDIT: It still is giving problems.. I tried it thru ps2link and emulator, it prints nothing to my TV screen at all but does print into the output of ps2link via PC screen.
Thats because thats what it's supposed to do...
The PS2 doesn't have a text mode display, so stdio is redirected to the pc console when running ps2link so that you can print out information while debugging.
scr_printf is a hack to render some text on the tv screen, originally intended for debugging purposes
Posted: Fri Jul 28, 2006 2:41 am
by doc.o
Drakonite wrote:doc.o wrote:
EDIT: It still is giving problems.. I tried it thru ps2link and emulator, it prints nothing to my TV screen at all but does print into the output of ps2link via PC screen.
Thats because thats what it's supposed to do...
The PS2 doesn't have a text mode display, so stdio is redirected to the pc console when running ps2link so that you can print out information while debugging.
scr_printf is a hack to render some text on the tv screen, originally intended for debugging purposes
Oh alright good to know :) thanks. Another question, is there a way to load a ASM into your elf if I was to write some FNC's in it?
Anyways thanks in advance.
Posted: Fri Jul 28, 2006 7:19 am
by JorDy
you can create a "blah.s" file for your asm chekck out some source codes and just include it in the objects inside the makefile