Hmm... I think I can post this Does anyone know a tutorial to set up the psone sdk with msys or mingw or cygwin or whatever? I'd prefer an IDE, but is there any link or tut?
The official PlayStation SDK is illegal, and often cryptic. Also it seems to be based on a very old GCC version (2.8.1), and I don't think it will integrate with MSYS or Cygwin well. My PSXSDK has a precompiled Cygwin toolchain. Read readme.txt inside the archive, it should explain you how to install it. Basically this is it: 1) Download setup.exe from www.cygwin.com, and install Cygwin using it. 2) Extract my archive to C: 3) Now start the Cygwin shell, and execute: PATH=$PATH:/cygdrive/c/psxsdk/bin 4) Now to compile an executable for the PlayStation, use psx-gcc. Example: psx-gcc -o my_game my_game.c -lpsx is automatically included so you don't have to include it. An ELF format executable for the MIPS R3000 processor is output. The PlayStation can't read this executable format, so you will have to convert it to PS-X EXE format, which is its executable format. 5) Now to convert your executable to PS-X EXE format: elf2exe my_game my_game.exe 6) You can load my_game.exe on your PlayStation in the way you like. CDROM, Caetla (should work, but never tried), etc. To generate a CDROM image that you can burn on your PlayStation, read the instructions (readme.txt) in the PSXSDK source code. In few words, you first have to make a normal ISO image with mkisofs, and then you must license it with mkpsxiso. mkpsxiso outputs a .cue/.bin image, ready to be burned and which will work either with the swap trick or a modchip. Read the full instruction in readme.txt anyway. You have to install mkisofs on cygwin (I don't remember if it is contained in cdrtools or it is separate..) The license files are in C:\psxsdk\share\licenses infousa.dat is the USA license, infoeur.dat is the EUR license and infojpn.dat is the JPN license. A normal ISO won't work on the PlayStation, it lacks license information. I hope you enjoy it. If you meet big bugs, maybe they're fixed in the next version. In any case let me know if you want the not-released-yet version. The version I'm developing has SPU support and even a modplayer. The only documentation is for now, headers, source code and the examples (PSXPaint and PSXSnake). I think you can discuss any PSX software development kit, be it official or homebrew.
Omg? Exactly what I was looking for. Thanks man. And is there anyway I can get any examples? Like of a make file? I hate makefiles.. -.- How did you learn to do this, if you don't mind me asking?
Actually I learned to do this with a lot of dedication. I first learned C, but I didn't understand it very well, then I learned the workings of assembler and machine code, did some ROM hacks, and after this I learned how C really worked. With the experience gained with that, I was able to do this SDK. I got the information about programming the hardware either from Padua's documentation or from emulators, and then I adapted it with my own hardware reverse engineering (the available information about hardware is rarely totally clear and if you don't care about some bits stuff will not work on the real hardware). I am not very good at makefiles, either Makefile dependencies work this way; the target is, for example, "test", and the source code file you want to compile is called test.c test: test.c gcc -o test test.c Put a TAB (separator) before gcc in the real Makefile. If the file test doesn't exist, or is older than test.c, the target "test" is run. Otherwise if test is newer than test.c, nothing is done. This is used to compile the source code file only when it has changed. In my earlier post there was an error. I have fixed it, it wasn't /c/psxsdk but /cygdrive/c/psxsdk
Ooh compiled snake haha. I gots it now. Muwahhaha. I mean, I understand makefiles, I just don't get the flags, etc etc. Thanks though. And with the making of this sdk, how was it done? Is it like, direct communication with the hardware? Or..?
A mix of both: direct communication with the hardware and calling the BIOS. For example the GPU code for example communicates totally directly, while the functions that handle files (like fopen(), etc.) at some point call the BIOS to do the real work. If you want my WIP version of the SDK, feel free to PM me.
So is your goal to have a totally free/legal PS1 SDK that supports all you need to atleast make your own 2D programs/games? I.E. CDROM Access for loading data and playing music, controller input, graphics, sound effects, etc? I've always been curious if someone had made or was ever going to make essentially a SDK complete with a library or atleast examples of all you need to build or port a game to PS1. On the PC I'm used to using Allegro which handles all the input, graphics, and sound interaction with the hardware and I like that. If such a thing existed for PS1 that would be really cool.
So... that fopen() function, the PS1 already understands it? And what's the difference in the WIP version?
You can get the WIP version by checking out the SVN now (uploaded it just today). Here: http://code.google.com/p/psxsdk/source/checkout
Good job, I'm going to have to download this and get a shot at trying to making some simple games for the PSOne. -Disjaukifa
I just sucesfully compiled PSXSnake after setting everything up (Windows, Cygwin). And I must say, tails92 you are the man. I'll start working on the new BIOS dumper this femtosecond. Games are hopefully to follow One thing bothers me though... Are the licence.dats legal?
I'm not sure of the legality of the license files, but nowadays nobody cares about that and Sony suspended the "licensing" program a lot of time ago. If one is going to sell a game he made and he's really worried about this, the next release will come with a tool which will be able modify the license file to change its logo and writing (it is called lictool, the current SVN code for it can only change the logo FYI). The writing and the logo of the license file are displayed during the PlayStation bootscreen. "Licensed by Sony, etc. etc." is actually a changeable writing.
Ok, here it is. It's been tested on the real hardware (as well as on emulators) and as far as I can see it works fine.
Tails92, any news on your PS1SDK? Do you plan on any basic getting started tutorials for setting up the compiler tools and demonstrating a basic program?