PSP Optimasations

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
homemister
Posts: 25
Joined: Mon Mar 24, 2008 12:16 pm

PSP Optimasations

Post by homemister »

Hey all,
I was posting this to ask about code optimizations of the psp. This can include gcc compiler optimizations.

Regards
Homemister
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

One I'll mention here is avoid flushing the caches. You'll see code from some folks that flush the dcache every single rendered frame. That DESTROYS your speed. Rather, put all the graphics stuff you're using into uncached space (addr | 0x40000000). This goes for framebuffers too, both onscreen or off. For example, one of the BIGGEST speed-ups for Wolf3D for the PSP was to use (framebuffer | 0x40000000) instead of (framebuffer) for all the drawing routines. Drawing to a framebuffer that is cached floods the caches, making the program slower than it would be if you used an uncached framebuffer.
sturatt
Posts: 46
Joined: Thu Jul 13, 2006 4:21 pm

Post by sturatt »

J.F. wrote:One I'll mention here is avoid flushing the caches. You'll see code from some folks that flush the dcache every single rendered frame. That DESTROYS your speed. Rather, put all the graphics stuff you're using into uncached space (addr | 0x40000000). This goes for framebuffers too, both onscreen or off. For example, one of the BIGGEST speed-ups for Wolf3D for the PSP was to use (framebuffer | 0x40000000) instead of (framebuffer) for all the drawing routines. Drawing to a framebuffer that is cached floods the caches, making the program slower than it would be if you used an uncached framebuffer.
that's good to know, thanks J.F.
Post Reply