PS3 custom xai_plugin (+ source)

Yes, is interesting, is an alternative way to send actions to the sprx
Also, because at the time mysis made the xai_plugin.sprx he realized it was not working because inside xmb_plugin.sprx and xmb_ingame.sprx is also hardcoded the name of the xai_plugin.rco
Without the .rco was not working

So i made a dummy xai_plugin.rco completlly empty, trying to make it smaller posible but still keeping the standards (to dont break anything)
Instead of an empty rco we could have played a bit more with it
By writing the rcoxml file from scratch is posible to use rcoxml objects for menues, lists, icons, etc.. also to store custom icons inside the rco, custom texts (for 20 languages), change font settings, adding custom "click" sounds, etc...
 
There's still so much to investigate & potentially use in all these rco/prx implementations.
Also given their importance & usefulness, all the reversed system plugins have been documented on the wiki but it would require some polishing, completing the missing info, detailing a lot of parameters that are still sketchy... And maybe a few more snippets to illustrate. Ideally...
Don't get me wrong it is not a criticism of my beloved wiki lol. Just hoping it could be get improved...
 
@sandungas I was looking at some xmls the other day and I noticed that the bar_action is present in some XMLs without lbl_half and it uses parameters. For example the category_sysconf.xml - there are few, but:

<Table key="pd_voice_changer">
<Pair key="icon_rsc"><String>tex_sett</String></Pair>
<Pair key="title_rsc"><String>msg_voice_changer</String></Pair>
<Pair key="info_rsc"><String>msg_voice_changer_explanation</String></Pair>
<Pair key="bar_action"><String>voice_changer</String></Pair>
</Table>

I took a look at the decompiled sysconf_plugin.rco but there are no references to "voice_changer" in it Both "msg_voice_changer/explanation" strings are present in the .prx, but the bar_action string is not.
 
Last edited:
There's still so much to investigate & potentially use in all these rco/prx implementations.
Also given their importance & usefulness, all the reversed system plugins have been documented on the wiki but it would require some polishing, completing the missing info, detailing a lot of parameters that are still sketchy... And maybe a few more snippets to illustrate. Ideally...
Don't get me wrong it is not a criticism of my beloved wiki lol. Just hoping it could be get improved...
90% of wiki is still a "work in progress", everybody is invited to edit it, i want to point to a common problem all wiki editors probably had

Personally, i always wanted to start adding info in wiki about RCO and other files directlly related to it, also as a preservation from all the mods from PSP scene, i had this in mind like years ago, but i realized soon that to make this in a good way first was needed to create an "skelleton" of pages related to separate the info by groups (also, inside every one of the pages anothoer Skelleton" of sections)
The adventure to create all that is something that scared me for long time (years), not just about completing them (that is a goal i know i cant do) but just to imagine how to perpare new pages to start adding info in them is an oddisey by itself because for that you need to have an small overall idea of how all works
This is why lot of pages related to RCO are like half written and dirty, the good thing is are ready and prepared to continue growing :)
Time ago there was nothing in wiki related to RCO

With mysis and the modules/plugins/vsh happened the same, at some point we had several discussion with eussNL too thinking wich was the best way to do it, and eussNL decided to create new sections, pages for every plugin, etc... this was one of the massive expansions wiki had (like with RCO and some others i did related with XMB)
This is why the plugin pages are also a bit empty, are mostlly worklogs
There are not explains in each plugin page about what the plugin does (for newcomers, wiki is for everyone, not just coders, things needs to be explained in plain words at top as an introduction to the page), ias not explained what is exactlly an "interface", etc...
That kind of things usually are added by wiki editors when doing a rewrite of the page, or when trying to improving it for completion purposes... but this doesnt uses to happen until the page (or a section of that page) is about to be completed

@sandungas I was looking at some xmls the other day and I noticed that the bar_action is present in some XMLs without lbl_half and it uses parameters. For example the category_sysconf.xml - there are few, but:

<Table key="pd_voice_changer">
<Pair key="icon_rsc"><String>tex_sett</String></Pair>
<Pair key="title_rsc"><String>msg_voice_changer</String></Pair>
<Pair key="info_rsc"><String>msg_voice_changer_explanation</String></Pair>
<Pair key="bar_action"><String>voice_changer</String></Pair>
</Table>

I took a look at the decompiled sysconf_plugin.rco but there are no references to "voice_changer" in it Both "msg_voice_changer/explanation" strings are present in the .prx, but the bar_action string is not.
I noticed the values of bar_action inside sysconf_plugin, i use to add all valid values i find in this table, just as an start point to know wich kind of values are used officially and should be cosidered valid for tests
http://www.psdevwiki.com/ps3/XMBML_Coding#Attributes_.28Pairs.29

