|
Post by nitrogen on Dec 3, 2007 1:56:44 GMT
www.dcemu.co.uk/vbulletin/showpost.php?p=550672I just found out about this today, and I must say I'm excited. I actually had half a mind to do it myself, but my PSP programming skills aren't all that great. Anyway, I just figured I'd spread the word.
|
|
|
Post by deniska on Dec 4, 2007 16:19:05 GMT
Hi, I am the developer behind the PSP port.. Just wanted to let you know about the release: deniska.dcemu.co.uk/tyrian-for-psp-80987.htmlThere are some minor problems, which still need to be addressed, though. (OSK implementation, better key mapping, etc) The psp source code and Makefile is attached to the distribution. It needs to be cleaned up a bit before official merge (I did not bother placing #ifdefs in all places yet).. Some comments about the original code: - some C compilers don't like declarations inside the for () loop.. solving this may increase future portability of the code [ for (int i=0; i<10; i++) ==> int i; for (i=0; i<10; i++) ] Overwise, you guys did a terrific job porting it to SDL!!
|
|
|
Post by yuriks on Dec 4, 2007 22:01:00 GMT
Yeah, we're using C99, which DOES allow for that. Our target compiler is basically gcc. Ifdefs aren't really needed, since they can be placed when I merge.
|
|
|
Post by deniska on Dec 7, 2007 5:11:11 GMT
FYI,
I updated the PSP release, to take care of the few bugs and optimize the rendering a bit. Unfortunatelly the code becomes more and more hardware specific.. I'll post the source code once I fix a few more things..
BTW, do you know any parts of the code (other that screen handling) that can be easily optimized for speed? Perhaps some hardcoded pauses to slow it down or inefficient calculations? I know it's probably not your main concern on modern PCs.. but portables consoles are still stuck in x486 speed era :-)
|
|
|
Post by Mindless on Dec 7, 2007 5:36:34 GMT
unless you can optimize audio mixing, I'm not sure there are any other specifically slow portions -- though I haven't done any profiling on the code, so you may be able to find some
|
|
|
Post by deniska on Dec 20, 2007 18:06:30 GMT
Has anyone tried to default the music to 11Khz instead of 44? I tried to play with the #defines but only got some funky sounding stuff and major performance slowdown.. I am hopping that lowering the frequency may free up some cpu cycles, and prevent slowdowns on some cpu extensive levels.. (so far, turning the music off, seemed to help a lot)
|
|
|
Post by Mindless on Dec 20, 2007 19:15:43 GMT
all you should need to do is change loudness.h from #define OUTPUT_QUALITY 4 to #define OUTPUT_QUALITY 1
|
|
|
Post by deniska on Dec 21, 2007 16:48:19 GMT
Obviously, that was the first thing I tried.. but probably due to some problems with SDL sound implementation for PSP (since it's all unofficial) it made it run slow and funky-sounding.. But never mind.. I already did some minor tweaking in fmopl.c lowering the quality and thus freeing some cpu juice.. If I ever get to it, I'll try to rewrite the music code to utilize psp's media engine.. Thanks for the reply, though.. Keep up the great work!
|
|
|
Post by Xav R on Dec 22, 2007 15:23:34 GMT
though I haven't done any profiling on the code, so you may be able to find some Hey, this would be an idea ! anyone who tried running it with valgrind ?
|
|
|
Post by Xav R on Dec 22, 2007 15:39:26 GMT
BTW, do you know any parts of the code (other that screen handling) that can be easily optimized for speed? Perhaps some hardcoded pauses to slow it down or inefficient calculations? I know it's probably not your main concern on modern PCs.. but portables consoles are still stuck in x486 speed era :-) Does the PSP have a cpu floating unit ? this is definitely a speed issue, because the sound decoding requires a lot a jobs using floats. Another common speed-improvement is to re-implement memory operations using assembly, but this might be hard stuff ! But the most speed improvements you can get come from the libraries you're using. I tested two different SDL releases for GP2x, one had good speed but chopped sound and the second was a bit slower but had really good sound. You can also try compiler optimizations. Do you link statically ? this is quite important for speed, too.
|
|
|
Post by deniska on Dec 26, 2007 14:39:42 GMT
Could someone please merge the PSP code in to official version... The psp source, based on revision 647 can be accessed here: www.dcemu.co.uk/vbulletin/showthread.php?t=80987&page=10(you may need to register to see the attached file) I tried to isolate most of the psp-specific stuff in to a separate file(s) psp.h/c The rest of the changes are wrapped with #ifdef PSP directives and, hopefully, should not affect building on other platforms...
|
|
|
Post by deniska on Dec 26, 2007 14:48:49 GMT
Does the PSP have a cpu floating unit ? this is definitely a speed issue, because the sound decoding requires a lot a jobs using floats. Another common speed-improvement is to re-implement memory operations using assembly, but this might be hard stuff ! But the most speed improvements you can get come from the libraries you're using. I tested two different SDL releases for GP2x, one had good speed but chopped sound and the second was a bit slower but had really good sound. You can also try compiler optimizations. Do you link statically ? this is quite important for speed, too. As I posted before, the best bet is to re-write music code to be ran on PSP's media engine, which I am not too familiar with (yet)...But, with my latest optimizations, tyrian seems to run full-speed 95% of the time (some levels still show a bit of slowdown in the wild mode).. so I think the psp port is in a pretty good shape
|
|
|
Post by Mindless on Dec 26, 2007 19:21:48 GMT
what C compiler are you using that won't allow for(int i; ;? this will get merged in... probably not right away though, hope that doesn't bother you I'd like to get some stuff cleaned up before we start adding more platforms
|
|
|
Post by deniska on Dec 27, 2007 14:25:27 GMT
There is a specialized toolchain / SDK for building unofficial / unsigned executables for PSP.. It's currently based on gcc 4.1, if I am not mistaken... You can learn more at ps2dev.org Removing int declaration from the "for" loop does not seem like a huge inconvenience to me.. Of course, it's your call, as the maintainer of the official version...
|
|
|
Post by yuriks on Dec 27, 2007 17:00:44 GMT
If it's gcc then it probably allows it, you're just not passing the right flags. Pass -std=c99 and it should work. Btw, does the toolchain have g++ too? And what is the performance of C++ programs compared to C ones on the PSP?
|
|