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: | ||
==Description== | ==Description== | ||
SILKPADD ('''SILK''' <abbr title="Program ?">'''P'''...?</abbr> <abbr title="ADDresses ?">'''ADD'''...?</abbr>) | |||
*Located in path: | |||
**dev_flash/vsh/resource/silk/data/'''CEFramework.bin''' | |||
**dev_flash/vsh/resource/silk/data/'''CEHtmlApi.bin''' | |||
**dev_flash/vsh/resource/silk/data/'''CEHtmlUI.bin''' | |||
**dev_flash/vsh/resource/silk/data/'''CEPhWeb.bin''' | |||
**dev_flash/vsh/resource/silk/data/'''CEHtmlBrowserApp.bin''' (removed/replaced in firmware 2.20) | |||
**dev_flash/vsh/resource/silk/data/'''CEHtmlBrowserAppXaiWidget.bin''' (removed/replaced in firmware 2.20) | |||
**dev_flash/vsh/resource/silk_nas/data/'''CEFramework.bin''' | |||
**dev_flash/vsh/resource/silk_nas/data/'''CEHtmlApi.bin''' | |||
**dev_flash/vsh/resource/silk_nas/data/'''CEHtmlUI.bin''' | |||
**dev_flash/vsh/resource/silk_nas/data/'''CEPhWeb.bin''' | |||
**dev_flash/vsh/resource/silk_webkit/data/'''CEFramework.bin''' | |||
**dev_flash/vsh/resource/silk_webkit/data/'''CEHtmlApi.bin''' | |||
**dev_flash/vsh/resource/silk_webkit/data/'''CEHtmlUI.bin''' | |||
**dev_flash/vsh/resource/silk_webkit/data/'''webcoreapp.bin''' | |||
==Structure== | ==Structure== | ||
Line 81: | Line 30: | ||
! 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 || '''entry_count''' || Number of entries in the file ( | | 0x0A || 0x02 || 0C 00 || '''entry_count''' || 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=== | ||
The index table starts at offset 0x10, every entry in the index table is 0xC bytes | The index table starts at offset 0x10, every entry in the index table is 0xC bytes lenght and is composed by 3 values. All values in the index table are in little endian. There is no gap or padding at the end of the index table | ||
Example of the first entry in the index table of CEHtmlApi.bin | Example of the first entry in the index table of CEHtmlApi.bin | ||
Line 104: | Line 53: | ||
! Offset !! Length !! Example !! Name !! Notes | ! Offset !! Length !! Example !! Name !! Notes | ||
|- | |- | ||
| 0x00 || 0x04 || B9 0B 00 00 || '''data_id''' || A unique ID for the data, used by the web browser to identify and to access the data ( | | 0x00 || 0x04 || B9 0B 00 00 || '''data_id''' || A unique ID for the data, used by the web browser to identify and to access the data (in little endian) | ||
|- | |- | ||
| 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 (in little endian) | ||
|- | |- | ||
| 0x08 || 0x04 || 9B 00 00 00 || ''' | | 0x08 || 0x04 || 9B 00 00 00 || '''data_lenght''' || Size of the data (in little endian) | ||
|} | |} | ||
Line 117: | Line 66: | ||
====Data types==== | ====Data types==== | ||
All data entries starts with 4 bytes + a text string. The first 4 bytes indicates the length of the text string located inmediatly after. So the first bytes that needs to be readed are the 4 bytes + the | All data entries starts with 4 bytes + a text string. The first 4 bytes indicates the length of the text string located inmediatly after. So the first bytes that needs to be readed 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 79: | ||
! 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''' || Lenght of the next text string + 1 null byte at the end (in big endian) | ||
|- | |- | ||
| 0x04 || ''varies'' || | | 0x04 || ''varies'' || 54 65 73 74 || '''text_string''' || A normal text string (starting with random characters that doesnt matches the search patterns for the other data type checks) | ||
|- | |- | ||
| ''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 | ||
Line 153: | Line 102: | ||
<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 157: | ||
! 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 + 1 null byte at the end (in big endian) | ||
|- | |- | ||
| 0x04 || ''varies'' || <nowiki><!DOCTYPE HTML</nowiki>, etc... || '''text_string''' || HTML file | | 0x04 || ''varies'' || <nowiki><!DOCTYPE HTML</nowiki>, etc... || '''text_string''' || HTML file | ||
Line 235: | Line 184: | ||
! Offset !! Length !! Example !! Name !! Notes | ! Offset !! Length !! Example !! Name !! Notes | ||
|- | |- | ||
| 0x00 || 0x04 || 00 00 00 08 || ''' | | 0x00 || 0x04 || 00 00 00 08 || '''text_string_lenght''' || Lenght of the next text string (in big endian) | ||
|- | |- | ||
| 0x04 || 0x08 || CEBinary || ''' | | 0x04 || 0x08 || CEBinary || '''text_string''' || CEBinary data type. Without the null termination ! | ||
|- | |- | ||
| 0x0C || 0x02 || 00 00 || | | 0x0C || 0x02 || 00 00 || ''unknown'' || Always zeroes ? | ||
|- | |- | ||
| 0x0E || 0x04 || 00 00 00 09 || ''' | | 0x0E || 0x04 || 00 00 00 09 || '''text_string_lenght''' || Lenght of the next text string (in big endian) | ||
|- | |- | ||
| 0x12 || ''varies'' || image\gif || ''' | | 0x12 || ''varies'' || image\gif || '''text_string''' || File type. Without the null termination !. Some predefined filetypes found:<br>'''image\png'''<br>'''image\gif'''<br>'''image\gifPushed''' (it seems this files are png)<br>'''image\ms-cursor''' (microsoft .cur file extension)<br>'''image\ms-icon''' (microsoft .ico file extension)<br>etc...<!--to fill later--> | ||
|- | |- | ||
| ''varies'' || 0x04 || 00 00 00 7C || '''file_legth''' || Indicates the size of the file ( | | ''varies'' || 0x04 || 00 00 00 7C || '''file_legth''' || Indicates the size of the file (in big endian) | ||
|- | |- | ||
| ''varies'' || ''varies'' || GIF, etc... || '''file_data''' || This is the file | | ''varies'' || ''varies'' || GIF, etc... || '''file_data''' || This is the file | ||
Line 251: | Line 200: | ||
=====CEDialog===== | =====CEDialog===== | ||
The '''CEDialog''' is a complex data type that represents the root of a hierarchy of parent/chidren/brothers. Every one of them have an unique ID | The '''CEDialog''' is a complex data type that represents the root of a hierarchy of parent/chidren/brothers. Every one of them have an unique ID | ||
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 282: | Line 231: | ||
! Offset !! Length !! Example !! Name !! Notes | ! Offset !! Length !! Example !! Name !! Notes | ||
|- | |- | ||
| 0x00 || 0x04 || 00 00 00 08 || ''' | | 0x00 || 0x04 || 00 00 00 08 || '''text_string_lenght''' || Lenght of the next text string (in big endian) | ||
|- | |- | ||
| 0x04 || 0x08 || CEDialog || ''' | | 0x04 || 0x08 || CEDialog || '''text_string''' || CEDialog data type. Without the null termination ! | ||
|- | |- | ||
| 0x0C || | | 0x0C || 0x04 || 00 00 27 56 || '''data_id''' || Unique ID, is the same type of ID than the ones at the index table<br>The ID of CEDialog (root of this hierarchy) is the only that appears duplicated in the index, the IDs of the childrens of CEDialog doesnt appears in the index table | ||
|- | |- | ||
| | | 0x10 || 0x04 || 00 00 00 00 || ''unknown'' || This one always increments. CERectComponent=0x0000000A, CELabel=0x0000002D, first CEbutton=0x0000003C, second CEbutton=0x00000073, third CEbutton=0x000000AA | ||
|- | |- | ||
| | | 0x14 || 0x04 || 00 00 00 00 || ''unknown'' || Always 0x00000064 for CEButton ?, CERectComponent=0x00000008, CELabel=0x00000019 | ||
|- | |- | ||
| | | 0x18 || 0x04 || 00 00 01 09 || ''unknown'' || Always 0x00000032 for CEButton ?, CERectComponent=0x00000020, CELabel=0x000000B4 | ||
|- | |- | ||
| | | 0x1C || 0x04 || 00 00 00 55 || ''unknown'' || Always 0x00000014 for CEButton ?, CERectComponent=0x00000020, CELabel=0x00000032 | ||
|- | |- | ||
| | | 0x20 || 0x01 || 00 || ''unknown'' || First CEbutton of the example = 0x1A, second=0x22, third=0x02. , CERectComponent=0x00, CELabel=0x00 | ||
|- | |- | ||
| | | 0x21 || 0x01 || 01 || ''unknown'' || First CEbutton of the example = 0xA8, second=0xA8, third=0xA8. , CERectComponent=0x00, CELabel=0x0B | ||
|- | |- | ||
| | | 0x22 || 0x01 || 00 || ''unknown'' || Always 0x00 for CEButton ?, CERectComponent=0x00, CELabel=0x20 | ||
|- | |- | ||
| | | 0x23 || 0x01 || 63 || ''unknown'' || Always 0x1B for CEButton ?, CERectComponent=0x83, CELabel=0x8B | ||
|- | |- | ||
| | | 0x24 || 0x04 || FF C0 C0 C0 || '''bg_color''' || Background color (in #ABGR format ?) | ||
|- | |- | ||
| | | 0x28 || 0x04 || FF 00 00 00 || '''color''' || Color (in #ABGR format ?) | ||
|- | |- | ||
| | | 0x2C || 0x04 || 00 00 00 0C || ''unknown'' || | ||
|- | |- | ||
| | | 0x30 || 0x04 || 00 00 00 05 || '''children_count''' || Number of "chidren" items under the root item '''CEDialog''' (in this example there are 5 childrens: CERectComponent, CELabel, CEButton, CEButton, CEButton) | ||
|- | |||
| 0x34 || 0x01 || 01 || '''read_next''' ? || Always 1 ? (and 0 for the last entry). Indicates if there is an entry next (or a brother at the same level of the hierarchy) ? | |||
|-{{cellcolors|lightgrey}} | |||
| 0x35 || colspan="4" | All the previous values seems to be definitions of the root '''CEDialog'''. After them continues with the definitions of the first children of the hierarchy named '''CERectComponent'''... and so on... | |||
|} | |} | ||
For | For CEButton at 0x30 | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Offset !! Length !! Example !! Name !! Notes | ! Offset !! Length !! Example !! Name !! Notes | ||
|- | |- | ||
| 0x30 || 0x04 || 00 00 00 | | 0x30 || 0x04 || 00 00 00 03 || '''text_string_lenght''' || Lenght of the next text string + the null byte (in big endian) | ||
|- | |- | ||
| 0x34 || | | 0x34 || ''varies'' || Ok || '''text_string''' || Ok, Cancel, Retry, etc... | ||
| | |- | ||
| ''varies'' || 0x01 || 00 || '''null''' || | |||
|- | |- | ||
| ''varies''|| 0x02 || 00 00 || ''unknown'' || Always zero ? | |||
|- | |- | ||
| | | ''varies'' || 0x01 || 01 || ''unknown'' || Always 1 ? | ||
|} | |} | ||
For CELabel at 0x30 (same than CEButton, but | For CELabel at 0x30 (same than CEButton, but with a zero bytes lenght text string) | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Offset !! Length !! Example !! Name !! Notes | ! Offset !! Length !! Example !! Name !! Notes | ||
|- | |- | ||
| 0x30 || 0x04 || 00 00 00 00 || ''' | | 0x30 || 0x04 || 00 00 00 00 || '''text_string_lenght''' ? || | ||
|- | |- | ||
| | | ''varies''|| 0x02 || 00 00 || ''unknown'' || Always zero ? | ||
|- | |- | ||
| | | ''varies'' || 0x01 || 01 || ''unknown'' || Always 1 ? | ||
|} | |} | ||
For | For CERectComponent at 0x30 | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Offset !! Length !! Example !! Name !! Notes | ! Offset !! Length !! Example !! Name !! Notes | ||
|- | |- | ||
| ''varies'' || 0x01 || 01 || ''unknown'' || Always 1 ? | |||
| ''varies'' || 0x01 || | |||
|} | |} | ||
Line 369: | Line 311: | ||
***0x275B (10075 in decimal) - CEButton (fifth children) with the text '''Retry''' | ***0x275B (10075 in decimal) - CEButton (fifth children) with the text '''Retry''' | ||
***The ID of the root is the same of the index table (converted to decimal in the "SILKPADD editor" app to 10070), the IDs of the 5 childrens of 10070 doesnt appears on the index but are 10071, 10072, 10073, 10074, 10075. This is why the next CEDialog ID in the index inmediatly after 10070 is 100076 (because the IDs 10071 up to 10075 are used by the 5 childrens of 10070) | ***The ID of the root is the same of the index table (converted to decimal in the "SILKPADD editor" app to 10070), the IDs of the 5 childrens of 10070 doesnt appears on the index but are 10071, 10072, 10073, 10074, 10075. This is why the next CEDialog ID in the index inmediatly after 10070 is 100076 (because the IDs 10071 up to 10075 are used by the 5 childrens of 10070) | ||
*Some items found... (the list could be huge) | |||
**CERectComponent - Rectangled frame ? | |||
**CELabel - ? | |||
**CEButton - Displays a text string (and probably a button icon next to it). The 3 CEButtons of this example displays the text strings: '''Ok''', '''Cancel''', and '''Retry''' | |||
**etc... | |||
=====CEMenu===== | =====CEMenu===== | ||
The ''' | The '''CEDialog''' is a complex data type that represents the root of a hierarchy of parent/chidren/brothers. Every one of them have an unique ID | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Offset !! Length !! Example !! Name !! Notes | ! Offset !! Length !! Example !! Name !! Notes | ||
|- | |- | ||
| | | 0x00 || 0x04 || 00 00 00 06 || '''text_string_lenght''' || Lenght of the next text string (in big endian) | ||
|- | |- | ||
| | | 0x04 || 0x06 || CEMenu || '''text_string''' || CEMenu data type. Without the null termination ! | ||
|- | |- | ||
| | | 0x0A || 0x04 || 00 00 75 BB || '''data_id''' || Unique ID, is the same type of ID than the ones at the index table<br>The ID of CEMenu (root of this hierarchy) is the only that appears duplicated in the index, the IDs of the childrens of CEMenu doesnt appears in the index table | ||
|-{{cellcolors|lightgrey}} | |||
| 0x0E || colspan="4" | Etc... | |||
|- | |||
| | |||
|} | |} | ||
{{File Formats}} | {{File Formats}} | ||
<noinclude>[[Category:Main]]</noinclude> | <noinclude>[[Category:Main]]</noinclude> |