That table is also another thing that went out of control in wiki, i could never imagine it was going to reach that size when i started, but is the only place where are documented all that pair keys
The problem... there is no room in the table to explain how works each key... the explains are at bottom of the table but sucks a bit, i guess this is other of the wiki things that needs to be "expanded" to a new page

I cant tell much about bar_action, all i said about it was speculation, iirc the only place when uses values (other than the value "none") is in sysconf_plugin
And sysconf_plugin is pretty special, it does some things that the other XMB columns cant do (like the autohiding and autodisplaying of groups of icons when you press a secret button combo), also is very restrictive, it looks like the .sprx overrides the changes made in other files

Related with what you was asking...
From a sprx you can load "rcoxml objects" selectivelly by its label, usually the "Page" objects that has unique names to identify them (the pages doesnt displays anything btw, dont think in them as something visual, just as the root of a group of children objects)

But doesnt matches with the value you was looking for (the voice_changer in your example)
So dont know... maybe there is a link in between we are missing (some place where the label names are replaced by others)
Is also posible that the "bar" is refered to that two bars i mentioned (progress and scroll) in a generic way, not a direct reference to the rco by its label

Most of this brainstorming is based in the fact that a "bar" (from bar_action) and "half" (from lbl_half) looks like something visual, and all visual stuff is directlly or indirectlly connected to RCO
And for an RCO there are just that 2 bars (progress or scroll)

Also, lets say that happens like with the module-name and module_action that are used consecutivelly... first you specify the name of the module, and them an extended characteristique for it

In the same way bar_action and lbl_half could be... first you specify the action, and then the kind of action (half bar)
More brainstorming... lets say a bar by default has 100 "steps" to fill it completlly... by using "half" then the bar has the same lenght but it fills faster (because only has half of the steps)

Lol... i know this was too much, but anyway, just thinking loud, i never took a look at this very seriouslly and never made any test with it


------------
But actually... while writing this has coming a new idea that i really like
As said... with module_name and module_action first you specify the name and then the action (in the opposite order should not work btw, the order is important)

And we know that exists bar_action so....
bar_name ---> bar_action

In other words, im saying that bar_name exists (this has never been found along hundreds of rco files i been performing searchs from pre-retail up to latest PSP and PS3 firmwares)
Speculation 100% but after writing all this i think there are big probabilities for this to be true
 
Last edited:
Maybe bar_action is shortcut for backup and restore action? Some trigger to save or load something from/to registry etc.
 
Maybe bar_action is shortcut for backup and restore action? Some trigger to save or load something from/to registry etc.
It needs to be something more generic because is used in lot of places (with the value "none" btw, this is also a bit weird)

It looks like is there with the value "none"... just to disable it
The second most used value is "hide"... that is like an alternative way to disable it
Boths "none" and "hide" makes me think is enabled by default

But you can be right in pointing that could be an acronym... the initial letters of 3 words

--------------
I was thinking in something like that for "lbl_half" too
The "half" is a word... but the "lbl" is an acronym
LBL could be something like... Left, Bottom, Left
Again... i was still thiking is something visual (some kind of bar adjusted to left, bottom, left, and divided in half)

But is not that... because the directions of the D-pad are named officially: left, right, up, down (not bottom)
 
Actually, by looking at the names of the other keys in the table
-------------------------------------------------------------

name <--- found in ofw, unknown
action <--- found in ofw, unknown

module_name <--- found in ofw, known
module_action <--- found in ofw, known

bar_name <--- never found in ofw, guess !
bar_action <--- found in ofw, unknown

fo_lbl_alpha <--- found in ofw, unknown
fo_lbl2_alpha <--- found in ofw, unknown

lbl_half <--- found in ofw, unknown
lbl2_half <--- never found in ofw, guess !

-------------------------------------
The "name/action" groups looks like communications to different targets
The "lbl" are not groups (can be used individually), looks like visual effects

What seems to happen with the "lbl" is like in other codenames of the firmware where the "1" has been removed from the name (like dev_flash instead of dev_flash1 or many other examples)... so there is a lbl1 and a lbl2
Are 2 parts of something (maybe has more parts but i dont think)

The lbl could be related with a geometric item where is applyed a visual effect like the one used to colour the XMB wave, where are used two values to apply a color at top and another color at bottom of the wave, and when the wave is displayed it creates a degrade of colors in between top and bottom
Also, are mentioned the words "half" and "alpha" that matches fine with this idea that is some kind of visual effect with 2 values

