function not finishing it seems

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

Moderators: cheriff, TyRaNiD

Post Reply
sturatt
Posts: 46
Joined: Thu Jul 13, 2006 4:21 pm

function not finishing it seems

Post by sturatt »

I was trying to get a better font, so i wrote my own text displayer. I've come across a problem though. What im doing is displaying a list of strings on the screen, about 14 strings of 40 chars.

Now when i start to do anything processor intensive, it starts to mess up. It doesnt really slow down the text rendering, it just seems to skip parts of it? I was under the impression that when my program got to be too much for the psp to handle, the text would just get displayed slower and slower, is there any explanation for the end of certain strings to just be cut off? it seems to be random.

btw it works perfectly when the processor isnt being pushed, so i dont think it would be something wrong with my function that makes it quit early. anyone got any ideas?
ector
Posts: 195
Joined: Thu May 12, 2005 10:22 pm

Post by ector »

As many others around here you're getting bitten by the cache. Search around, I'm too lazy to explain it all again :)
http://www.dtek.chalmers.se/~tronic/PSPTexTool.zip Free texture converter for PSP with source. More to come.
sturatt
Posts: 46
Joined: Thu Jul 13, 2006 4:21 pm

Post by sturatt »

I appreciate the reply ector

do you think you could at leats point me towards a thread or something? i read some stuff about sceKernelDcacheWritebackAll() and used it as some people instructed but it didnt solve my problem? i would really appreciate a bit more help if possible

Thanks
ector
Posts: 195
Joined: Thu May 12, 2005 10:22 pm

Post by ector »

Well you haven't given much details to go on :)

But the essence is, anything you want the graphics processor to see, you NEED to make sure that it's in main memory and not just sitting in the CPU cache.
http://www.dtek.chalmers.se/~tronic/PSPTexTool.zip Free texture converter for PSP with source. More to come.
sturatt
Posts: 46
Joined: Thu Jul 13, 2006 4:21 pm

Post by sturatt »

well then shouldnt a sceKernelDcacheWritebackAll(); at the beginning of my draw screen loop (which calls the draw text function) do that for me? or am i placing it wrong/missing something?
jashsu
Posts: 1
Joined: Mon Jul 24, 2006 9:22 am

Post by jashsu »

sturatt: Might want to take a look at this page if you haven't read it yet. =)
sturatt
Posts: 46
Joined: Thu Jul 13, 2006 4:21 pm

Post by sturatt »

well.... a lot of that went way over my head so i guess ill just stick with disappearing letters

thanks for trying guys

while i have a thread, can anyone point me towards some basic gu tutorials, the ones in the sdk have no comments and are hard to understand for me.

Thanks
sturatt
Posts: 46
Joined: Thu Jul 13, 2006 4:21 pm

Post by sturatt »

im getting this error while using graphics.c/h so does anyone know how to fix it with that?

i went through graphics.c and before every gu draw command ( like sceGuDrawArray and sceGuCopyImage) it has sceKernelDcacheWritebackAll(); isnt that supposed to clear clean up the cache and stop this stupid half function crap?
Post Reply