Page 1 of 2

Fixed, Pre-Built, Win32 PS2SDK :)

Posted: Sun Jul 20, 2008 1:39 am
by LBGSHI
I've been working on reviving Win32 homebrew PS2 development, by tackling its most irritating problem: that there currently isn't a working Win32 development environment available. As such, the only way to program with the (PS2Dev.org) PS2SDK has been via Linux, either actually installed, or from within a virtual environment.

Hence, starting from a base of Lukasz Bruun's tutorial on installing the PS2SDK in MinGW, and with help from several people in the PS2Dev scene (who I will mention below), I've fixed, built, further fixed, and slightly revamped the current PS2SDK, for use right out of the box (or the archive, in this case). Copied and pasted from the readme.txt I threw together:

_________________________________________

Before anything else is said, let it be known that I've really done very little here. I didn't create the PS2SDK, nor did I contribute in any way to its creation. I'm merely fixing various issues with the current Win32 build of the PS2SDK, and providing the results of this endeavor. I've also had help from several people, who I will name at the end of this ReadMe.

This package is current, as of January 5, 2009 (and will probably remain current for some time, given the rate of updates to PS2SDK).

This is the fully compiled PS2SDK, using msys and MinGW (fixed), including gsKit (fixed; also improved for FONTM support; also improved drastically by Ragnorok's fixes), gslib, the SDL port, SDL Mixer, libjpg (functional version from myPS2 source), usbhdfsd, libcdvd, PS2Lib (for legacy/old source support), ps2eth, ps2ftpd, SMS, sioshell, sbv, uLE patches, ps2Perf, dreamGL, libtiff, romfs (partial functionality only; see below), libito (partial functionality only; see below), PS2-Packer (with all stubs), and PS2-Packer-Lite (in alignment with some sources floating around the 'net). Essentially, we have a fully-built, standard PS2SDK, and additional functionality through gsKit, gslib, SDL, SDL-Mixer, libjpg, usbhdfsd, libcdvd, PS2Lib, ps2eth, ps2ftpd, SMS, sioshell, sbv, the uLE patches, ps2Perf, dreamGL, libtiff, romfs, libito, PS2-Packer, and PS2-Packer-Lite. The required patches have, as mentioned above, been applied to include some added functionality, and allow uLaunchELF to compile. Mega Man's modifications to gsKit's FONTM support have been added as well, and the results are quite impressive. romfs and libito have been added, but, as the PC tools are Linux binaries, you won't be able to create romfs images using genromfs, or use the image conversion tool "itt" in libito (however, you will still be able to compile most sources that require romfs or libito, and you'll still be able to use either in your own projects, aside from those tools). I will likely add more functionality as I find the need for it, understand it, or figure out how to fix it. Please get in contact with me if you can help, even as a tester.

If you have a request for something to be included, feel free to let me know.

To install, simply extract the mingw and msys directories into C:\, and run msys.bat, under c:\msys\1.0\. If you like, copy the included shortcut to msys.bat (msys.lnk) to your desktop or Start menu, for quicker access. If you'll be checking things out via SVN (which you probably will, at some point), install Subversion by running svn-1.4.5-setup.exe.

To test your environment, change directory up to 1.0 (type "cd .." without quotes), then cd down to local/ps2dev/ps2sdk/samples (type "cd local/ps2dev/ps2sdk/samples"), choose a sample and cd into its directory (for example, type "cd cube"), then type "make". If you get the message "No targets specified and no makefile found", there's likely a subdirectory that contains the source you're looking to compile (as there is in several of the samples). Simply type "ls" to list the directory's contents, choose a subdirectory, type "cd subdirectory" (replacing subdirectory with whatever it's really called, of course), then try typing "make" again. If you compile something, then later want to compile it again (perhaps you modified it, or modified your environment), simply type "make clean", then type "make".

I've also provided a collection of compilable source, by many authors, which you can simply extract into your c:/msys/1.0/home directory, cd into after starting msys, and compile. It can currently be found here: http://gshi.org/vb/showthread.php?t=3098

...and an introduction to PS2 homebrew development, which can currently be found here: http://gshi.org/vb/showthread.php?t=3103


Thanks go out to:

Lukasz Bruun, for doing 99% of the work (this environment is based on his MinGW PS2SDK tutorial, with several modifications and fixes), and also for giving me a few nudges in the right direction involving gsKit, SDL, and romfs (the latter of which is still a work-in-progress). Also, a big thanks to him for providing me with precompiled copies of libito and romfs, which would not compile with MinGW/msys and the current PS2SDK.

