Draw text on XMB
Draw text on XMB
Now I am using "VSHBlitter0.2" function "blit_string46" to draw text on XMB, but it sometimes makes my psp to crash, for example when I turn my psp to sleep and then on it crashes. And when I draw text atop (x=0 y=0) the text is blinking and it is hard to see it... why is that? is there any thing I can do to change it? or maybe I should use other way to draw text in XMB? is there better functions that are fully working?
Pragramming with:
Microsoft Visual C 2008 + pspsdk MINPSPW 0.8.10
Microsoft Visual C 2008 + pspsdk MINPSPW 0.8.10
-
- Posts: 53
- Joined: Thu Mar 20, 2008 2:33 am
You can blit anything to XMB without any hooks, you'll just need to setup GE in every display list you sent
You don't need to clear screen each time, cuz XMB will do it for you and you also don't need to setup framebuffer and draw region.
This sample will help you to understand better the concept:
http://foosa.do.am/MDL_SAMPLE.zip
You don't need to clear screen each time, cuz XMB will do it for you and you also don't need to setup framebuffer and draw region.
This sample will help you to understand better the concept:
http://foosa.do.am/MDL_SAMPLE.zip
-
- Posts: 53
- Joined: Thu Mar 20, 2008 2:33 am
The same thing but in kernel mode (for 5.00FW)
http://foosa.do.am/MDL_SAMPLE_KERNEL.rar
At real if you wanna make it compatible with games and especially with homebrew, you need use:
sceGeSaveContext();
sceGeRestoreContext();
in the signal and finish callbacks of your display list
http://foosa.do.am/MDL_SAMPLE_KERNEL.rar
At real if you wanna make it compatible with games and especially with homebrew, you need use:
sceGeSaveContext();
sceGeRestoreContext();
in the signal and finish callbacks of your display list
The text will ALWAYS "blink" or flicker to some extent unless you hook one of the screen swap routines. That's because you can't count on when your text will be drawn, and it's just as likely to be right after the app swaps screens as any other time. The sooner after a swap you draw your text, the more likely it is to be overdrawn by the application running.hotter wrote:Thx for examples.
Well this is much better when "blit_string46", but text still sometimes blink, I guess when cpu usage is high... I will try it on my prx. Thx again.
-
- Posts: 328
- Joined: Sun Jun 03, 2007 10:05 pm
Way to let go of everything (4c 45 41 4b)!OldPrisoneR wrote:You can blit anything to XMB without any hooks, you'll just need to setup GE in every display list you sent
You don't need to clear screen each time, cuz XMB will do it for you and you also don't need to setup framebuffer and draw region.
This sample will help you to understand better the concept:
http://foosa.do.am/MDL_SAMPLE.zip
-
Good Work?
Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming.
Use it more for Development than for Gaming.
-
- Posts: 53
- Joined: Thu Mar 20, 2008 2:33 am
-
- Posts: 328
- Joined: Sun Jun 03, 2007 10:05 pm
Nevertheless, we can see some interesting things in future.. better PRX plugins that donot depend on VRAM blitting, etcOldPrisoneR wrote:What did you mean?KickinAezz wrote:...(4c 45 41 4b)!
GU acceleration by itself, is a great optimization.
Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming.
Use it more for Development than for Gaming.
-
- Posts: 53
- Joined: Thu Mar 20, 2008 2:33 am
^^ASCII for L E A K.
J.F., have you worked with save/restore GU context fuctions?
I wonder, where to put 'em to my code... to make context the same, after executing my display list.
I assume that whole thing must be something like this:
1. the first command of dlist must be a signal for saving
- In the signal handler I'll save GE context (and GE must wait while handler instructions are executed!)
2. the last command of dlist must be a signal for restoring
- In the signal handler I'll restore GE context (and again GE must wait while handler instructions are executed, that the reason we can't use finish handler - in its case GE won't stop)
Anyway that's just my assumption :)
I've not worked on save/restore of the GE context, but yes, I'd say that the first thing is to SAVE and the last is to RESTORE. That seems like it would work better than the other way around. ;)OldPrisoneR wrote:^^ASCII for L E A K.
J.F., have you worked with save/restore GU context fuctions?
I wonder, where to put 'em to my code... to make context the same, after executing my display list.
I assume that whole thing must be something like this:
1. the first command of dlist must be a signal for saving
- In the signal handler I'll save GE context (and GE must wait while handler instructions are executed!)
2. the last command of dlist must be a signal for restoring
- In the signal handler I'll restore GE context (and again GE must wait while handler instructions are executed, that the reason we can't use finish handler - in its case GE won't stop)
Anyway that's just my assumption :)
:D
I have a problem with this. If I edit your text from:
to:
In psp I pres LTRIGGER and go to play video, then psp starts to beep and freezes. why does this happens?
Code: Select all
sprintf(buf,"Hi I'm 0x%x KERNEL ;)",(int)threadDisp);
Code: Select all
sprintf(buf,"Hi I'm 0x%x KERNEL ;) 123456789123456789",(int)threadDisp);
Pragramming with:
Microsoft Visual C 2008 + pspsdk MINPSPW 0.8.10
Microsoft Visual C 2008 + pspsdk MINPSPW 0.8.10
-
- Posts: 53
- Joined: Thu Mar 20, 2008 2:33 am
-
- Posts: 53
- Joined: Thu Mar 20, 2008 2:33 am