Talk:RCOXML Objects

From PS3 Developer wiki
Revision as of 16:58, 21 February 2023 by Sandungas (talk | contribs) (page reordered)
Jump to navigation Jump to search

WidgetType

See the "paf" VSH Exports, psx-place talk, and paf.hpp

The goal of this table is to replace the unnoficial rcomage names by the official codenames. The official codenames are used in the VSH export functions (in text format) but inside the RCO internal file structure this names in text format doesnt exists, instead of text strings the RCO structure only stores the ID in hexadecimal format based on the RCO TOC entry types
Rcomage uses a file named tagmap.ini intended to convert the ID (hex) value by the name (text string) when is extracting the RCO contents, and back from text to hex when compiling an RCO

A bit of background story... rcomage was made by zinga burga for PSP, at that time he had to figure the names by looking at other related text strings, he used the exact codename only in few of them, and he invented other unnofficial names based on educated guesses, but there are many innacurate names and a few unknowns
At the initial steps of rcomage development zinga burga realized that it was posible to extract the info inside the RCO structure as an XML format (this is something sony made on purpose), but inside the RCO files there is not any XML. This is when zinga burga coined the term "RCOXML Objects" because rcomage is representing the RCO contents in XML format (and this wiki respected the term), but in the names of the VSH export function are named WidgetType, in other words, we could say the table below is a list of Widgets ordered by his Type
At some point kakaroto and geohot updated rcomage source code to add support for PS3 (they had to change the endianess and added definitions for a few RCOXML objects only supported by PS3 that was breaking the output) but maybe there are new objects specific for PS3 over ID 0x81F. Anyway, so far rcomage supports up to ID 0x81F (32 objects)

  • Notes
    • It seems the items (XItem 0x80C, MItem 0x80A, LItem 0x814, IItem 0x818) doesnt have VSH exports because are terminal objects located at bottom of the hierarchy (are always the children of a parent "list")
    • The codename "Prim" seems to be inherited from PSX->PSP->PS3 and seems to be a geometric primitive. In the PSX XMB the options availables for it was: type="rect", type="line", type="outline". It seems to be used to draw lines, frames, etc...