ps2devman, for providing some Cygwin files for gsKit - as MinGW couldn't properly build gsKit without them, and PS2SDK will no longer build in Cygwin, thus I had no direct way of getting the files myself - and for providing help with fixing gsKit, and helping to update some source code of his to compile with the current PS2SDK (the more compilable source, the better :) ).

cosmito (previously ptek), for providing several Cygwin files and some good info for the attempted romfs fix, which is still being worked on, and for pointing me to the gsKit FONTM improvements Mega Man created.

Mega Man, for providing the FONTM improvements he created for gsKit.

The makers of myPS2, for their functional source of libjpg.

ragnarok2040, for mentioning in a thread at PS2Dev.org the idea of using myPS2's libjpg source, for his wonderful gsKit fixes, and for his ZLIB port.

Rev1Dev, for posing the questions that led to Ragnarok2040 mentioning the libjpg idea above (heh).

extraweb1, for requesting I add libjpg, which sent me on the quest that ended up with me adding not only libjpg, but usbhdfsd, and for asking a few questions concerning uLE, which prompted me to add the uLE patches :)

Oobles, for PS2Dev.org (and for giving me the ability to update the site and SVN repo).

Many, many people, for PS2SDK, and for the libraries and tools that I've installed for this PS2SDK.

And everyone else in the PS2 development scene :)


- LB, of GSHI.org

Download can be found here: http://gshi.org/vb/showthread.php?t=3097

Posted: Thu Jul 24, 2008 6:06 pm
by ps2devman
Thanks. I love "ready to run" sets...
(won't be able to test it though, still lacking free time)

Posted: Thu Jul 24, 2008 10:50 pm
by LBGSHI
Ah; you're welcome. I hope some new members of the scene will find it useful. Again, thanks for your help (you're mentioned in the ReadMe, heh).

I'll get back to trying to figure out how to implement ROMFS in MinGW in the next few days, and I've also been looking at what outdated sources I can update most easily...

Posted: Thu Jul 31, 2008 6:19 am
by LBGSHI
I've added quite a few things, and updated the first post in this thread accordingly.

Posted: Fri Aug 01, 2008 7:45 am
by NoobWithBoobs
sweet,been tryin to get this to work for a while now,finally found this post,lol,ill give this a go on my desktop(windows xp),i dont suppose it works in vista?

Posted: Fri Aug 01, 2008 1:31 pm
by LBGSHI
I think Vista needed some modifications...give it a try, and let me know.

Posted: Fri Aug 01, 2008 2:29 pm
by NoobWithBoobs
i got
"couldnt allocate cygwin heap"
when running *make after *make clean
Mind u Im a complete noob and i coulda done anything wrong..

I was tryin to compile the examples,like mpeg or cube

Posted: Fri Aug 01, 2008 10:51 pm
by LBGSHI
OK. Per chp, this is an issue with msys-1.0.dll. There are also at least two other issues you might run into on Vista; all three and their respective fixes are detailed in this post:

http://forums.ps2dev.org/viewtopic.php?p=55772#55772

Assuming you fix your Vista build, please let me know what steps you took, and I'll add them to the package, under a "Vista" sub-archive.

Posted: Sat Aug 02, 2008 3:42 am
by NoobWithBoobs
ok now im confused,in his post it says select candidate instead of current,but by just extracting msys,i didnt get that option..

nor do i have a C:\msys\1.0\postinstall\ folder..

EDIT:
OK i replaced the msys1.0.dll with the new 1 ,renamed it,ran msys, tryed make clean then make in cube folder.
Got no errors for cube,but downloaded the starism demo code from the ps2dev.org tutorial and it gave me error:
unrecognizable option -fnull-objects
cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/bin/as unrecognizable option -mcpu=r5900
make: [main.o] error 1
or is that because i put starism in the wrong folder? i put it in the ps2sdk sample folder..

Posted: Sat Aug 02, 2008 7:16 am
by LBGSHI
Heh, it's always been a small, black box for me. Why would you want it to take up half the screen? You could always hit the Maximize button, I suppose.

Also, Starsim is outdated, and would require some updating to work. It was originally written by sjeep, but an updated version was written by Shine. I believe I may have had to modify a few pieces of it, but in any case, a copy of it that will compile with the current build of PS2SDK can be found here, in a package of compilable source I put together:

