Search found 33 matches
- Fri Jul 10, 2009 7:21 am
- Forum: PSP Development
- Topic: Better I/O performances with a different BUFSIZ
- Replies: 13
- Views: 9267
Hi! How do the sceIO* functions handle things? Does it have another buffer or does it DMA straight into your pointer? AFAICS the only software buffer is in fread(3). fread(3) itself calls read(2) which calls sceIoRead, with some reentrant (*_r) steps in-between. The tests suggests that the PSP kerne...
- Wed Jul 08, 2009 7:18 am
- Forum: PSP Development
- Topic: Better I/O performances with a different BUFSIZ
- Replies: 13
- Views: 9267
- Tue Jul 07, 2009 8:48 am
- Forum: PSP Development
- Topic: Better I/O performances with a different BUFSIZ
- Replies: 13
- Views: 9267
Hmmm, BAD news. I tried recompiling the game port I'm working on (GNU FreeDink), and apparently this patch dramatically _harms_ the loading time. I suppose that when accessing lots of small files or when doing a decent number of fseek()s, reading big chunks (with a 65k buffer) harm performances (lik...
- Tue Jul 07, 2009 8:26 am
- Forum: PSP Development
- Topic: Better I/O performances with a different BUFSIZ
- Replies: 13
- Views: 9267
- Tue Jul 07, 2009 5:17 am
- Forum: PSP Development
- Topic: Better I/O performances with a different BUFSIZ
- Replies: 13
- Views: 9267
- Tue Jul 07, 2009 3:59 am
- Forum: PSP Development
- Topic: Better I/O performances with a different BUFSIZ
- Replies: 13
- Views: 9267
sure, if you could write a patch I'll apply it. I'll give this a try! Urm be careful though (I haven't checked where the buffer is defined) but there is always the risk that increasing the size could make existing code fail due to higher memory requirements (well when recompiled against a new libc)...
- Tue Jul 07, 2009 12:57 am
- Forum: PSP Development
- Topic: Better I/O performances with a different BUFSIZ
- Replies: 13
- Views: 9267
Better I/O performances with a different BUFSIZ
Hi, I saw that the memory stick access is pretty unefficient when using fread(3). From what I can see this is because BUFSIZ is set to 1024 in the psptoolchain, and it could be improved to up to 8x. How about using a BUFSIZ value like 65k to (dramatically) improve Memory Stick perfs? I did the follo...
- Sun May 24, 2009 8:49 pm
- Forum: PSP Development
- Topic: Frontend issue: unloading itself before starting another prx
- Replies: 13
- Views: 4395
- Thu May 21, 2009 7:14 pm
- Forum: PSP Development
- Topic: [solved] sceKernelLoadModule in kernel mode
- Replies: 5
- Views: 2400
Thanks for your answer. Lot of unnecessary crap in your code. And yes the trailing spaces in the makefile lines screw things up. Yes, the code was as-is, since I was aiming at getting something that worked before trying to trim it. I wasn't clear, but actually the Makefile bug was the only thing to ...
- Thu May 21, 2009 7:13 am
- Forum: PSP Development
- Topic: [solved] sceKernelLoadModule in kernel mode
- Replies: 5
- Views: 2400
Hmmm, it doesn't show on the forum but did you know that a trailing space in 'USE_KERNEL_LIBC=1 ' can seriously mess you build? Just learnt about it XDBeuc wrote:Code: Select all
USE_KERNEL_LIBC=1 USE_KERNEL_LIBS=1
Arrrrrrrrrrrrrrrrrrrrrrrrrrgh!!!
- Thu May 21, 2009 5:15 am
- Forum: PSP Development
- Topic: [solved] sceKernelLoadModule in kernel mode
- Replies: 5
- Views: 2400
- Wed May 20, 2009 4:55 am
- Forum: PSP Development
- Topic: [solved] sceKernelLoadModule in kernel mode
- Replies: 5
- Views: 2400
[solved] sceKernelLoadModule in kernel mode
Hi, I'm trying to load a module from within a kernel module. When I use: SceUID modid = sceKernelLoadModule("hello.prx", 0, &option); from the kernel module, it returns 0x80020149 (SCE_KERNEL_ERROR_ILLEGAL_PERM_CALL). I tried using USE_KERNEL_LIBS=1 to allow the kernel ...
- Wed May 13, 2009 6:49 am
- Forum: PSP Development
- Topic: Frontend issue: unloading itself before starting another prx
- Replies: 13
- Views: 4395
- Wed May 13, 2009 3:45 am
- Forum: PSP Development
- Topic: Frontend issue: unloading itself before starting another prx
- Replies: 13
- Views: 4395
- Tue May 12, 2009 12:25 am
- Forum: PSP Development
- Topic: Frontend issue: unloading itself before starting another prx
- Replies: 13
- Views: 4395
Kernel modules are loaded into the kernel partition. That means that when the user modules exit, the user partition is completely devoid of modules. Using a kernel module is your best bet to get the most memory. Just be sure to keep it small - you don't have much space in the kernel partition to pl...
- Mon May 11, 2009 5:19 pm
- Forum: PSP Development
- Topic: Frontend issue: unloading itself before starting another prx
- Replies: 13
- Views: 4395
Ya it didn't strike me that it could be fragmentation and not because of the memory not being freed. But in that case isn't it pretty much impossible to predict at which location the intermediate module will be loaded, regardless of how small, thus still fragmenting the memory and limiting the maxi...
- Mon May 11, 2009 7:39 am
- Forum: PSP Development
- Topic: Frontend issue: unloading itself before starting another prx
- Replies: 13
- Views: 4395
In the loader module free the heap, load your app and call SelfStopUnloadModule. In module_start() of your app use sceKernelFindModule to check until your loader app is no longer present.. Then use malloc. Well in the app I tried to start the main() with a sleep(5) - and the memory was still not fr...
- Sun May 10, 2009 9:30 pm
- Forum: PSP Development
- Topic: Frontend issue: unloading itself before starting another prx
- Replies: 13
- Views: 4395
Re: Frontend issue: unloading itself before starting another
One solution I found is to use: sceKernelSelfStopUnloadModule(1, 0, NULL); However the module I loaded just before still can't use all memory, because it's started before the front-end is unloaded (even if it sleep(2) before the first malloc) - sceKernelMaxFreeMemSize() and more dire...
- Sun May 10, 2009 8:37 pm
- Forum: PSP Development
- Topic: Frontend issue: unloading itself before starting another prx
- Replies: 13
- Views: 4395
Frontend issue: unloading itself before starting another prx
Hi, I'm writing a front-end to start my homebrew with different parameters. To maximize the homebrew's available memory, I'm already calling: __psp_free_heap(); to free all malloc'd memory. However, there's still the front-end itself: the executable code, and the data segment. Since ...
- Sat Apr 18, 2009 4:50 am
- Forum: PSP Development
- Topic: Where did my memory go? (10-12M non malloc'able)
- Replies: 2
- Views: 2105
- Fri Apr 17, 2009 6:18 am
- Forum: PSP Development
- Topic: Where did my memory go? (10-12M non malloc'able)
- Replies: 2
- Views: 2105
Where did my memory go? (10-12M non malloc'able)
Hi, I was investigating an out-of-memory crash, and I found that malloc doesn't alloc all available memory: int tmalloc = 0; while (malloc(1024) != NULL) tmalloc += 1024; /* while (malloc(1024*1024) != NULL) */ /* tmalloc += 1024*1024; ...
- Wed Apr 15, 2009 3:24 am
- Forum: PSP Development
- Topic: [Solved] Running a homebrew from a homebrew
- Replies: 8
- Views: 4302
- Tue Apr 14, 2009 8:40 am
- Forum: PSP Development
- Topic: [Solved] Running a homebrew from a homebrew
- Replies: 8
- Views: 4302
- Tue Apr 14, 2009 7:52 am
- Forum: PSP Development
- Topic: [Solved] Running a homebrew from a homebrew
- Replies: 8
- Views: 4302
- Tue Apr 14, 2009 6:58 am
- Forum: PSP Development
- Topic: [Solved] Running a homebrew from a homebrew
- Replies: 8
- Views: 4302
OK, apparently something going wrong (800200d9) if I run an SDL app from another SDL app - even if I unloaded everything: Works: - run text-mode app 1 - user chooses app to launch - call pspSdkLoadStartModule(SDL App 2) - SDL App 2 is run Doesn't work: - run SDL app 1 - user chooses app to launch (g...
- Tue Apr 14, 2009 2:39 am
- Forum: PSP Development
- Topic: [Solved] Running a homebrew from a homebrew
- Replies: 8
- Views: 4302
- Mon Apr 13, 2009 7:17 am
- Forum: PSP Development
- Topic: [Solved] Running a homebrew from a homebrew
- Replies: 8
- Views: 4302
[Solved] Running a homebrew from a homebrew
Hi, I'd like to run my FreeDink(.org) homebrew with some additional parameters, so it can run a given addon instead of the main game. In another words I need to write a simple frontend to do the job. What's the best way to run the game engine from the frontend - that is, run an homebrew from another...
- Thu Apr 09, 2009 6:23 am
- Forum: PSP Development
- Topic: How do I get Remtoe Joy working in Linux
- Replies: 1
- Views: 1996
Re: How do I get Remtoe Joy working in Linux
Here are my notes from a couple days ago. I managed to run some of it, but not all. A tutorial: http://www.ngine.de/index.jsp?pageid=4292 Another (French) tutorial with a better Makefile: http://www.metagames-eu.com/forums/psp/tuto-remotejoy-psplink-ou-comment-afficher-lecran-de-votre-psp-sur-le-pc-...
- Thu Apr 09, 2009 5:56 am
- Forum: PSP Development
- Topic: [Solved] Pointer dereference crash while valid ptr (zziplib)
- Replies: 3
- Views: 3066
And here's the patch:
http://forums.ps2dev.org/viewtopic.php?t=11869
zziplib already has code similar to mine (__zzip_get32(c)), I made it use it in all little-endian cases.
http://forums.ps2dev.org/viewtopic.php?t=11869
zziplib already has code similar to mine (__zzip_get32(c)), I made it use it in all little-endian cases.
- Thu Apr 09, 2009 5:54 am
- Forum: Patch Submissions
- Topic: [psp][zziplib] fix crash (misaligned pointer access)
- Replies: 1
- Views: 6730
[psp][zziplib] fix crash (misaligned pointer access)
zziplib makes a misaligned 32bit pointer dereference, which causes a crash, at least when the zip has a preamble. This was further discussed and diagnosed at http://forums.ps2dev.org/viewtopic.php?t=11864 This patch makes zziplib always rely on portable char[4]->int conversion instead of the less po...