Display text in xmb with prx

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

Moderators: cheriff, TyRaNiD

Post Reply
reefbarman
Posts: 87
Joined: Mon Jan 08, 2007 12:16 pm
Location: Australia

Display text in xmb with prx

Post by reefbarman »

Edit: Not Sorted
I cant seem to get any text what so ever to print with a prx over the xmb can anyone tell me what functions i need to just print hello world cheers

another question though is it possible for the font that the xmb uses for menus and the like to print text from a prx to the screen
User avatar
dot_blank
Posts: 498
Joined: Wed Sep 28, 2005 8:47 am
Location: Brasil

Post by dot_blank »

the psps font system is incredibly large ...way too much
foolery going around with pointers and caches and its
tossed all over the place ...so not gonna happen for a while
at the most
10011011 00101010 11010111 10001001 10111010
reefbarman
Posts: 87
Joined: Mon Jan 08, 2007 12:16 pm
Location: Australia

Post by reefbarman »

okay guess ill just stick with the debug text for a while, but i still cant seem to get it to print over the xmb without having to make the screen go black
reefbarman
Posts: 87
Joined: Mon Jan 08, 2007 12:16 pm
Location: Australia

Post by reefbarman »

hi guys has anyone here used the blit_string functions from the devhook sdk to put text onto the vsh, i can get it to work, im just wondering if there is a way to have the background color the txt sits on to be transparent??

cheers
reefbarman
Posts: 87
Joined: Mon Jan 08, 2007 12:16 pm
Location: Australia

Post by reefbarman »

sorry i have to bump this
fergie4000
Posts: 25
Joined: Fri Jan 19, 2007 3:03 pm

Post by fergie4000 »

you don't need to bump on this forum, most people are very helpful, i too can't figure how to blit text to the screen over the xmb. if you find out, tell me how.
:P
reefbarman
Posts: 87
Joined: Mon Jan 08, 2007 12:16 pm
Location: Australia

Post by reefbarman »

the topic was going a bit stale that was all, but i know its no too hard i have seen many plugings that do it, i just can't find the source code for any and the sdk i got from devhook uses a background colour for its text which i need to be transparent thanks guys if you can clear this up for us
Zettablade
Posts: 71
Joined: Fri May 05, 2006 5:59 pm

Post by Zettablade »

You have to write the text directly to vram. A_nub's VSHPong does the. And it also deals with the black background of the text. Wait until he releases the src code, then check it out :)
be2003
Posts: 144
Joined: Thu Apr 20, 2006 2:46 pm

Post by be2003 »

Zettablade wrote:You have to write the text directly to vram. A_nub's VSHPong does the. And it also deals with the black background of the text. Wait until he releases the src code, then check it out :)
i havent done much research into the subject but i hope this helps out:

you should find this in the blit_string function...

Code: Select all

for&#40;p=0;p<8;p++&#41;
&#123;
     vram32&#91;offset&#93; = &#40;font & 0x80&#41; ? fg_col &#58; bg_col;
     font <<= 1;
     offset++;
&#125;
replace it with

Code: Select all

for&#40;p=0;p<8;p++&#41;
&#123;
     if&#40;font & 0x80&#41;
          vram32&#91;offset&#93; = fg_col;
     font <<= 1;
     offset++;
&#125;
once again. i havent tested this out but it should take off the background color and just use the foreground if it is present. the blit_string function still has the flickering problem though...
- be2003
blog
reefbarman
Posts: 87
Joined: Mon Jan 08, 2007 12:16 pm
Location: Australia

Post by reefbarman »

okay so that should remove the bg color yes? but when you say flickering problem what do you mean?
reefbarman
Posts: 87
Joined: Mon Jan 08, 2007 12:16 pm
Location: Australia

Post by reefbarman »

i think the main thing that is holding alot more developers back from producing more plugins and prxs is the fact that there is not much documentation or anything really to do with displaying reliable and usable text and graphics onto the xmb. For my self its holding back the release of an app that i have that also has a xmb plugin while i can write prx i cant display what i want and it makes it pretty much useless
Anissian
Posts: 16
Joined: Fri Jan 26, 2007 8:40 pm

Post by Anissian »

reefbarman wrote: there is not much documentation or anything really to do with displaying reliable and usable text and graphics onto the xmb...
Let me add that I share the same concerns. It is not something I have played a lot with, but I agree that the idea of e.g. having a firmware plugin that when the user presses a key combo the plugin displays a (graphical) window menu such as an overlay with alpha-blending is something I was planning to experiment with, and opens a lot of possibilities to customize and extend custom firwares.

Unfortunately, I am not sure where to start. Some hints and "proof of concepts" (like if it is a "modal-dialog"-like overlay it may be possible to capture the screen from VRAM and draw the overlay with blending) I am aware of seem to imply that this would require low level access.

Mine is not a very useful post, just adding that I've been following the thread in case a framework, proof of concept, prototype or sample (e.g. a user presses L and a circle is drawn in the screen) to do graphical layers/overlays in the XMB by means of plugins appears and it would be welcome :o)
reefbarman
Posts: 87
Joined: Mon Jan 08, 2007 12:16 pm
Location: Australia

Post by reefbarman »

Anissian wrote:
reefbarman wrote: there is not much documentation or anything really to do with displaying reliable and usable text and graphics onto the xmb...
Let me add that I share the same concerns. It is not something I have played a lot with, but I agree that the idea of e.g. having a firmware plugin that when the user presses a key combo the plugin displays a (graphical) window menu such as an overlay with alpha-blending is something I was planning to experiment with, and opens a lot of possibilities to customize and extend custom firwares.

Unfortunately, I am not sure where to start. Some hints and "proof of concepts" (like if it is a "modal-dialog"-like overlay it may be possible to capture the screen from VRAM and draw the overlay with blending) I am aware of seem to imply that this would require low level access.

Mine is not a very useful post, just adding that I've been following the thread in case a framework, proof of concept, prototype or sample (e.g. a user presses L and a circle is drawn in the screen) to do graphical layers/overlays in the XMB by means of plugins appears and it would be welcome :o)
actually you have given me idea with talking about overlays, i hadn't thought of doing it that way before, but i use a 2d graphics library called OSlib to do alot of my graphical displays in my apps, and it has the abilities to grab the screen put it into its own buffer in vram so you can then draw onto the picture and then put it back out to the screen, i might give this a go and if i can get the library to work nice within a prx function i may just be able to get anything to the screen then thanks for the idea
User avatar
dot_blank
Posts: 498
Joined: Wed Sep 28, 2005 8:47 am
Location: Brasil

Post by dot_blank »

just use the dialog utility of psputility to output text and let psp handle the fonts
10011011 00101010 11010111 10001001 10111010
reefbarman
Posts: 87
Joined: Mon Jan 08, 2007 12:16 pm
Location: Australia

Post by reefbarman »

dot_blank wrote:just use the dialog utility of psputility to output text and let psp handle the fonts
oh excellent i didnt realise there was such a function ill have to give it ago, but i would still like to learn how to write text and graphics directly to the screen as i want to have a pop up box overlay and such over the top of the xmb.

But i think sceUtilityMsgDialogInitStart is not quite what im looking for as i need to be able to define where it is on screen size and colour

thanks though dot
Post Reply