http://gshi.org/vb/showthread.php?t=3098


In general, I usually put source in c:/msys/1.0/home (so, c:/msys/1.0/home/starsim), but for most source, it shouldn't matter (includes and such should be explicit, not relative, but it's all up to the programmer).

Posted: Sat Aug 02, 2008 7:18 am
by LBGSHI
Also, I put together a very basic guide to PS2 development (though I need to flesh out a few core areas, such as walking the user through some basic exercises and such), which can be found here: http://gshi.org/vb/showthread.php?t=3103

Posted: Sat Aug 02, 2008 1:39 pm
by NoobWithBoobs
cool,Thanks! I'll check out those links..

And i was havin problems with the black box not opening wide enough to read all the text,but i figured it out in options..

Is there a way to know what samples/examples are outdated or wont work with msys,i noticed some said they only work with unix systems..

Posted: Mon Aug 04, 2008 5:44 am
by LBGSHI
If you're referring to source in general, compiler errors are of course your first indication :)

You could also take a look at whatever documentation came with the source, read the Makefile, and take a look at the source itself.

However, all the source in the compilation I put together will compile with the current msys/MinGW build.

Posted: Sun Aug 24, 2008 7:31 am
by wizecoder
I have two questions: First can the precompiled sdk be used with visual studio, and number two can you use the ps2 homebrew on a backwards compatible ps3.

Posted: Mon Aug 25, 2008 1:57 am
by LBGSHI
1: I would assume so, though you should take a look at one of the guides to using Visual Studio with PS2SDK, as I've never tried it before.

2. I have no idea.

Posted: Thu Aug 28, 2008 7:27 am
by LBGSHI
Added gslib.

Posted: Wed Jan 07, 2009 4:34 am
by LBGSHI
Version 4.4 is now available, with a few minor fixes, and some added functionality (see the ReadMe included).

Posted: Wed Jan 07, 2009 8:29 pm
by dlanor
LBGSHI wrote:Version 4.4 is now available, with a few minor fixes, and some added functionality (see the ReadMe included).
I decided to try this package, to test its compatibility to the setup.sh script, but I am unable to find the download link.

In your post #1 above you end it with this:
LBGSHI wrote:
Download can be found here: http://gshi.org/vb/showthread.php?t=3097
But when I go there, the primary post of that thread contains only two links.
One of them leads to a thread supposedly linking to lots of compilable example sources,
and the other link leads to a thread with a tutorial introduction to PS2 development. That is all well and good, but not what I was looking for...

So where is the download link for the package ?

Btw: The only real dowload link I could find, that one for the compilable source examples with the "PS2_Compiles.zip" is a dead link, resulting only in a 404 error message.

Best regards: dlanor

Posted: Thu Jan 08, 2009 3:31 am
by aries2k
Hi dlanor,
I think LB forgot to put up the link.

http://gshi.org/downloads/gshi_ps2sdk.7z

bye

Posted: Thu Jan 08, 2009 3:46 am
by LBGSHI
Yes, I absolutely did. Oops.

I updated that post, and forgot to include the download link (I also recently updated the compilable source archive, and compressed it with 7Zip compression, resulting in the new extension .7z, and a changed filename which I neglected to correct in that post). Just goes to show that you shouldn't update things when you're really, really tired, heh.

They're both fixed now.

Posted: Thu Jan 08, 2009 4:19 am
by dlanor
@aries2k:
Thanks, I've downloaded it now.
LBGSHI wrote:Yes, I absolutely did. Oops.

I updated that post, and forgot to include the download link (I also recently updated the compilable source archive, and compressed it with 7Zip compression, resulting in the new extension .7z, and a changed filename which I neglected to correct in that post). Just goes to show that you shouldn't update things when you're really, really tired, heh.

They're both fixed now.
Good.
Like I said above I have now downloaded it, and will let you know later how it works out here.

Best regards: dlanor

Posted: Mon Mar 30, 2009 4:53 pm
by erosennin69
I've tryed to download it using the link:
http://gshi.org/downloads/gshi_ps2sdk.7z

But I couldn't as there is a forbidden error. Here is the text:
Forbidden

You don't have permission to access /downloads/gshi_ps2sdk.7z on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
----------------------------

Apart from that thanks to you. I've been using the october version to port gnuboy to the ps2 and it worked fine!

Posted: Thu Apr 02, 2009 3:05 am
by LBGSHI
Hmm...it's working fine for me right now...can you try it again, to make sure it wasn't a fluke of some sort?