Type+ID Name paf VSH Exports Notes
RCOmage Official NID Sample
Supported by PSP icon and PS3 icon
0x800 ObjectTree Scene ? 0x41BBFE5E ? paf::PhScene::WidgetType(void) ? Doubtful, it seems to be either "Scene" or "Widget"
0x801 Page Widget ? 0x546B3D02 ? paf::PhWidget::WidgetType(void) ? Doubtful, it seems to be either "Scene" or "Widget"
0x802 Plane Plane 0x10DEDCC7 paf::PhPlane::WidgetType(void)
0x803 Button Button 0x24A5BD6B paf::PhButton::WidgetType(void)
0x804 XMenu XmBar 0x703117AD paf::PhXmBar::WidgetType(void) The parent of XmList 0x806
0x805 XMList XmItem ? 0xC84FD77B ? paf::PhXmItem::WidgetType(void) ? The children of XmList 0x806
0x806 XList XmList ? 0x4FF7B8A9 ? paf::PhXmList::WidgetType(void) ? The children of XmBar 0x804 and the parent of XmItem 0x805
0x807 Progress Progress 0xE801C345 paf::PhProgress::WidgetType(void)
0x808 Scroll Scroll 0x009207F4 paf::PhScroll::WidgetType(void)
0x809 MList MenuList 0xA98865F8 paf::PhMenuList::WidgetType(void) The parent of MenuItem 0x80A
0x80A MItem MenuItem ? ? ? The children of MenuList 0x809
0x80B ObjUnknown0xB ? ? ? The parent of XItem 0x80C ?
0x80C XItem ? ? ? The children of ObjUnknown0xB 0x80B ?
0x80D Text Text 0xB7DFCE90 paf::PhText::WidgetType(void)
0x80E ModelObject Model ? ? ? This is intended to load a (3D model) .GMO file for the PSP wave
0x80F Spin Spin ? ? ? In the VSH exports page there are some mentioning "PhSpin" but is missing the generic paf::PhSpin::WidgetType(void)
0x810 Action NumSpin ? 0x59A11C82 ? paf::PhNumSpin::WidgetType(void) ?
0x811 ItemSpin ItemSpin ? 0x4C36ABBB ? paf::PhItemSpin::WidgetType(void) ?
0x812 Group PlaneDiv ? 0xE36C18F5 ? paf::PhPlaneDiv::WidgetType(void) ?
0x813 LList List ? 0xD64EDE7C ? paf::PhList::WidgetType(void) ? The parent of Item 0x814
0x814 LItem Item ? ? ? The children of List 0x813
0x815 Edit IPAddr 0x3806365F paf::PhIPAddr::WidgetType(void)
0x816 Clock Clock 0x545D47A2 paf::PhClock::WidgetType(void)
0x817 IList InfoList 0xF7630798 paf::PhInfoList::WidgetType(void) The parent of InfoItem 0x818
0x818 IItem InfoItem ? ? ? The children of InfoList 0x817
0x819 Icon ? ? ? Terminal object, same specific attributes than all the other "items". The difference with standard "items" is "icon" have standard attributes (but the standard "items" doesnt)
0x81A UButton ? ? ? This is an improved version of Button 0x803
Supported by PS3 icon only
0x81B ObjUnknown0x1B ? ? ?
0x81C CheckBoxGroup CheckBoxList 0x90F4F801 paf::PhCheckBoxList::WidgetType(void) The parent of CheckBox 0x81D
0x81D CheckboxItem CheckBox 0xBF66BF2D paf::PhCheckBox::WidgetType(void) The children of CheckBoxList 0x81C
0x81E Meter LevelMeter 0xC88CA4B2 paf::PhLevelMeter::WidgetType(void)
0x81F EditBox LabelText 0xDDD4ACF6 paf::PhLabelText::WidgetType(void) This is an improved version of Text 0x80D
Color legend:
Green The name in rcomage matches with the official codename
Orange The name in rcomage doesnt matches with the official codename, but has been identifyed (this are the easy ones)
Red The name in rcomage doesnt matches with the official codename, and is doubtfull which is the correct name
  • Other VSH export candidates:
    • paf::PhLabelPrim::WidgetType(void)
    • paf::PhLabelPrimDiv::PhLabelPrimDiv(paf::PhWidget *, paf::PhAppear *)
    • paf::PhCamera::PhCamera(paf::PhWidget *, paf::PhAppear *)
  • Spins confussion
    • The object named ItemSpin by rcomage has been found in official firmware using event names with the word "NumSpin":
      • event:native:/OnFocusLeftNumSpinWizardEventHandler
      • event:native:/OnFocusRightNumSpinWizardEventHandler
    • The object named Spin by rcomage has been found in official firmware using event names with the word "ispin" (a short form of "ItemSpin"):
      • object2:lftv_page212_group000_ispin000 <--- this is loading another "object" so the name ispin belongs to the other object
      • object2:lftv_page212_group000_ispin001 <--- this is loading another "object" so the name ispin belongs to the other object
    • The official codenames are ItemSpin and NumSpin but it seems in rcomage are swapped. Additionally there is another codename for Spin that is a bit confusing by now
    • In the VSH exports page there are 3 exports that returns names related with spins (but one of the returned strings seems to be wrong)
      • const char* paf_4C36ABBB() <-- returns "PhItemSpin"
      • const char* paf_CA9160F6() <-- returns "PhNumSpin"
      • const char* paf_59A11C82() <-- returns "PhNumSpin"
  • Other related VSH exports
    • PAF_Resource_DOMGetNodeChildByID
    • PAF_Resource_DOMGetNodeChildByPos
    • PAF_Resource_DOMGetNodeData
    • PAF_Resource_DOMGetNodeFirstChild
    • PAF_Resource_DOMGetNodeID
    • PAF_Resource_DOMGetNodeNext
    • PAF_Resource_DOMGetNodeType
    • PAF_Resource_GetPageNodeByID
    • PAF_Resource_GetWidgetNodeByID
    • PAF_Resource_ResolveRefNode
    • PAF_Resource_ResolveRefString
    • PAF_Resource_ResolveRefWString

Menu lists and menu items associations

There are 6 groups of list/item associated with each other that was given consecutive IDs in hexadecimal. The fact that was given consecutive IDs means each group of list/item was implemented at the same time because requires each other (an "item" requires a parent "list", and a "list" without children "items" doesnt makes sense)

  • The "items" doesnt have the 21 standard attributes, only have 3 specific attributes (usually a ref/text/image). This is an easy way to identify them, by the abscense of the standard attributes
  • The "lists" does have the 21 standard attributes, followed by a variable number of specific attributes. All the lists (except 0x804 and 0x806) seems to use specific override attributes intended to adjust them dinamically for the different screen resolutions supported by PS3, see: XMB Layouts.
  • The consecutive ID's is a handy way to identify them, it means there is an "item" ID next to each "list" ID (or the other way around, there is a "list" ID next to each "item" ID)