All this "lbl" keys should accept an entire or float value btw... probably are an scaler where 1 represents the 100% (so alpha = 0.5 = half transparent)
 
Last edited:
Whenever I saw the words "bar action" and "none" I always assumed it was meant literally, as in bar = block , I thought it meant no possible actions were blocked, and that there were some cases where certain actions could be blocked. For example if "hide" is a possible entry for a "bar action" then in my theory it would have meant that that item is "barred" from being hidden. Not sure if it makes much sense though really.
 
what components are needed to compile? vs 2013 getting errors (sdk installed)
No extra components needed, just the official SDK properly installed and Vstudio properly setup with the SDK plugin.

You need to post the exact errors you are getting otherwise we cannot help you.

There are newer versions of this plugin, check Evilnat GitHub repositories.
 
Vstudio properly setup with the SDK plugin.
Could you tell us more about this?

0>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.Redirect.props(23,3): warning MSB4011: "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\PS3\Microsoft.Cpp.PS3.default.props" cannot be imported again. It was already imported at "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v110\Microsoft.Cpp.Default.props (46,3)". This is most likely a build authoring error. This subsequent import will be ignored. [C:\xai_plugin-main\videorec\videorec.vcxproj]
Build started 08.07.2022 4:58:00.
1>Project "C:\xai_plugin-main\videorec\videorec.vcxproj" on node 2 (Build target(s)).
1>ClCompile:
stdafx.cpp
ps3ppusnc.exe -D_DEBUG -D__CELL_ASSERT__ -D__PS3__ -DLIBNAME=cellPrx_videorec -DSTUBNAME=cellPrx_videorec_stub -o PS3_Debug\stdafx.o -c -Xdepmode=1 -MD -Xmserrors -I. -IC:/usr/local/cell\target\ppu\include -IC:/usr/local/cell\target\common\include -I"C:/usr/local/cell\host-win32\sn\ppu\include" -g -O0 -Xc-=rtti --create_pch="PS3_Debug\videorec.pch" C:\xai_plugin-main\videorec\stdafx.cpp
"C:\xai_plugin-main\videorec\stdafx.cpp": creating precompiled header file "PS3_Debug\videorec.pch"
prx.cpp
ps3ppusnc.exe -D_DEBUG -D__CELL_ASSERT__ -D__PS3__ -DLIBNAME=cellPrx_videorec -DSTUBNAME=cellPrx_videorec_stub -o PS3_Debug\prx.o -c -Xdepmode=1 -MD -Xmserrors -I. -IC:/usr/local/cell\target\ppu\include -IC:/usr/local/cell\target\common\include -I"C:/usr/local/cell\host-win32\sn\ppu\include" -g -O0 -Xc-=rtti --use_pch="PS3_Debug\videorec.pch" C:\xai_plugin-main\videorec\prx.cpp
1>C:\xai_plugin-main\videorec\prx.cpp(95,13): warning 552: variable "err" was set but never used

1>C:\xai_plugin-main\videorec\prx.cpp(135,6): warning 178: variable "tmp" was declared but never referenced

1>C:\xai_plugin-main\videorec\prx.cpp(166): warning 942: missing return statement at end of non-void function "_videorec_export_function_video_rec"

1>C:\xai_plugin-main\videorec\prx.cpp(173,60): warning 942: missing return statement at end of non-void function "npdr_handler"

1>C:\xai_plugin-main\videorec\prx.cpp(209,44): warning 942: missing return statement at end of non-void function "ps3_savedata_plugin_init__"

1>C:\xai_plugin-main\videorec\prx.cpp(248,56): warning 942: missing return statement at end of non-void function "x3_0xD277E345_"

1>C:\xai_plugin-main\videorec\prx.cpp(271): warning 942: missing return statement at end of non-void function "x3_0xD277E345_hook"

1>C:\xai_plugin-main\videorec\prx.cpp(272,80): warning 942: missing return statement at end of non-void function "x3_0xA06976E_"

1>C:\xai_plugin-main\videorec\prx.cpp(292,79): warning 942: missing return statement at end of non-void function "GetItemFromMetaList_"

1>C:\xai_plugin-main\videorec\prx.cpp(321,84): warning 942: missing return statement at end of non-void function "GetItemFromMetaList_Mini_"

1>C:\xai_plugin-main\videorec\prx.cpp(404,76): warning 942: missing return statement at end of non-void function "cellFsOpen_"

1>C:\xai_plugin-main\videorec\prx.cpp(423,69): warning 942: missing return statement at end of non-void function "cellFsRead_"