And, you're very welcome. I'm glad it's being put to good use.

Posted: Thu Apr 02, 2009 4:22 pm
by erosennin69
Thanks you for answering...

Well, I've tried using proxies from different countries but it didn't work. After that I tried using a web proxy and it did work, but it was very slow. Maybe I should use another provider.

I have a question: there is two different libc.a
One is in /local/ps2dev/ee/ee/lib
and the other is in /local/ps2dev/ps2sdk/ee/lib

The two seems to implement different functions, in my port of gnuboy I wanted to use fonctions from both, but it didn't work (I wanted to use gettimeofday() ). Why is there two libc?.

Posted: Sat May 09, 2009 10:43 pm
by CutToSleep
I downloaded this pre-built toolchain, copied folders to C:, made a link etc. But I can't compile anything - all I get is

Code: Select all

$ make
ee-gcc -D_EE -O2 -G0 -Wall  -I/usr/local/ps2dev/ps2sdk/ee/include -I/usr/local/p
s2dev/ps2sdk/common/include -I. -I/usr/local/ps2dev/gsKit/include -I/usr/local/p
s2dev/libjpg/include -I/usr/local/ps2dev/ps2sdk/sbv/include -I/usr/local/ps2dev/
libcdvd/ee -I/usr/local/ps2dev/ps2sdk/ports -I/usr/local/ps2dev/ps2sdk/ports/inc
lude -c main.c -o main.o

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
make: *** [main.o] Error 3
This message was there when I tried to compiled uLE. But after I typed "make clean" in samples' folders (such as "cube", "graph" etc.), they aren't compiling anymore. What am I doing wrong?

Posted: Mon May 11, 2009 5:54 am
by LBGSHI
Hmm...I just tested the SDK samples (graph, etc) using the latest pre-built, and they compile just fine after a make clean.

Also, what version of uLE are you trying to compile?

Posted: Mon May 11, 2009 9:31 am
by CutToSleep
uLE 4.39. The latest stable release, as far as I know (not including 4.39z). I downloaded this pre-built toolchain from your site. Can you send me, for example, a working "Hello, world!" sample that can be compiled and instructions how to compile it so I can check it out. I guess it's something like that:

Code: Select all

#include <stdio.h>
void main&#40;void&#41;;
&#123;
printf&#40;"Hello, world!"&#41;;
/* of course, i need to insert here some kind of cycle or it will display message and immediately terminate, but i can do that later */
&#125;

Posted: Mon May 11, 2009 9:43 pm
by LBGSHI
Sure; there's the Compilable Source Collection in Downloads: http://gshi.org/index.php?s=downloads

I still haven't gotten around to adding an .ELF Hello World sample to PS2Dev.org's SVN copy of the SDK, to compliment the .ERL one...

Posted: Mon May 11, 2009 10:27 pm
by CutToSleep
Well, that's 10+Mb, and I'm nearly out of limits.

That's my simple program:

Code: Select all

#include <stdio.h>
int main&#40;void&#41;
&#123;
while &#40;1 > 0&#41; printf&#40;"hi"&#41;;
&#125;
I put it in C:\msys\1.0\local\ps2dev\ps2sdk\samples\Hi

I type commands:
cd ../local/ps2dev/ps2sdk/samples/Hi
ee-gcc main.c

That's what I get:

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

I wrote my source in Notepad (i heard that *nix has some other new line format than that of DOS/Windows, but I don't think that's the source of my problems. My system is: Intel Pentium IV 1,7 GHz, 512 MB RAM, 200 GB HDD, Windows XP Professional SP2 (russian version).

Posted: Tue May 12, 2009 3:48 am
by LBGSHI
OK, I've installed it on a completely pristine system (running XP Home), and it works fine there as well. I also know that people with XP Pro and Vista have successfully run this exact build/version of the pre-built SDK, so OS is not an issue.

Looking at your issue, it would seem that GCC is having a problem (or more likely, one of its underlings, such as cc1, etc). I'm guessing there's a conflict with something else running or installed on your computer.

Did you already have MinGW/msys installed, before you installed the pre-built SDK? You may have without knowing it, if you had a newer version of Bloodshed DevCPP (Dev C-Plus-Plus) installed, or one of several other apps.

The reason I ask the above is because this issue seems to have occurred in other MinGW/msys systems with bad environment variables (which shouldn't be an issue if you're running this right out of the box, and you didn't have msys/MinGW installed prior).