RCOXML Texts: Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
(Created page with "=Description= The texts inside .rco files are indexed in the embedded '''RCOXML''' code of the .rco container under the XML element '''TextTree'''. See Resource Container (R...")
 
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Description=
=Description=
The texts inside .rco files are indexed in the embedded '''RCOXML''' code of the .rco container under the XML element '''TextTree'''. See [[Resource Container (RCO)]] and [[RCOXML Structure]]
The texts inside .rco files are indexed in the embedded '''RCOXML''' code of the .rco container under the XML element '''TextTree'''. See [[Resource Container (RCO)]] and [[RCOXML Coding]]


All the texts inside .rco has a localized file for every one of the [[languages]] supported by [[XMB]]. The localized file contains all the translated text strings
All the texts inside .rco has a localized file for every one of the [[languages]] supported by [[XMB]]. The localized file contains all the translated text strings
{{RCOXML contents PS3}}
=Text=
"TextTree" could be renamed to LanguageTree, is more intuitive, the point is every entry here is the "parent" of several string texts, but the entry itself is not a text (is the parent of a group of texts), so is better to use a name more abstract like "LanguageTree"
For a [[Languages|Language]] first are specified the '''language_id''' and the number of "children" text strings
{| class="wikitable"
|-
! Offset !! Length !! Name !! Example !! Notes
|-
| 0x00 || 0x02 || '''language_id''' ||  || 0x00=Japanese<br>0x01=English (United States)<br>0x02=French<br>0x03=Spanish (Spain)<br>0x04=German<br>0x05=Italian<br>0x06=Dutch<br>0x07=Portuguese (Portugal)<br>0x08=Russian<br>0x09=Korean<br>0x0A=Chinese (Traditional)<br>0x0B=Chinese (Simplified)<br>0x0C=Finnish<br>0x0D=Swedish<br>0x0E=Danish<br>0x0F=Norwegian<br>0x10=Polish<br>0x11=Portuguese (Brazil)<br>0x12=English (United Kingdom)<br>0x13=Turkish
|-
| 0x02 || 0x02 || '''character_encoding''' ||  || Works as a replacement of the [https://en.wikipedia.org/wiki/Byte_order_mark BOM]<br>0x00=[https://en.wikipedia.org/wiki/UTF-8 UTF8]<br>0x01=[https://en.wikipedia.org/wiki/UTF-16 UTF16]<br>0x02=[https://en.wikipedia.org/wiki/UTF-32 UTF32]
|-
| 0x04 || 0x04 || '''strings_number''' ||  || number of text strings for this '''language_id'''
|}
Now for every '''strings_number''' are repeated 12 bytes to define every string that are references to other tables
{| class="wikitable"
|-
! Offset !! Length !! Name !! Example !! Notes
|-
| 0x00 || 0x04 || '''label_offset''' ||  || Offset to label, relative of the label table
|-
| 0x04 || 0x04 || '''string_length''' ||  || Length of the text
|-
| 0x08 || 0x04 || '''string_offset''' ||  || Offset of the text, relative to the text data start address
|}
=Language Modifications=
All modifications made to the '''<language>.xml''' files extracted from [[Resource_Container_(RCO) | RCO]]'s with [[rcomage]] belongs to this category
==How to add custom texts==
Rebug package manager example goes here
==Photosensitive epilepsy text removal/replacement==
<div style="float:right">[[File:Epilepsy-warning.jpg|210px|thumb|right|Epilepsy Warning screen]]</div>
Text is located in all <language.xml> files inside [[sysconf_plugin]].rco
It can be blanked (replaced by nothing), or replaced by any other custom text and ASCII art
{{clear}}
{{Boxcode|code=<syntaxhighlight lang="xml">
<?xml version="1.0" encoding="utf-8"?>
<!-- This XML was generated by Rcomage v1.1.2 -->
<TextLang>
.
..
...
<Text name="msg_health_warning_start_scee">PHOTOSENSITIVE EPILEPSY
IF YOU HAVE A HISTORY OF EPILEPSY OR SEIZURES, CONSULT A DOCTOR BEFORE USE. CERTAIN PATTERNS MAY TRIGGER SEIZURES WITH NO PRIOR HISTORY. BEFORE USING THIS PRODUCT, CAREFULLY READ THE INSTRUCTION MANUAL.</Text>
...
..
.
</TextLang>
</syntaxhighlight>}}
*Notes
**To make accurate texts that fits to the screen is needed to know the number of characters in width, and number of lines in height (for every TV resolution mode ?)
**Some experiments with ASCII art http://www.ps3hax.net/2013/04/tutorial-how-to-edit-ps3-epilepsy-warning-on-cfw/
**VSH.self is responsible for loading the epilepsy warning screen. To disable it completely use [[Patches#disable_epilepsy_message|this patch]]
==Adding custom language packs==
*[[PS3MFW_Builder#PSheb_project|PS3MFW_Builder::PSheb_project]]. Info about the PSheb project needs to be improved, splitted and moved to several wiki pages:
**Info about .xml modifications moved to [[Languages]] page
**Info about .tcl "language pack" task stays in [[PS3MFW Builder]] page
**Info about replacing or adding characters/glyphs in the official .ttf fonts moved to [[XMB Fonts]] page
==etc...==


{{File Formats}}
{{File Formats}}
<noinclude>[[Category:Main]]</noinclude>
<noinclude>[[Category:Main]]</noinclude>

Latest revision as of 17:00, 11 February 2022

Description[edit | edit source]

The texts inside .rco files are indexed in the embedded RCOXML code of the .rco container under the XML element TextTree. See Resource Container (RCO) and RCOXML Coding

All the texts inside .rco has a localized file for every one of the languages supported by XMB. The localized file contains all the translated text strings

RCOXML contents PS3 firmware 4.76 (122 .rco files)  · 

Text[edit | edit source]

"TextTree" could be renamed to LanguageTree, is more intuitive, the point is every entry here is the "parent" of several string texts, but the entry itself is not a text (is the parent of a group of texts), so is better to use a name more abstract like "LanguageTree"

For a Language first are specified the language_id and the number of "children" text strings

Offset Length Name Example Notes
0x00 0x02 language_id 0x00=Japanese
0x01=English (United States)
0x02=French
0x03=Spanish (Spain)
0x04=German
0x05=Italian
0x06=Dutch
0x07=Portuguese (Portugal)
0x08=Russian
0x09=Korean
0x0A=Chinese (Traditional)
0x0B=Chinese (Simplified)
0x0C=Finnish
0x0D=Swedish
0x0E=Danish
0x0F=Norwegian
0x10=Polish
0x11=Portuguese (Brazil)
0x12=English (United Kingdom)
0x13=Turkish
0x02 0x02 character_encoding Works as a replacement of the BOM
0x00=UTF8
0x01=UTF16
0x02=UTF32
0x04 0x04 strings_number number of text strings for this language_id

Now for every strings_number are repeated 12 bytes to define every string that are references to other tables

Offset Length Name Example Notes
0x00 0x04 label_offset Offset to label, relative of the label table
0x04 0x04 string_length Length of the text
0x08 0x04 string_offset Offset of the text, relative to the text data start address

Language Modifications[edit | edit source]

All modifications made to the <language>.xml files extracted from RCO's with rcomage belongs to this category

How to add custom texts[edit | edit source]

Rebug package manager example goes here

Photosensitive epilepsy text removal/replacement[edit | edit source]

Epilepsy Warning screen

Text is located in all <language.xml> files inside sysconf_plugin.rco

It can be blanked (replaced by nothing), or replaced by any other custom text and ASCII art

<?xml version="1.0" encoding="utf-8"?>
<!-- This XML was generated by Rcomage v1.1.2 -->
<TextLang>
	.
	..
	...
	<Text name="msg_health_warning_start_scee">PHOTOSENSITIVE EPILEPSY
IF YOU HAVE A HISTORY OF EPILEPSY OR SEIZURES, CONSULT A DOCTOR BEFORE USE. CERTAIN PATTERNS MAY TRIGGER SEIZURES WITH NO PRIOR HISTORY. BEFORE USING THIS PRODUCT, CAREFULLY READ THE INSTRUCTION MANUAL.</Text>
	...
	..
	.
</TextLang>

Adding custom language packs[edit | edit source]

  • PS3MFW_Builder::PSheb_project. Info about the PSheb project needs to be improved, splitted and moved to several wiki pages:
    • Info about .xml modifications moved to Languages page
    • Info about .tcl "language pack" task stays in PS3MFW Builder page
    • Info about replacing or adding characters/glyphs in the official .ttf fonts moved to XMB Fonts page

etc...[edit | edit source]