I am writing this in response to some accusations of me stealing someone else's code.
I am not gonna name names and point fingers. I just want to clear up my name... and hopefully this information will be usefull to people who want to get in to psp homebrew scene.
So you deside as to whether I needed to steal anything or could do it myself in 20 minutes, using basic C/C++ knowlege and common sense.
So here we go...
1) Get the original rRootage distribution from: www.asahi-net.or.jp/~cs8k-cyu/windows/rr_e.html (google it if the link does not work)
2) Unzip it and get the source folder. The attached readme file mentions that you'll be needing SDL, OpenGL, bulletML oggVorbis. So if you don't have those yet, get the psp versions: SDL, SDL_mixer, PSPGL, libBUletML, libTremor. Of course you'll need the latest versions of those. you'll need PSPSDK and Cygwin as well. (Read other tutorials if you need help setting up anything from the list above)
3) Ok, so you have the environment setup :-) Let's compile it:
Your basic make file should look something like this:
so save it as "Makefile" in the src directory and type "make"Code:TARGET = rr PSPSDK = $(shell psp-config --pspsdk-path) PSPBIN = $(shell psp-config --psp-prefix)/bin SDL_CONFIG = $(PSPBIN)/sdl-config O = o OBJS = $(TARGET).$(O) foe.$(O) foecommand.$(O) barragemanager.$(O) boss.$(O) ship.$(O) laser.$(O) \ frag.$(O) background.$(O) letterrender.$(O) shot.$(O) \ screen.$(O) vector.$(O) degutil.$(O) rand.$(O) mt19937int.$(O) \ soundmanager.$(O) attractmanager.$(O) DEFAULT_CFLAGS = $(shell $(SDL_CONFIG) --cflags) MORE_CFLAGS = -g -O2 CFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS) CXXFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS) -fno-exceptions LIBS = -lbulletml -lSDL_mixer -lvorbisidec -lstdc++ -lGLU -lGL -lglut -lpsprtc $(shell $(SDL_CONFIG) --libs) EXTRA_TARGETS = EBOOT.PBP include $(PSPSDK)/lib/build.mak
It will do some compiling but will return with something like:
foecommand.h:30: error: conflicting return type specified for 'virtual double FoeCommand::getBulletDire ction()'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/include/bulletml/bulletmlrunner.h:72: error: overriding 'virtual float BulletMLRunner::getBullet Direction()'
Note that it's complaining about type mismatch double vs float in bulletml lib.
So let's go to foecommand.h and change all "double" to "float"
(if you use "vi", :s/double/float/g 5000 will fix it for you in a blink ;-)
Now, of course, you'll have to do the same for the corresponding foecommand.cc
Let's try to "make" again.... and bingo!!! you have your firmware version1.0 executable!!!! type "make kxploit" if you need the 1.5 version folders
Well, you are done! with your working 0.01 version!!!
Test it!!! make sure you copy all the game files/folders from the original distribution.
You'll notice that it's running slow with the ms access light blinking...
Well look for new files on your ms ;-) You'll probably find log.txt in which pspgl
is dumping it's complaints about the errors it encountes... read it...
If you recall the original version - it runs at 640x480 resolution which it a bit big for PSP.. so try to see if it is hardcodded somethere in the code ;-) and fix it.. Look for key assgnments (grep -i key) and see where they defined..
Since they did not seem to work in your first version, u'll need to fix that part.. view the readme.psp in SDL distribution on details...
Obviously as you go along, you'll encounter some new problems and I don't want to spoit the fun by givving out solutions ;-)
But as you see it is very simple to get things going with out stealing someone elses code ;-) with some experience you can produce a functional port in ~60 min...
So what's the trick??? Finding easily portable free code.. You'll need some experience with that ;-)
You best bet would be to look for something that has already been ported to some other lowres console or use platform independent libraries like SDL..
Try to search thru the games at www.libsdl.org for ideas...
Also, the trick is in tweaking the game for performance.. for example, you can use same sequence to port NOIZ2SA and will be done in ~ 20 minutes.. but it took me much more time to come up with the fast & attractive tate version... I had to re-write all SDL calls (partly because psp SDL was not that well when I started codding that game.. i had to re-write most of the IO functions too and compile my own version of bulletML)
I hope this was educating..
Some other porting ideas:
Dodgin' Diamonds - very easy..
Rise of Triad - more advanced - I'll try to finish this one when I have time...
[Jan 3, 2006 Edit]
Ok, some people got stuck with psp libraries installation so here is some hints:
1) Install as many cygwin libraries as you can (This is kinda dumb but at least you will not be missing anything and stock with some weird build errors)
If you are pressed with HD space, you defenetely want X11 stuff (startx will give you anice xterm with copy/ paste functionality), libtool, gnu make, svn, wget, bison, etc..
2) to get the fresh source for the libs do:
svn co svn://svn.ps2dev.org/psp/trunk/SDL _this will get you the source for SDL.. Change "SDL" to libTremor, SDL_mixer, SDL_gfx and it will get you the source for those libs, creating new folders in your current directory.
NOTE: make sure your current path don't have spaces in it. This may screw up some cygwin calls...
Once you get the library, "cd" in to that directory and view README.PSP (or just README if README.PSP is not there)
README.PSP usually has the command sequence for installing the library as well as any prerequisites.
For example libTremor has following:
LDFLAGS="-L`psp-config --pspsdk-path`/lib -lc -lpspuser" ./autogen.sh \
--host psp --prefix=`psp-config --psp-prefix`
So just copy those lines in to cygwin prompt..
Having 2 xterm windows can be handy.. so prowided that you have X11 stuff installed, type
Happy codding ;-)