| View previous topic :: View next topic |
| Author |
Message |
doc.o
Joined: 26 Jul 2006 Posts: 6
|
Posted: Wed Jul 26, 2006 4:02 pm Post subject: Starting out.. |
|
|
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: | #include <stdio.h>
int main()
{
printf("Hello world!\n");
return(0);
} |
Thanks :) |
|
| Back to top |
|
 |
Drakonite Site Admin

Joined: 17 Jan 2004 Posts: 989
|
Posted: Wed Jul 26, 2006 4:22 pm Post subject: |
|
|
That should pretty much compile and run just fine ;)
....there are lots of examples in svn and with ps2sdk. _________________ Shoot Pixels Not People!
Makeshift Development |
|
| Back to top |
|
 |
doc.o
Joined: 26 Jul 2006 Posts: 6
|
Posted: Wed Jul 26, 2006 4:25 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
doc.o
Joined: 26 Jul 2006 Posts: 6
|
Posted: Thu Jul 27, 2006 10:04 am Post subject: |
|
|
| nevermind had to use debug.h along with scr_printf. |
|
| Back to top |
|
 |
Drakonite Site Admin

Joined: 17 Jan 2004 Posts: 989
|
Posted: Thu Jul 27, 2006 9:24 pm Post subject: |
|
|
| 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 _________________ Shoot Pixels Not People!
Makeshift Development |
|
| Back to top |
|
 |
doc.o
Joined: 26 Jul 2006 Posts: 6
|
Posted: Fri Jul 28, 2006 2:41 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
JorDy
Joined: 11 Dec 2005 Posts: 121
|
Posted: Fri Jul 28, 2006 7:19 am Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
|