The first problem is that mksfoex dies with a segfault when called by make.
I'm using a (painfully slow) PowerBook G4 under OSX 10.5, (PowerPC/Big Endian).
With my limited understanding of the code. I've tracked it down to this point in the code (here's an svn diff with my fix):
Code: Select all
--- mksfoex.c (revision 2409)
+++ mksfoex.c (working copy)
@@ -303,8 +303,8 @@
totalsize = (valsize + 3) & ~3;
SW(&e->valsize, valsize);
SW(&e->totalsize, totalsize);
- memset(d, 0, e->totalsize);
- memcpy(d, g_vals[i].data, e->valsize);
+ memset(d, 0, totalsize);
+ memcpy(d, g_vals[i].data, valsize);
d += totalsize;
}
e++;
Having applied this fix though, the produced PBP's are invalid as far as my PSP is concerned.
Could there be more endianness issues with this utility?
As a sidenote, which is the recommended way of enabling big memory support on a PSP Slim application?
I would like to use the standard malloc instead of a custom solution if possible. Also from what I understand PSP_LARGE_MEMORY=1 only affects the PBP build of an application. How could I enable large memory support to the normal, debuggable prx build of an app?
PS: If there are still people having trouble compiling the SDK's GCC on 10.5 with a PowerPC CPU (compiler errors in gcc/config/rs6000/host-darwin.c), I have sourced a patch, which fixes this problem.
Thanks in advance
kFactor