1>C:\xai_plugin-main\videorec\prx.cpp(485,5): warning 178: function "notify(const char *, int)" was declared but never referenced

1>C:\xai_plugin-main\videorec\prx.cpp(480,5): warning 178: function "notify(char *)" was declared but never referenced

Link:
C:\usr\local\cell\host-win32\sn\bin\ps3ppuld64.exe -oformat=prx -o "C:\xai_plugin-main\PS3_Debug\videorec.prx" -L"C:/usr/local/cell\host-win32\lib\prx\ldscripts" --start-group PS3_Debug\prx.o PS3_Debug\stdafx.o C:/usr/local/cell\target\ppu\lib\libsyscall.a C:/usr/local/cell\target\ppu\lib\libc.a C:/usr/local/cell\target\ppu\lib\librtc_stub.a libsn.a libm.a libio_stub.a libfs_stub.a --end-group
1>SCETRACKER : error : Could not install hook for function ExitProcess in module kernel32.dll
1>SCETRACKER : error : Could not install hook for function ExitProcess in module kernel32.dll
1>Done Building Project "C:\xai_plugin-main\videorec\videorec.vcxproj" (Build target(s)) -- FAILED.
Build FAILED.
Time Elapsed 00:00:00.88
 
Last edited:
Could you tell us more about this?

0>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.Redirect.props(23,3): warning MSB4011: "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\PS3\Microsoft.Cpp.PS3.default.props" cannot be imported again. It was already imported at "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v110\Microsoft.Cpp.Default.props (46,3)". This is most likely a build authoring error. This subsequent import will be ignored. [C:\xai_plugin-main\videorec\videorec.vcxproj]
Build started 08.07.2022 4:58:00.
1>Project "C:\xai_plugin-main\videorec\videorec.vcxproj" on node 2 (Build target(s)).
1>ClCompile:
stdafx.cpp
ps3ppusnc.exe -D_DEBUG -D__CELL_ASSERT__ -D__PS3__ -DLIBNAME=cellPrx_videorec -DSTUBNAME=cellPrx_videorec_stub -o PS3_Debug\stdafx.o -c -Xdepmode=1 -MD -Xmserrors -I. -IC:/usr/local/cell\target\ppu\include -IC:/usr/local/cell\target\common\include -I"C:/usr/local/cell\host-win32\sn\ppu\include" -g -O0 -Xc-=rtti --create_pch="PS3_Debug\videorec.pch" C:\xai_plugin-main\videorec\stdafx.cpp
"C:\xai_plugin-main\videorec\stdafx.cpp": creating precompiled header file "PS3_Debug\videorec.pch"
prx.cpp
ps3ppusnc.exe -D_DEBUG -D__CELL_ASSERT__ -D__PS3__ -DLIBNAME=cellPrx_videorec -DSTUBNAME=cellPrx_videorec_stub -o PS3_Debug\prx.o -c -Xdepmode=1 -MD -Xmserrors -I. -IC:/usr/local/cell\target\ppu\include -IC:/usr/local/cell\target\common\include -I"C:/usr/local/cell\host-win32\sn\ppu\include" -g -O0 -Xc-=rtti --use_pch="PS3_Debug\videorec.pch" C:\xai_plugin-main\videorec\prx.cpp
1>C:\xai_plugin-main\videorec\prx.cpp(95,13): warning 552: variable "err" was set but never used

1>C:\xai_plugin-main\videorec\prx.cpp(135,6): warning 178: variable "tmp" was declared but never referenced

1>C:\xai_plugin-main\videorec\prx.cpp(166): warning 942: missing return statement at end of non-void function "_videorec_export_function_video_rec"

1>C:\xai_plugin-main\videorec\prx.cpp(173,60): warning 942: missing return statement at end of non-void function "npdr_handler"

1>C:\xai_plugin-main\videorec\prx.cpp(209,44): warning 942: missing return statement at end of non-void function "ps3_savedata_plugin_init__"

1>C:\xai_plugin-main\videorec\prx.cpp(248,56): warning 942: missing return statement at end of non-void function "x3_0xD277E345_"

1>C:\xai_plugin-main\videorec\prx.cpp(271): warning 942: missing return statement at end of non-void function "x3_0xD277E345_hook"

1>C:\xai_plugin-main\videorec\prx.cpp(272,80): warning 942: missing return statement at end of non-void function "x3_0xA06976E_"

1>C:\xai_plugin-main\videorec\prx.cpp(292,79): warning 942: missing return statement at end of non-void function "GetItemFromMetaList_"