Type Name Displayed as Notes
Suggested names
for Wiki
In rcomage In official RCOXML code In official VSH Exports
0x804 XmBar ? XMenu name="xmenu" XmBar XMB Main Menu, horizontal list placeholder Main XMB
0x805 XmItem ? XMList name="list_sysconf" XmItem ? XMB Main Menu, horizontal list item
0x806 XmList ? XList name="xlist_video_config" XmList ? XMB Main Menu, vertical list placeholder
0x809 MenuList MList name="mlist_select_update_method" MenuList Context Menu, vertical list placeholder Menu when pressing triangle
at right side of the screen
0x80A MenuItem MItem name="mitem_select_network" Context Menu, vertical list item
0x80B UnkList ? ObjUnknown0xB 0x80B is the "List"
0x80C is the "Item"
0x80C UnkItem ? XItem name="item_xlist_video_config_volume"
0x813 List LList name="list_edit_apcnf7" List Editable Menu, horizontal list placeholder Like in network settings
0x814 Item LItem name="litem_edit_apcnf7_0" Editable Menu, horizontal list item
0x817 InfoList IList name="ilist_ms_info" InfoList Information Menu, vertical list placeholder Like in audio file info
0x818 InfoItem IItem name="item_ms_info_size" Information Menu, vertical list item
0x81C CheckList CheckboxGroup name="checkbox_list_npsignin" CheckBoxList Checkbox Menu, horizontal list placeholder Like in poweroff screen
0x81D CheckItem CheckboxItem name="checkbox_item_select_auto_power_off" CheckBox ? Checkbox Menu, horizontal list item

ObjUnknown0xB

ObjUnknown0xB (ID 0x80B) seems to be a list (the parent of ID 0x80C). If this speculation is true it means it should start with the 21 standard attributes followed by an unknown number of specific attributes. Those specific attributes should be similar than the other "list" objects. As example, the attribute number 22 (in other words... the first specific attribute) could be a counter of its children "items", and the last attributes should be events, as example: <Name attribute="event:native:/OnFocusIn"/>

Rcomage unknown object attributes

At the time of documenting the RCO format for wiki it was posible to identify some/lot of unknown attributes, in the link there are a few of them listed as dirty notes (later was identifyed some more that are not included in the link). At this point there is no need for that dirty notes because the new names of the identifyed attributes was used in the tables in wiki, the dirty notes are just kept to have a record of the changes, and liked here because are very related with this page (needs to be cleaned up together with this talk page)

Objects using overrides in the "specific" attributes

The "standard" attributes contains 6 overrides and most objects uses the "standard" attributes, but additionally to this ones some of the objects (seems to) use more overrides in the "specific" attributes

  • Lists
    • MList (3 ?, override size XYZ ?)
    • LList (2 ?, override size XY ?)
    • IList (1 ?, override size X ?)
    • CheckboxGroup (3 ?, override size XYZ ?)... this object is an expanded/repurposed version of Mlist intended for PS3 only (not supported in PSP), the 3 override attributes are the same than Mlist
  • Text
    • Text (3 ?, override size XYZ ?)
    • EditBox (3 ?, override size XYZ ?)... this object is an expanded/repurposed version of Text intended for PS3 only (not supported in PSP), the 3 override attributes are the same than Text
  • Others
    • Meter (1 ?, override size X ?)

Some textures using attribute names

The names of some images indicates the attribute names of some RCOXML objects

