Editing SILKPADD
Jump to navigation
Jump to search
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: | ||
==Structure== | ==Structure== | ||
Line 81: | Line 11: | ||
! Offset !! Length !! Example !! Name !! Notes | ! Offset !! Length !! Example !! Name !! Notes | ||
|- | |- | ||
| 0x00 || 0x04 || | | 0x00 || 0x04 || 53 49 4C 4B || '''silk_signature''' || rowspan="2" | By now this 2 are represented in wiki separated just incase the format allows for other variants, like SILKFLAT, SILKCRAP, or any other names, but maybe the 8 bytes are processed together | ||
|- | |- | ||
| 0x04 || 0x04 || | | 0x04 || 0x04 || 50 41 44 44 || '''padd_signature''' | ||
|- | |- | ||
| 0x08 || 0x02 || 00 00 || | | 0x08 || 0x02 || 00 00 || ''unknown'' || Always zeroes | ||
|- | |- | ||
| 0x0A || 0x02 || 0C 00 || ''' | | 0x0A || 0x02 || 0C 00 || '''entry_amount''' || Number of entries in the file (in little endian) | ||
|- | |- | ||
| 0x0C || 0x04 || 00 00 00 00 || | | 0x0C || 0x04 || 00 00 00 00 || ''padding'' ? || Always zeroes | ||
|} | |} | ||
===Index table=== | ===Index table=== | ||
At offset 0x10 starts the index table, every entry has 0xC byes. All values in the table are in little endian. There is no gap or padding at the end of this index table | |||
Example of the first entry in | Example of the first entry in CEHtmlApi.bin | ||
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | ||
Line 104: | Line 34: | ||
! Offset !! Length !! Example !! Name !! Notes | ! Offset !! Length !! Example !! Name !! Notes | ||
|- | |- | ||
| 0x00 || 0x04 || B9 0B 00 00 || ''' | | 0x00 || 0x04 || B9 0B 00 00 || '''entry_id''' || An unique ID for the entry, used by the web browser to identify and to access the data | ||
|- | |- | ||
| 0x04 || 0x04 || A0 00 00 00 || '''data_offset''' || Absolute offset of the data ( | | 0x04 || 0x04 || A0 00 00 00 || '''data_offset''' || Absolute offset of the data (either a string or a file) | ||
|- | |- | ||
| 0x08 || 0x04 || 9B 00 00 00 || ''' | | 0x08 || 0x04 || 9B 00 00 00 || '''data_lenght''' || Size of the data | ||
|} | |} | ||
===Data table=== | ===Data table=== | ||
At this point is unknown if the PS3 parses every one of the datas in a specific way based on his type because the IDs of them are hardcoded in the .sprx (so the sprx knows what to do with | At this point is unknown if the PS3 parses every one of the datas in a specific way based on his type because the IDs of them are hardcoded in the .sprx (so the sprx knows well what to do with them defore reading them), or the data is identifyed by reading the first bytes. Anyway, to manage the datas in PC is needed to read the first bytes because in PC we are not using a database with all the IDs (so we dont know what to do with them before reading them). This identification method is what is explained here in wiki | ||
This identification method | |||
====Data types==== | ====Data types==== | ||
All data entries starts with 4 bytes | All data entries starts with 4 bytes that indicates the length of the text string that comes inmediatly after, so the first bytes that needs to be processed are the 4 bytes + the lenght indicated by that 4 bytes | ||
=====Text string===== | =====Text string===== | ||
This is the most basic example, the entry can be identifyed as a "text string" because is null terminated (note how the ''' | This is the most basic example, the entry can be identifyed as a "text string" because is null terminated (note how the '''text_string_lenght'''=5 of the example below includes the null byte 0x00 at the end) | ||
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | ||
Line 130: | Line 58: | ||
! Offset !! Length !! Example !! Name !! Notes | ! Offset !! Length !! Example !! Name !! Notes | ||
|- | |- | ||
| 0x00 || 0x04 || 00 00 00 05 || ''' | | 0x00 || 0x04 || 00 00 00 05 || '''text_string_lenght''' || | ||
|- | |- | ||
| 0x04 || ''varies'' || | | 0x04 || ''varies'' || 54 65 73 74 || '''text_string''' || This string indicates the data entry type | ||
|- | |- | ||
| ''varies'' || 0x01 || 00 || '''null''' || This is the null termination of the previous string | | ''varies'' || 0x01 || 00 || '''null''' || This is the null termination of the previous string | ||
|} | |} | ||
=====HTML (stored as a single text string | =====HTML (stored as a single text string===== | ||
The fileformat allows to store HTML files as standard | The fileformat allows to store HTML files as standard string data, null terminated (so it falls under the same characteristics as a standard text string). Because this reason, the only way to identify it in PC is by reading the first bytes of the string (if it starts with '''<nowiki><!DOCTYPE HTML</nowiki>''' is a HTML) | ||
To extract the data as a HTML file is needed to remove the null byte at the end (and the null byte at the end needs to be added when the HTML file is injected back) | To extract the data as a HTML file is needed to remove the null byte at the end (and the null byte at the end needs to be added when the HTML file is injected back) | ||
Line 153: | Line 81: | ||
<nowiki>00000070 3A 6C 69 6E 6B 09 09 09 7B 66 6F 6E 74 3A 38 70 :link...{font:8p</nowiki> | <nowiki>00000070 3A 6C 69 6E 6B 09 09 09 7B 66 6F 6E 74 3A 38 70 :link...{font:8p</nowiki> | ||
<nowiki>00000080 74 2F 31 31 70 74 20 76 65 72 64 61 6E 61 3B 20 t/11pt verdana; </nowiki> | <nowiki>00000080 74 2F 31 31 70 74 20 76 65 72 64 61 6E 61 3B 20 t/11pt verdana; </nowiki> | ||
<nowiki>00000090 63 6F 6C 6F 72 3A 72 65 64 7D 0A 09 09 09 09 09 color:red | <nowiki>00000090 63 6F 6C 6F 72 3A 72 65 64 7D 0A 09 09 09 09 09 color:red}......</nowiki> | ||
<nowiki>000000A0 09 61 3A 76 69 73 69 74 65 64 09 09 7B 66 6F 6E .a:visited..{fon</nowiki> | <nowiki>000000A0 09 61 3A 76 69 73 69 74 65 64 09 09 7B 66 6F 6E .a:visited..{fon</nowiki> | ||
<nowiki>000000B0 74 3A 38 70 74 2F 31 31 70 74 20 76 65 72 64 61 t:8pt/11pt verda</nowiki> | <nowiki>000000B0 74 3A 38 70 74 2F 31 31 70 74 20 76 65 72 64 61 t:8pt/11pt verda</nowiki> | ||
Line 208: | Line 136: | ||
! Offset !! Length !! Example !! Name !! Notes | ! Offset !! Length !! Example !! Name !! Notes | ||
|- | |- | ||
| 0x00 || 0x04 || 00 00 03 A9 || ''' | | 0x00 || 0x04 || 00 00 03 A9 || '''text_string_lenght''' || Size of the HTML file | ||
|- | |- | ||
| ''varies''|| | | 0x04 || ''varies'' || this is the HTML file... long || '''text_string''' || This string indicates the data entry type (the first bytes are '''<nowiki><!DOCTYPE HTML</nowiki>''' for this entry type) | ||
|- | |- | ||
| ''varies''|| 0x01 || 00 || ''' | | ''varies'' || 0x01 || 00 || '''null''' || This is the null termination at the end of the HTML file (needed to remove to extract the data as a HTML file) | ||
|} | |} | ||
{{File Formats}} | {{File Formats}} | ||
<noinclude>[[Category:Main]]</noinclude> | <noinclude>[[Category:Main]]</noinclude> |