1>C:\xai_plugin-main\videorec\prx.cpp(321,84): warning 942: missing return statement at end of non-void function "GetItemFromMetaList_Mini_"

1>C:\xai_plugin-main\videorec\prx.cpp(404,76): warning 942: missing return statement at end of non-void function "cellFsOpen_"

1>C:\xai_plugin-main\videorec\prx.cpp(423,69): warning 942: missing return statement at end of non-void function "cellFsRead_"

1>C:\xai_plugin-main\videorec\prx.cpp(485,5): warning 178: function "notify(const char *, int)" was declared but never referenced

1>C:\xai_plugin-main\videorec\prx.cpp(480,5): warning 178: function "notify(char *)" was declared but never referenced

Link:
C:\usr\local\cell\host-win32\sn\bin\ps3ppuld64.exe -oformat=prx -o "C:\xai_plugin-main\PS3_Debug\videorec.prx" -L"C:/usr/local/cell\host-win32\lib\prx\ldscripts" --start-group PS3_Debug\prx.o PS3_Debug\stdafx.o C:/usr/local/cell\target\ppu\lib\libsyscall.a C:/usr/local/cell\target\ppu\lib\libc.a C:/usr/local/cell\target\ppu\lib\librtc_stub.a libsn.a libm.a libio_stub.a libfs_stub.a --end-group
1>SCETRACKER : error : Could not install hook for function ExitProcess in module kernel32.dll
1>SCETRACKER : error : Could not install hook for function ExitProcess in module kernel32.dll
1>Done Building Project "C:\xai_plugin-main\videorec\videorec.vcxproj" (Build target(s)) -- FAILED.
Build FAILED.
Time Elapsed 00:00:00.88
Are you building the project? Or trying to run/debug it in which case you need ProDG installed and you should try running VStudio 2013 as administrator.
 
@sandungas @DeViL303

I came across this thread and realized you guys don't know what these Pairs do

Code:
<Pair key="fo_lbl_alpha"><String></String></Pair>
                <Pair key="fo_lbl2_alpha"><String></String></Pair>

The first one affects the title and the second one the info when out of focus, you can use values between 0 and 1 to give different transparency (alpha) effects, any values above 1 will give a strange blinking behaviour,

i use these attributes manly on long info texts that overlaps the item below it.

Example here (See the Install Package Files info text)

Case 1: Normal XMB behaviour (Long text will overlap the other icon)
9y8EIrS.png



Case 2: Using
Code:
<Pair key="fo_lbl2_alpha"><String>0</String></Pair>
to hide it and show only when focused

Out of focus: (As i set it to 0, it will be transparent)

HRNZzNC.png


And it will show only when focused

05ObsK4.png
 
Last edited:
@sandungas @DeViL303

I came across this thread and realized you guys don't know what this Pairs do

Code:
<Pair key="fo_lbl_alpha"><String></String></Pair>
                <Pair key="fo_lbl2_alpha"><String></String></Pair>

The first one affects the title and the second one the info when out of focus, you can use many values not only 0 or 1, different valus like 50, 70 will give different transparency (alpha) effects but some values will give a strange blinking behaviour, i use it manly for long info texts that overlaps the item below it.

Example here (See the Install Package Files info text)

Case 1: Normal XMB behaviour (Long text will overlap the other icon)
9y8EIrS.png



Case 2: Using
Code:
<Pair key="fo_lbl2_alpha"><String>0</String></Pair>
to hide it and show only when focused

Out of focus: (As i set it to 0, it will be transparent)

HRNZzNC.png


And it will show only when focused

05ObsK4.png


Sony uses this in the Remote Play icon.
 
Last edited:
@sandungas @DeViL303

Code:
<Pair key="bar_action"><String></String></Pair>

Is useful when a plugin uses an user interface and we need to hide the XMB to show it properly

Lets use download plugin as example

Code:
<Pair key="module_name"><String>download_plugin</String></Pair>
                <Pair key="module_action"><String>0</String></Pair>

This one allow you to enter an url to download a file without need to go to the web browser
cT5qzb3.png



Using "none' as bar action will result in:
w1WOdxE.png


Using "hide" as bar_action will result in:
y3kOaL8.png
 
@aldostools

using web commands to download files via webman not hide the XMB, can the <Pair key="bar_action"><String>hide</String></Pair> be used in this function somehow when called via webman?
 
xai plugin crashes when <Pair key="bar_action"><String>none</String></Pair> is not defined because the default behavior is to hide and the plugin does not provide any user interface, so the system does not know what to do and crashes
 
Back
Top