Editing XMB Layouts

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:
{{wikify}}  
{{wikify}}
=Description=
=Description=
This files contains a list of values that defines the global coordinates of the <abbr title="The full lists has not been scanned and identifyed completly, but so far only was found positions and sizes">positions and sizes</abbr>  loaded by some [[RCOXML Objects]]. Are divided in 4 [http://manuals.playstation.net/document/en/ps3/current/settings/videooutput.html video resolution modes] by its heigths: ('''1080''', '''720''', '''480''', '''272'''), and its types: ('''grid''', and '''factor''')<br>
This files contains a list of numeric values that defines the positions, sizes, etc of most/all the items displayed in XMB. Are divided in 4 resolution modes, most specifically by his heigths: (272, 480, 720, and 1080), and 2 types: (factor, and grid).
The values inside the '''grid''' tables contains the positions and sizes, while the '''factor''' tables contains multiplyers that are applyed to the '''grid''' values<br>
 
Everytime a [[RCOXML Objects|RCOXML Object]] loads a value from the '''grid''' table is also loading another value from the '''factor''' table associated with it, then is applyed a math formula to calculate the resulting positions and sizes<br>
Factor ones contains around 143 values, and Grid ones contains around 4545 values (grid ones are much bigger). As a reference for known pixel sizes... all the values of the [[Content Information Files]] images appears in one or more of the "XMB Layout Tables"
This design is intended to reconfigure the position and sizes of all [[RCOXML Objects]] dinamically for the 4 different screen resolutions supported by [[XMB]]


{{XMB Layout Tables}}
{{XMB Layout Tables}}


=Versions=
http://manuals.playstation.net/document/en/ps3/current/settings/videooutput.html
*Hash reports:
**All tables combined (220 variants) [https://www.mirrorcreator.com/files/4LMFEPEY/tableHASHreport.7z_links download]
**All grid tables combined (157 variants) [https://www.mirrorcreator.com/files/1H1MNZIV/tablegridHASHreport.7z_links download]
**All factor tables combined (63 variants) [https://www.mirrorcreator.com/files/3IMROTWL/tablefactorHASHreport.7z_links download]
 
==Grid==
{{layout_grid_tables}}
 
==Factor==
{{layout_factor_tables}}
 
*Speculation
**Lines 4, 5 are the screen resolution (width * height)
**Lines 6,7, 8 seems to be a general scale factor (a multiplyer that allows decimals used to scale sizes), and maybe related with X,Y,Z axis scales
 
=RCO override attributes=
'''All "Override" attributes are pointers to a value stored in a line of [[XMB Layouts]] .txt files, the override indicates the line number in the .txt and the value in that line is loaded by the .rco
**Some values used by [[RCOXML Objects]] and [[RCOXML Animations]] are loaded externally to be able to scale the whole XMB interface for different screen resolution modes. Sony was adding more stuff in the XMB along the different firmware versions, and some of this "new" items used this same method, the result is more "override" values was added to the [[XMB Layouts]] .txt files, and as a consequence some of the other "old" values was "displaced" a few lines down in the [[XMB Layouts]] .txt files. This is the reason why in the changelog of custom_render_plugin.rco (and i bet most of the others .rco's using overrides) the value increases just a few units for every new version of the .rco (that units are a few lines that was added for that firmware in the .txt)
**The reason why the new values added in the .txt displaces the old values... is because the list of values inside the .txt are ordered "by rco ownership". First are stored all the values for rco nº1... then all the values for rco nº2... and so on... obviouslly custom_render_plugin is not at top of the list because it stores his values around line 500. It has other values from other rco's before it and when that others had some addition this made the values of custom_render_plugins to be displaced some lines down in the list
***I have no idea wich position in the [[XMB Layouts]] .txt files uses every .rco probably are ordered by using one of the lists from a .sprx or vsh.self... or maybe the order depends of the compilation enviroment sony uses for the official firmware
 
*Usually the override values from a specific .rco file are stored consecutivelly in the [[XMB Layouts]] files
*But other values can be loaded by several .rco files. As example, the "plane" object "ps3logo" (children of "page" object "page_gameboot") is defined inside custom_render_plugin.rco and inside gamelib_plugin.rco both uses overrides to scale the playstation logo in size and the overrides of both are pointing to the same line number in the [[XMB Layouts]] files
 
*There are 122 .rco files in firmware 4.76, the order of how are stored here the groups of values for every .rco is not clear, some posible options:
**Based in a identifyer from the associated module.srpx
**Based on a list in vsh.self
**Alphabetical order
**Based on a "messed up because suffered lot of changes" script used in the official compilation enviroment for PS3 firmware. In other words, the firmware doesnt cares and doesnt knows about the order and simply loads individual values after reading the position from the .rco file
 
{{custom_render_plugin.rco changelog}}
**It seems the values stored in the [[XMB Layouts]] .txt files for custom_render_plugin.rco never changed (verifyed only in 2.00, 3.55, 4.46, 4.70), below are the real values, taken from  layout_grid_table_1080.txt (for other resolutions the values are different)
***'''scelogo''' plane
****stdOverridePositionX = 400 pixels
****stdOverridePositionY = 0 pixels
****stdOverrideSizeX = 1024 pixels
****stdOverrideSizeY = 64 pixels
***'''ps3logo''' plane
****stdOverrideSizeX = 1200 pixels
****stdOverrideSizeY = 128 pixels
 
==Example==
In firmware 4.76 custom_render_plugin.rco contains 3 '''plane''' [[RCOXML Objects]] using the 21 standard attributes and 2 specific attributes:
*Page object '''page_coldboot''' - is the old/classic coldboot from firmware 1.00 used when the console boots
**Plane object '''scelogo''' - is an image of 1024x64 pixels size. Uses grid pointers
*Page object '''page_coldboot2''' - is the new coldboot introduced in firmware 2.70
**Plane object '''coldboot_ps3logo''' - is a placeholder for the [[coldboot.raf]] animation. Doesnt uses grid pointers
*Page object '''page_gameboot''' - used when a game boots
**Plane object '''ps3logo''' - is an image of 1200x128 pixels size. Uses grid pointers
 
{{Boxcode|title=custom_render_plugin.rco.xml (cropped)|code=<syntaxhighlight lang="xml">
<RcoFile>
<MainTree>
<ObjectTree>
<Page name="page_coldboot" pageMode="0x1110000" pageOnInit="nothing" pageOnCancel="nothing" pageOnContext="nothing" pageOnActivate="nothing">
<Plane name="scelogo" stdPositionX="0" stdPositionY="0" stdPositionZ="0" stdColorScaleR="1" stdColorScaleG="1" stdColorScaleB="1" stdColorScaleA="1" stdSizeX="0" stdSizeY="0" stdSizeZ="0" stdSizeScaleX="1" stdSizeScaleY="1" stdSizeScaleZ="1" stdAnchorPointMode="0x0" stdOnInit="nothing" stdOverridePositionX="0x98020000" stdOverridePositionY="0x99020000" stdOverridePositionZ="0x0" stdOverrideSizeX="0x9a020100" stdOverrideSizeY="0x9b020100" stdOverrideSizeZ="0x100" planeImage="image:tex_scelogo" planeResizeMode="0x0"></Plane>
</Page>
<Page name="page_coldboot2" pageMode="0x1110000" pageOnInit="nothing" pageOnCancel="nothing" pageOnContext="nothing" pageOnActivate="nothing">
<Plane name="coldboot_ps3logo" stdPositionX="0" stdPositionY="0" stdPositionZ="0" stdColorScaleR="1" stdColorScaleG="1" stdColorScaleB="1" stdColorScaleA="1" stdSizeX="0" stdSizeY="0" stdSizeZ="0" stdSizeScaleX="1" stdSizeScaleY="1" stdSizeScaleZ="1" stdAnchorPointMode="0x0" stdOnInit="nothing" stdOverridePositionX="0x0" stdOverridePositionY="0x0" stdOverridePositionZ="0x0" stdOverrideSizeX="0x100" stdOverrideSizeY="0x100" stdOverrideSizeZ="0x100" planeImage="nothing" planeResizeMode="0x0"></Plane>
</Page>
<Page name="page_gameboot" pageMode="0x1110000" pageOnInit="nothing" pageOnCancel="nothing" pageOnContext="nothing" pageOnActivate="nothing">
<Plane name="ps3logo" stdPositionX="0" stdPositionY="0" stdPositionZ="0" stdColorScaleR="1" stdColorScaleG="1" stdColorScaleB="1" stdColorScaleA="1" stdSizeX="0" stdSizeY="0" stdSizeZ="0" stdSizeScaleX="1" stdSizeScaleY="1" stdSizeScaleZ="1" stdAnchorPointMode="0x0" stdOnInit="nothing" stdOverridePositionX="0x0" stdOverridePositionY="0x0" stdOverridePositionZ="0x0" stdOverrideSizeX="0x9c020100" stdOverrideSizeY="0x9d020100" stdOverrideSizeZ="0x100" planeImage="image:tex_ps3logo" planeResizeMode="0x0"></Plane>
</Page>
</ObjectTree>
</MainTree>
</RcoFile>
</syntaxhighlight>}}
 
{{Boxcode|title=This is the same code, using linefeeds and tabs for a better overview of the attributes|code=<syntaxhighlight lang="xml">
<RcoFile>
<MainTree>
<ObjectTree>
<Page name="page_coldboot" pageMode="0x1110000" pageOnInit="nothing" pageOnCancel="nothing" pageOnContext="nothing" pageOnActivate="nothing">
<Plane name="scelogo"
stdPositionX="0" stdPositionY="0" stdPositionZ="0"
stdColorScaleR="1" stdColorScaleG="1" stdColorScaleB="1" stdColorScaleA="1"
stdSizeX="0" stdSizeY="0" stdSizeZ="0"
stdSizeScaleX="1" stdSizeScaleY="1" stdSizeScaleZ="1"
stdAnchorPointMode="0x0"
stdOnInit="nothing"
stdOverridePositionX="0x98020000" stdOverridePositionY="0x99020000" stdOverridePositionZ="0x0"
stdOverrideSizeX="0x9a020100" stdOverrideSizeY="0x9b020100" stdOverrideSizeZ="0x100"
 
planeImage="image:tex_scelogo"
planeResizeMode="0x0"
>
</Plane>
</Page>
<Page name="page_coldboot2" pageMode="0x1110000" pageOnInit="nothing" pageOnCancel="nothing" pageOnContext="nothing" pageOnActivate="nothing">
<Plane name="coldboot_ps3logo"
stdPositionX="0" stdPositionY="0" stdPositionZ="0"
stdColorScaleR="1" stdColorScaleG="1" stdColorScaleB="1" stdColorScaleA="1"
stdSizeX="0" stdSizeY="0" stdSizeZ="0"
stdSizeScaleX="1" stdSizeScaleY="1" stdSizeScaleZ="1"
stdAnchorPointMode="0x0"
stdOnInit="nothing"
stdOverridePositionX="0x0" stdOverridePositionY="0x0" stdOverridePositionZ="0x0"
stdOverrideSizeX="0x100" stdOverrideSizeY="0x100" stdOverrideSizeZ="0x100"
 
planeImage="nothing"
planeResizeMode="0x0"
>
</Plane>
</Page>
<Page name="page_gameboot" pageMode="0x1110000" pageOnInit="nothing" pageOnCancel="nothing" pageOnContext="nothing" pageOnActivate="nothing">
<Plane name="ps3logo"
stdPositionX="0" stdPositionY="0" stdPositionZ="0"
stdColorScaleR="1" stdColorScaleG="1" stdColorScaleB="1" stdColorScaleA="1"
stdSizeX="0" stdSizeY="0" stdSizeZ="0"
stdSizeScaleX="1" stdSizeScaleY="1" stdSizeScaleZ="1"
stdAnchorPointMode="0x0"
stdOnInit="nothing"
stdOverridePositionX="0x0" stdOverridePositionY="0x0" stdOverridePositionZ="0x0"
stdOverrideSizeX="0x9c020100" stdOverrideSizeY="0x9d020100" stdOverrideSizeZ="0x100"
 
planeImage="image:tex_ps3logo"
planeResizeMode="0x0"
>
</Plane>
</Page>
</ObjectTree>
</MainTree>
</RcoFile>
</syntaxhighlight>}}
As a resume:
 
*'''page_coldboot'''
**'''scelogo'''
***stdPositionX="0" stdPositionY="0" stdPositionZ="0" <------------------------------------------------------------------------ positions are empty !
***stdSizeX="0" stdSizeY="0" stdSizeZ="0" <-------------------------------------------------------------------------------------- sizes are empty !
***stdOverridePositionX="0x98020000" stdOverridePositionY="0x99020000" stdOverridePositionZ="0x0" <------- grid & factor pointers, overrides the values of attributes '''stdPositionX''' and '''stdPositionY'''
***stdOverrideSizeX="0x9a020100" stdOverrideSizeY="0x9b020100" stdOverrideSizeZ="0x100" <------------------- grid & factor pointers, overrides the values of attributes '''stdSizeX''' and '''stdSizeY'''
 
*'''page_coldboot2'''
**'''coldboot_ps3logo'''
***stdPositionX="0" stdPositionY="0" stdPositionZ="0" <------------------------------------------------------------------------ positions are empty !
***stdSizeX="0" stdSizeY="0" stdSizeZ="0" <-------------------------------------------------------------------------------------- sizes are empty !
***stdOverridePositionX="0x0" stdOverridePositionY="0x0" stdOverridePositionZ="0x0" <------------------------------ override positions are empty !
***stdOverrideSizeX="0x100" stdOverrideSizeY="0x100" stdOverrideSizeZ="0x100" <----------------------------------- override sizes are empty !
 
*'''page_gameboot'''
**'''ps3logo'''
***stdPositionX="0" stdPositionY="0" stdPositionZ="0" <------------------------------------------------------------------------ positions are empty !
***stdSizeX="0" stdSizeY="0" stdSizeZ="0" <-------------------------------------------------------------------------------------- sizes are empty !
***stdOverridePositionX="0x0" stdOverridePositionY="0x0" stdOverridePositionZ="0x0" <------------------------------ override positions are empty !
***stdOverrideSizeX="0x9c020100" stdOverrideSizeY="0x9d020100" stdOverrideSizeZ="0x100" <------------------- grid & factor pointers, overrides the values of attributes '''stdSizeX''' and '''stdSizeY'''
 
----
Before calculating the grid pointers is needed to convert the values manually to the correct format. Every one of the attributes used for grid pointers is composed by 2 values, the first one is the grid pointer (first 2 bytes), and the second is the factor pointer (last 2 bytes). Is needed to cut the attribute at half and swap the bytes
 
*'''scelogo''' grid pointers
**position
***stdOverridePositionX="0x98020000" <----------- this is 0x0'''298''' (grid pointer) and 0x0000 (factor pointer to line 1)
***stdOverridePositionY="0x99020000" <----------- this is 0x0'''299''' (grid pointer) and 0x0000 (factor pointer to line 1)
***stdOverridePositionZ="0x0" <---------------------- this is 0x0000 (grid pointer to line 1) and 0x0000 (factor pointer to line 1)
**size
***stdOverrideSizeX="0x9a020100" <----------- this is 0x0'''29a''' (grid pointer) and 0x000'''1''' (factor pointer to line 2)
***stdOverrideSizeY="0x9b020100" <----------- this is 0x0'''29b''' (grid pointer) and 0x000'''1''' (factor pointer to line 2)
***stdOverrideSizeZ="0x100" <------------------- this is 0x0000 (grid pointer to line 1) and 0x000'''1''' (factor pointer to line 2)
 
*'''ps3logo''' grid pointers
**size
***stdOverrideSizeX="0x9c020100" <----------- this is 0x0'''29c''' (grid pointer) and 0x000'''1''' (factor pointer to line 2)
***stdOverrideSizeY="0x9d020100" <----------- this is 0x0'''29d''' (grid pointer) and 0x000'''1''' (factor pointer to line 2)
***stdOverrideSizeZ="0x100" <------------------- this is 0x0000 (grid pointer to line 1) and 0x000'''1''' (factor pointer to line 2)
 
----
Now to get the correct value from the grid pointers is needed to look at the [[XMB Layouts]] files '''from the same firmware !!!'''
 
The pointer values needs to be converted to decimal, and added a +1 (in other words... value 0 represents the first line of the .txt file)


*'''scelogo''' grid pointers
http://manuals.playstation.net/document/en/ps3/current/imgs/videooutput004.jpg
**position
***stdOverridePositionX="0x98020000" <----------- the first 2 bytes 0x0'''298''' swapped and converted to decimal = 664 + 1 = '''line 665''' of [[XMB Layouts]] files
***stdOverridePositionY="0x99020000" <----------- the first 2 bytes 0x0'''299''' swapped and converted to decimal = 665 + 1 = '''line 666''' of [[XMB Layouts]] files
**size
***stdOverrideSizeX="0x9a020100" <----------- the first 2 bytes 0x0'''29a''' swapped and converted to decimal = 666 + 1 = '''line 667''' of [[XMB Layouts]] files
***stdOverrideSizeY="0x9b020100" <----------- the first 2 bytes 0x0'''29b''' swapped and converted to decimal = 667 + 1 = '''line 668''' of [[XMB Layouts]] files


*'''ps3logo''' grid pointers
==Speculation==
**size
***stdOverrideSizeX="0x9c020100" <----------- the first 2 bytes 0x0'''29c''' swapped and converted to decimal = 668 + 1 = '''line 669''' of [[XMB Layouts]] files
***stdOverrideSizeY="0x9d020100" <----------- the first 2 bytes 0x0'''29d''' swapped and converted to decimal = 669 + 1 = '''line 670''' of [[XMB Layouts]] files


{| class="wikitable" style="font-size:small;"
===scalation factors?===
|+ [[XMB]] Layout grid tables (from 4.76 firmware)
Others values are decimal (scalation factors?), e.g:
! Line number !! layout_grid_table_272.txt !! layout_grid_table_480.txt !! layout_grid_table_720.txt !! layout_grid_table_1080.txt
The first 8 lines of '''layout_factor_table_720.txt'''
|-
1
! 665
0
| 177 || 133 || 266 || 400
0
|-
1280  <--- width
! 666
720    <--- heigth
| 0 || 0 || 0 || 0
0.6667 <--- scalation factor ?
|-
0.6667 <--- scalation factor ?
! 667
0.6923 <--- scalation factor ?
| 455 || 455 || 682 || 1024
|-
! 668
| 28 || 28 || 42 || 64
|-
! 669
| 533 || 533 || 800 || 1200
|-
! 670
| 56 || 56 || 85 || 128
|-
|}


Now replacing the values from layout_grid_table_1080.txt to see how are displayed in a HD screen:
===Other images ?===


*'''page_coldboot'''
In case of an standard image usually appears the width and the heigth in 2 consecutive lines, e.g:
**'''scelogo''' for 1080p resolution
In line 77 of: '''layout_factor_table_1080.txt'''
***position (displaced 400 pixels right from the center of the screen)
486
****X=400
405
****Y=0
320
****Z=0
176
***size (the image tex_scelogo.gim is 1024x64 pixels)
...320x176 is the size of ICON0.PNG and ICON1.PAM
****X=1024
...486x405 is the size of ICON2.PNG and ICON3.SWF (used in PS3_EXTRA disc structure)
****Y=64
...Is the only place inside this "layout tables" files where appears a 320 and in the next line a 176 consecutivelly
****Z=0


*'''page_gameboot'''
Some of the images are defined with 4 values, where the last one (unk2) is negative (width, heigth, unk1, unk2), e.g:
**'''ps3logo''' for 1080p resolution
In line 2210 of '''layout_grid_table_1080.txt'''
***position (center of the screen)
1000
****X=0
560
****Y=0
290
****Z=0
-157
***size (the image tex_ps3logo.gim is 1200x128 pixels)
310
****X=1200
250
****Y=128
115
****Z=0
-69
... 1000x560 is the size of PIC0.PNG... the value 290 (unk1) and -157 (unk2) seems to be associated with this image
... 310x250 is the size of PIC2.PNG... the value 115 (unk1) and -69 (unk2) seems to be associated with this image


{| class="wikitable"
===Notes===
|-
*Some of the items in XMB are defined by a central point (not by an square composed by width and heigth where the image must fit)... like the main category icons of the XMB that uses a central point to scalate the icon proportionally in all directions when the cursor is focused on his column. Actually this icons are originally 128x128 pixels, but when displayed in XMB are reduced to half his size (64x64 or so), and when focused are displayed a bit bigger (100x100 or so)
| [[File:Page coldboot 1080.png|635px|thumb|left|coldboot]]
*The most easy values to recognize are the resolution of the screen, always at top of the list (in the first lines)
|-
*Sizes and positions of main XMB category icons should be at top of the lists because are something generic and the rest of XMB items is built around them
| {{#ev:youtube|tgPXlMbchFM}}
*When making tests with this files keep in mind the safest ones are the modes your TV doesnt uses by default and/or remoteplay layouts because after a reboot the PS3 doesnt loads them (only loaded when enabling remote play from XMB, not at boot time)... also keep in mind that the other layouts should be common with the "recovery menu" and "service mode" display modes... and you can change your TV resolution in the options in XMB settings column, then return to default resolution with a button combo at boot time
|-
| [[File:Page gameboot 1080.png|635px|thumb|left|gameboot]]
|}


{{File Formats}}<noinclude>[[Category:Main]]</noinclude>
{{File Formats}}<noinclude>[[Category:Main]]</noinclude>
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)