Fixed, Pre-Built, Win32 PS2SDK :)

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

Moderators: cheriff, Herben

CutToSleep
Posts: 10
Joined: Sat May 09, 2009 10:03 pm
Location: Russia

Post by CutToSleep »

OK, I'll try reinstalling Windows, but before it I'll check if PS2SDK will work on some other computer.
If you want to ask me why my nick is CutToSleep, then GoToHell.
CutToSleep
Posts: 10
Joined: Sat May 09, 2009 10:03 pm
Location: Russia

Post by CutToSleep »

I reinstalled Windows, and now it works! Thank you! Can you tell of what how can I access basic text output functions (printf etc.), what should I #include, and what else should I do to display a simple message on the screen? Or where can I get an information on functions that are included in your pre-built PS2SDK?
If you want to ask me why my nick is CutToSleep, then GoToHell.
LBGSHI
Posts: 136
Joined: Mon Aug 07, 2006 5:56 am
Contact:

Post by LBGSHI »

Libraries and patches that have been included/applied are detailed in the ReadMe.txt file. I'd recommend Googling for and reading the documentation for those various pieces of the puzzle, if you're looking for specifics. As for source and examples for basic development, check out that compilable source collection I linked you to earlier.

If you'd like to take a look at a basic "Hello World" example, the bottom of this thread (misfire's post) provides one:

http://forums.ps2dev.org/viewtopic.php? ... highlight=

I haven't gotten around to including an ELF version of the Hello World example in the pre-built SDK's sample dir (and I should do the same for the SDK here at PS2Dev.org, since I do have SVN write access), so for the time being, there's only an ERL (relocatable code) Hello World example, which isn't really suitable for absolute beginners...

You should also check the Tutorials section of PS2Dev.org (under PS2, of course). Let me know if there's anything else I can do to help.
I may be lazy, but I can...zzzZZZzzzZZZzzz...
CutToSleep
Posts: 10
Joined: Sat May 09, 2009 10:03 pm
Location: Russia

Post by CutToSleep »

Thank you, thank you very much! It worked, although I deleted part of it 'cause I haven't got my PS2 connected to PC. Thank you also for being nice to a beginner (me). Next several days I will look through documentation available inside your package, and of course I'll going to ask some more questions ('cause the main part, the PS2SDK, isn't well documented both in your pre-built package and in PS2DEV Wiki).
If you want to ask me why my nick is CutToSleep, then GoToHell.
LBGSHI
Posts: 136
Joined: Mon Aug 07, 2006 5:56 am
Contact:

Post by LBGSHI »

Of course; I help whenever I can. I'm able to help you because other people helped me. And I'm sure, they have the same story. Feel free to ask any questions you have. If there's something I haven't added to the PS2 Dev intro I wrote, and it seems pertinent, I'll add it, so others can benefit.
I may be lazy, but I can...zzzZZZzzzZZZzzz...
CutToSleep
Posts: 10
Joined: Sat May 09, 2009 10:03 pm
Location: Russia

Post by CutToSleep »

Well, I was busy for quite a time by doing my school work (and playing Violet) so only this evening I finally experimented with "Hello, world!". I reduced its source as much as I could, and that's what I got:

Makefile

Code: Select all

EE_BIN = h.elf
EE_OBJS = h.o
EE_LIBS = -ldebug
all: $(EE_BIN)
include $(PS2SDK)/Makefile.pref
include $(PS2SDK)/Makefile.eeglobal
h.c

Code: Select all

main(){init_scr();scr_printf("Hello, world!");}
I don't quite understand everything in Makefile, several interesting things that I discovered:
1) I don't need to #include any files to print out message;
2) I don't need to make any infinite loops in the end - it hangs anyway.

By the way, is the font that scr_printf() uses built in PS2 itself or PS2SDK? And, if the latter, how can I change to a home-made font or some freeware font downloaded from Internet?
If you want to ask me why my nick is CutToSleep, then GoToHell.
LBGSHI
Posts: 136
Joined: Mon Aug 07, 2006 5:56 am
Contact:

Post by LBGSHI »

The scr_printf font is a part of the SDK. FONTM is built in to the PS2, and you can access it via gsKit. As for utilizing your own fonts, you'd do well to use a graphics library, and print bitmap fonts to screen. G2 or gsKit would be best (though I do like some aspects of gsLib as well).
I may be lazy, but I can...zzzZZZzzzZZZzzz...
CutToSleep
Posts: 10
Joined: Sat May 09, 2009 10:03 pm
Location: Russia

Post by CutToSleep »

I've got more questions :-)
1) Are there any functions to read a string from a keyboard?
2) If not, are there any functions to read a key from keyboard?
3) What drivers should I load and what libraries should I #include?
P.S. Of course, I've got a PS2 compatible USB keyboard.
If you want to ask me why my nick is CutToSleep, then GoToHell.
LBGSHI
Posts: 136
Joined: Mon Aug 07, 2006 5:56 am
Contact:

Post by LBGSHI »

You should check out this thread: http://forums.ps2dev.org/viewtopic.php? ... t=keyboard

That example is also in the Compilable Source Collection I pointed you to :)

I would recommend reading all of whatisdot's threads, as he/she is quite prolific in enhancing current documentation and the spread of knowledge, particularly for a beginner (I consider myself a beginner as well, mind you).

On that note, I have a favor to ask of you. As you learn, it would be most helpful to the scene in general if you'd keep a brief record of the things you didn't quite understand initially, and how you solved them or figured them out (even if it's just "John Smith told me the answer", heh). This way, we can make more detailed and effective documentation, and the next guy to enter the scene won't have as many stumbling blocks to overcome. It sounds like a small contribution, but you'd be surprised at how many people are confused and discouraged by the same things, and many of them never get around to PS2 development because of this, or take years to reach a competent level, when they could have done so in weeks. Not only will you directly help many people, but if you help keep twenty people in the scene and developing, and only two of them make similar contributions to the pool of knowledge and understanding, you could indirectly help an uncountable number of people. If you're concerning about cluttering the forums or a thread, you could always PM me directly. In any case, it's just a request. You don't have to do it, but it would definitely be helpful.
I may be lazy, but I can...zzzZZZzzzZZZzzz...
CutToSleep
Posts: 10
Joined: Sat May 09, 2009 10:03 pm
Location: Russia

Post by CutToSleep »

Well, I thought of that myself. I guess I could write down all the functions I used, so it will be a small reference guide. Anyway, I'm going to look PS2SDK functions more closely.
If you want to ask me why my nick is CutToSleep, then GoToHell.
CutToSleep
Posts: 10
Joined: Sat May 09, 2009 10:03 pm
Location: Russia

Post by CutToSleep »

LBGSHI, can you tell me where are those uLE patches you wrote about in readme? I can't find them.
If you want to ask me why my nick is CutToSleep, then GoToHell.
Post Reply