Editing Talk:XMBML Coding

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
=Suggestions, etc=
*The '''<View id>''''s '''"root", "root_for_dex", "root_for_BDU", "tool_root", "shop_root", "shop_guest_root", "shop_staff_root", "root_arcade"''' refered as '''Target ID's''' is not an accurate definition... "root" and "root_for_dex" are different target ID's but "shop_root" and "shop_guest_root" are different boot modes of the same target ID... for this reason is used the concept of "XMB enviroments" but is an invented name, i have no idea if there is a more accurate definition in other parts of the firmware, documentation, whatever... if someone has a better idea please update the frontpage and erase this section here in talkpage --[[User:Sandungas|Sandungas]] ([[User talk:Sandungas|talk]]) 23:42, 23 January 2014 (EST)


=Tips and tools=
*An usefull trick to help documenting xml strings is to drag-and-drop all PS3 .xml files (from path '''dev_flash/vsh/resource/explore/xmb/''') to notepad++. Then use the search function in notepad++ (ctrl+F) to search for a text string and click in "find all in all opened documents"
*An usefull trick to help documenting xml strings is to drag-and-drop all PS3 .xml files (from path '''dev_flash/vsh/resource/explore/xmb/''') to notepad++. Then use the search function in notepad++ (ctrl+F) to search for a text string and click in "find all in all opened documents"
=Suggestions, etc=
*The '''<View id>''''s '''"root", "root_for_dex", "root_for_BDU", "tool_root", "shop_root", "shop_guest_root", "shop_staff_root", "root_arcade"''' refered as '''XMB enviroments''' is not an accurate definition, is an invented name, i have no idea if there is a more accurate definition in other parts of the firmware, documentation, whatever... if someone has a better idea please update the frontpage and erase this section here in talkpage --[[User:Sandungas|Sandungas]] ([[User talk:Sandungas|talk]]) 23:42, 23 January 2014 (EST)


*The View ID '''"root"''' usually is refered as the identifyer of a group of items that will be loaded by retail XMB, but not always, e.g:
*The View ID '''"root"''' usually is refered as the identifyer of a group of items that will be loaded by retail XMB, but not always, e.g:
Line 17: Line 16:


*'''focus_category''' can be used with game, photo, video, etc... any XMB column
*'''focus_category''' can be used with game, photo, video, etc... any XMB column
*'''wait''' (e.g: 1000, 2000)
*'''wait''' (e.g: 1000)
*'''focus_segment_index seg_newvmc 0''' (loads a segment from a .xml, then sets the value 0)
*'''focus_segment_index seg_newvmc 0''' (loads a segment from a .xml, then sets the value 0)
*'''focus_segment_index seg_sdpsp 0.scroll_list -1 1000''' (this is a complex sequence of actions)
*'''focus_segment_index seg_sdpsp 0.scroll_list -1 1000''' (this is a complex sequence of actions)
*'''open_list'''
*'''open_list'''
*'''yield'''
*'''yield'''
 
etc...
More detailed info in [[Explore plugin]] page
 
= XML structure levels =
The table is ok but it has a problem, is not posible to represent where is located <String> (chldren of <Pair>)... so this probably needs to be replaced by something better
{| class="wikitable"
|-
! colspan=5 | XML tag levels !! colspan=7 | Common tags
|-
! lv1 !! lv2 !! lv3 !! lv4 !! lv5 !! version !! id !! class !! key !! attr !! src !! include
|-{{cellcolors|#9999ff}}
| rowspan=6 | XMBML || colspan=4 | || {{yes}} || {{no}} || {{no}} || {{no}} || {{no}} || {{no}} || {{no}}
|-{{cellcolors|#99ff99}}
| rowspan=5 | View || colspan=3 | || {{no}} || {{yes}} || {{no}} || {{no}} || {{no}} || {{no}} || {{no}}
|-
| rowspan=2 | Attributes || rowspan=2 {{cellcolors|#ff9999}} Table || {{cellcolors|#ff9999}} || {{no}} || {{no}} || {{no}} || {{yes}} || {{no}} || {{no}} || {{opt}}
|-
| Pair || {{no}} || {{no}} || {{no}} || {{yes}} || {{no}} || {{no}} || {{no}}
|-
| rowspan=2 | Items || colspan=2 | Query || {{no}} || {{no}} || {{yes}} || {{yes}} || {{opt}} || {{opt}} || {{no}}
|-
| colspan=2 | Item || {{no}} || {{no}} || {{yes}} || {{yes}} || {{opt}} || {{opt}} || {{no}}
|}
 
{{boxcodelite|float=left|title=XMBML generic structure descriptor from explore_plugin.sprx|code=
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
 
0027A950  58 4D 42 4D 4C 00 00 00 76 65 72 73 69 6F 6E 00  XMBML...version.
0027A960  31 2E 30 00 00 00 00 00 56 69 65 77 00 00 00 00  1.0.....View....
0027A970  69 64 00 00 00 00 00 00 49 74 65 6D 73 00 00 00  id......Items...
0027A980  49 74 65 6D 00 00 00 00 51 75 65 72 79 00 00 00  Item....Query...
0027A990  6B 65 79 00 00 00 00 00 63 6C 61 73 73 00 00 00  key.....class...
0027A9A0  61 74 74 72 00 00 00 00 73 72 63 00 00 00 00 00  attr....src.....
0027A9B0  74 79 70 65 3A 00 00 00 63 6C 73 69 64 3A 00 00  type:...clsid:..
0027A9C0  41 74 74 72 69 62 75 74 65 73 00 00 00 00 00 00  Attributes......
0027A9D0  54 61 62 6C 65 00 00 00 6B 65 79 00 00 00 00 00  Table...key.....
0027A9E0  69 6E 63 6C 75 64 65 00 50 61 69 72 00 00 00 00  include.Pair....
0027A9F0  6B 65 79 00 00 00 00 00 53 74 72 69 6E 67 00 00  key.....String..
}}{{clear}}
 
*This is the last unknown, seems to be used to specify a class by its ID (used as replacement of '''type:'''), is unknown if it can be used with Query classes, Item classes, or with both
{{Boxcode|code=<syntaxhighlight lang="xml">
<Query class="clsid:unknown_id"/>
<Item class="clsid:unknown_id"/>
</syntaxhighlight>}}
 
= #include Table=
In old firmwares there seems to be a way to '''include''' attribute tables inside other attribute tables, it works in the same way like in some coding languages, the included stuff needs to be loaded before the tag that includes it, and the names used are the same than the table keys, as example, using the minimalistic example of front page:
 
{{Boxcode|code=<syntaxhighlight lang="xml">
<View id="example">
<Attributes>
<Table key="PS3_cover_size">
<Pair key="icon_fixed_width"><String>170</String></Pair>
<Pair key="icon_fixed_height"><String>200</String></Pair>
</Table>
<Table key="game_001" include="PS3_cover_size">
<Pair key="icon"><String>...game_001_cover.jpg</String></Pair>
</Table>
<Table key="game_002" include="PS3_cover_size">
<Pair key="icon"><String>...game_002_cover.jpg</String></Pair>
</Table>
<Table key="game_003" include="PS3_cover_size">
<Pair key="icon"><String>...game_003_cover.jpg</String></Pair>
</Table>
</Attributes>
<Items>
<Item key="game_001" attr="game_001"/>
<Item key="game_001" attr="game_002"/>
<Item key="game_001" attr="game_003"/>
</Items>
</View>
</syntaxhighlight>}}
 
In the example the attribute tables named "game_xxx" are going to load the contents of the table named "PS3_cover_size", this can be used when there are several items that uses the same attributes, is posible to create some common groups of attributes that defines a group (for restrictions or shared features), and then create more items or querys that loads an small attribute table specific for the icon + additionally the included attributes common for this kind of item. This is specially useful to make custom .xml files much smaller by removing duplicated lines (like webman)
 
 
=Music lists=
In category_music.xml firmware 0.83
{{Boxcode|code=<syntaxhighlight lang="xml">
<View id="root">
<Attributes>
<Table key="attr_hdd_contents">
<Pair key="view0"><String>xcb://localhost/query?sort=+Music:MusicServed.playerForSort+Music:MusicServed.listTitleForSort+Music:MusicServed.trackNumber&cond=Aa+Music:Music.codec</String></Pair>
<Pair key="view1"><String>xcb://localhost/query?sort=+Music:MusicServed.listTitleForSort&cond=Aa+Music:MusicServed.listTitleForSort_lst</String></Pair>
<Pair key="view2"><String>xcb://localhost/query?sort=+Music:MusicServed.playerForSort&cond=Aa+Music:MusicServed.playerForSort_lst</String></Pair>
<Pair key="view3"><String>xcb://localhost/query?sort=+Music:MusicServed.genre&cond=Aa+Music:MusicServed.genre_lst</String></Pair>
</Table>
</Attributes>
 
<Items>
<Query
class="type:x-xmb/folder-pixmap"
key="seg_hdd_contents"
attr="attr_hdd_contents"
src="xcb://localhost/query?sort=+Music:MusicServed.playerForSort+Music:MusicServed.listTitleForSort+Music:MusicServed.trackNumber&cond=Aa+Music:Music.codec"
/>
</Items>
</View>
</syntaxhighlight>}}
*Non-standard/unknown:
**'''Attribute keys''': view0, view1, view2, view3
**[[XMB database]] field names terminated with '''_lst''': (listTitleForSort_lst, playerForSort_lst, genre_lst)
Please note that all contributions to PS3 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS3 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)