<Image name="tex_default_text_field" src="Images\tex_default_text_field.png" format="gim" compression="zlib" unknownByte="0" />
<Image name="tex_default_text_focus" src="Images\tex_default_text_focus.png" format="gim" compression="zlib" unknownByte="0" />
<Image name="tex_default_text_field_focus" src="Images\tex_default_text_field_focus.png" format="gim" compression="zlib" unknownByte="0" />
<Image name="tex_default_progress_base" src="Images\tex_default_progress_base.png" format="gim" compression="zlib" unknownByte="0" />
<Image name="tex_default_progress_base_shadow" src="Images\tex_default_progress_base_shadow.png" format="gim" compression="zlib" unknownByte="0" />
<Image name="tex_default_progress_slider" src="Images\tex_default_progress_slider.png" format="gim" compression="zlib" unknownByte="0" />
<Image name="tex_default_scroll_base" src="Images\tex_default_scroll_base.png" format="gim" compression="zlib" unknownByte="0" />
<Image name="tex_default_scroll_base_shadow" src="Images\tex_default_scroll_base_shadow.png" format="gim" compression="zlib" unknownByte="0" />
<Image name="tex_default_scroll_slider" src="Images\tex_default_scroll_slider.png" format="gim" compression="zlib" unknownByte="0" />
<Image name="tex_default_scroll_arrow_up" src="Images\tex_default_scroll_arrow_up.png" format="gim" compression="zlib" unknownByte="0" />
<Image name="tex_default_scroll_arrow_up_shadow" src="Images\tex_default_scroll_arrow_up_shadow.png" format="gim" compression="zlib" unknownByte="0" />
<Image name="tex_default_scroll_arrow_down" src="Images\tex_default_scroll_arrow_down.png" format="gim" compression="zlib" unknownByte="0" />
<Image name="tex_default_scroll_arrow_down_shadow" src="Images\tex_default_scroll_arrow_down_shadow.png" format="gim" compression="zlib" unknownByte="0" />
<Image name="tex_default_spin_arrow_up" src="Images\tex_default_spin_arrow_up.png" format="gim" compression="zlib" unknownByte="0" />
<Image name="tex_default_spin_arrow_up_shadow" src="Images\tex_default_spin_arrow_up_shadow.png" format="gim" compression="zlib" unknownByte="0" />
<Image name="tex_default_spin_arrow_down" src="Images\tex_default_spin_arrow_down.png" format="gim" compression="zlib" unknownByte="0" />
<Image name="tex_default_spin_arrow_down_shadow" src="Images\tex_default_spin_arrow_down_shadow.png" format="gim" compression="zlib" unknownByte="0" />
<Image name="tex_default_check" src="Images\tex_default_check.png" format="gim" compression="zlib" unknownByte="0" />
<Image name="tex_default_check_shadow" src="Images\tex_default_check_shadow.png" format="gim" compression="zlib" unknownByte="0" />
<Image name="tex_default_lvmeter_on" src="Images\tex_default_lvmeter_on.png" format="gim" compression="zlib" unknownByte="0" />
<Image name="tex_default_lvmeter_off" src="Images\tex_default_lvmeter_off.png" format="gim" compression="zlib" unknownByte="0" />
<Image name="tex_default_lvmeter_focus" src="Images\tex_default_lvmeter_focus.png" format="gim" compression="zlib" unknownByte="0" />
<Image name="tex_default_lvmeter_bg" src="Images\tex_default_lvmeter_bg.png" format="gim" compression="zlib" unknownByte="0" />

anchorMode

Rcomage has some problems with this attribute from PS3 RCOs, it manages the value as 4 bytes length but in the internal RCO file structure is divided in 2 chunks of 2 bytes each. The anchor mode is specifyed by the first byte of the second chunk, is unknown why sony "reserved" 2 bytes for the first chunk (first chunk is always filled with zeroes). All this is a bit confusing and what im saying could not be completly accurate because the different endianess in between PSP and PS3 and what RCOmage does internally. RCOmage allows to choose a "data type" for every attribute by editing the file objectattribdef-ps3.ini. There is no way to extract the value accuratelly so the alternatives are to set it as "int", or you can set it to "unk" instead, this way it will be managed as raw data (no conversion applyed so you can see the real value when the info is extracted to XML)

  • Examples:
    • Extracted as "int"
      • anchorMode="0x320000"
    • Extracted as "unk"
      • anchorMode="0x3200"

Lists ItemNum

Some of the "list" objects have an attribute (always located at the first position in the group of specific attributes) that indicates how many children "items" objects there are. Rcomage (and this wiki page) names this attribute "ItemsCount", but it seems the codename is "ItemNum", this "list" objects seems to use it:

  • paf::PhInfoList::SetItemNum(int)
  • paf::PhList::SetItemNum(int)
  • paf::PhXmList::SetItemNum(int)
  • paf::PhXmBar::SetItemNum(int) doesnt exists
  • paf::PhMenuList::SetItemNum(int) doesnt exists
  • paf::PhCheckBoxList::SetItemNum(int) doesnt exists
  • paf::PhLabelPrim::SetItemNum(int) doesnt exists

Events notes

  • All the attribute event names in rcomage and here in wiki contains the characters On before the event name to indicate that is an event (it helps when you are reading the xml code generated by rcomage), and because some official event strings found in OFW uses it too, but the real codenames of the events doesnt seems to have that On (the real codename is what goes at the right of the "On"). As example: the vsh export paf::PhWidget::HandleFocusInEvent(paf::PhEvent *) is related with the attribute OnFocusIn ...and... paf::PhWidget::HandleFocusOutEvent(paf::PhEvent *) with OnFocusOut
  • OnScrollIn and OnScrollOut are used in the "list" objects, the "In" and "Out" represents to move the cursor one item in the "list". The confusing detail is the "lists" can be horizontal (along X axis) or vertical (along Y axis). So it seems in a horizontal list (such the main XmBar) the "In/Out" are "Right/Left", and in a vertical list the "In/Out" should be "Down/Up" (this is just a theory based on the existence of vsh exports: paf::PhXmBar::ScrollRight(float, paf::PhEvent *) ...and... paf::PhXmBar::ScrollLeft(float, paf::PhEvent *), but has not been verifyed)

Links, etc...

Suggestions