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=== | ||
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 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 (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 47: | ||
====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 60: | ||
! 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 | ||
|} | |} | ||
=====HTML (stored as a single text string | =====HTML (stored as a single text string===== | ||
The fileformat allows to store HTML files as standard text string data, and are also null terminated (so it falls under the same characteristics as a standard text string). Because this reason, the only way to identify this data type in PC is by reading the first bytes of the string (if it starts with '''<nowiki><!DOCTYPE HTML</nowiki>''' is a HTML) | The fileformat allows to store HTML files as standard text string data, and are also null terminated (so it falls under the same characteristics as a standard text string). Because this reason, the only way to identify this data type in PC is by reading the first bytes of the string (if it starts with '''<nowiki><!DOCTYPE HTML</nowiki>''' is a HTML) | ||
Line 153: | Line 83: | ||
<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 138: | ||
! 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 165: | ||
! 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 || ''' | | ''varies'' || 0x04 || 00 00 00 7C || '''file_leght''' || 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 | ||
|} | |} | ||
=====CEMenu===== | |||
=====CEDialog===== | =====CEDialog===== | ||
The '''CEDialog''' is a complex data type that represents the root of a hierarchy of parent/chidren/brothers | 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 (and this IDs seems to be consecutive) | ||
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | |||
00000000 00 00 00 08 43 45 44 69 61 6C 6F 67 00 00 27 56 ....CEDialog..'V | |||
00000010 00 00 00 00 00 00 00 00 00 00 01 09 00 00 00 55 ...............U | |||
00000020 00 01 00 63 FF C0 C0 C0 FF 00 00 00 00 00 00 0C ...cÿÀÀÀÿ....... | |||
00000030 00 00 00 05 01 00 00 00 0F 43 45 52 65 63 74 43 .........CERectC | |||
00000040 6F 6D 70 6F 6E 65 6E 74 00 00 27 57 00 00 00 0A omponent..'W.... | |||
00000050 00 00 00 08 00 00 00 20 00 00 00 20 00 00 00 83 ....... ... ...ƒ | |||
00000060 FF FF FF FF FF 00 00 00 00 00 00 0C 01 00 00 00 ÿÿÿÿÿ........... | |||
00000070 07 43 45 4C 61 62 65 6C 00 00 27 58 00 00 00 2D .CELabel..'X...- | |||
00000080 00 00 00 19 00 00 00 B4 00 00 00 32 00 0B 20 8B .......´...2.. ‹ | |||
00000090 FF FF FF FF FF 00 00 00 00 00 00 0C 00 00 00 00 ÿÿÿÿÿ........... | |||
000000A0 00 00 01 00 00 00 08 43 45 42 75 74 74 6F 6E 00 .......CEButton. | |||
000000B0 00 27 59 00 00 00 3C 00 00 00 64 00 00 00 32 00 .'Y...<...d...2. | |||
000000C0 00 00 14 1A A8 00 1B FF C0 C0 C0 FF 00 00 00 00 ....¨..ÿÀÀÀÿ.... | |||
000000D0 00 00 0C 00 00 00 03 4F 6B 00 00 00 01 00 00 00 .......Ok....... | |||
000000E0 08 43 45 42 75 74 74 6F 6E 00 00 27 5A 00 00 00 .CEButton..'Z... | |||
000000F0 73 00 00 00 64 00 00 00 32 00 00 00 14 22 A8 00 s...d...2...."¨. | |||
00000100 1B FF C0 C0 C0 FF 00 00 00 00 00 00 0C 00 00 00 .ÿÀÀÀÿ.......... | |||
00000110 07 43 61 6E 63 65 6C 00 00 00 01 00 00 00 08 43 .Cancel........C | |||
00000120 45 42 75 74 74 6F 6E 00 00 27 5B 00 00 00 AA 00 EButton..'[...ª. | |||
00000130 00 00 64 00 00 00 32 00 00 00 14 02 A8 00 1B FF ..d...2.....¨..ÿ | |||
00000140 C0 C0 C0 FF 00 00 00 00 00 00 0C 00 00 00 06 52 ÀÀÀÿ...........R | |||
00000150 65 74 72 79 00 00 00 00 00 00 00 etry....... | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Offset !! Length !! Example !! Name !! Notes | ! Offset !! Length !! Example !! Name !! Notes | ||
|- | |- | ||
| | | 0x00 || 0x04 || 00 00 00 08 || '''text_string_lenght''' || Lenght of the next text string (in big endian) | ||
|- | |- | ||
| | | 0x04 || 0x08 || CEDialog || '''text_string''' || CEDialog data type. Without the null termination ! | ||
|- | |- | ||
| | | 0x0C || 0x02 || 00 00 || ''unknown'' || Always zeroes ? | ||
|- | |- | ||
| | | 0x0E || 0x02 || 27 56 || '''text_string_lenght''' || Unique ID for this CEDialog ! | ||
|- | |- | ||
| | | 0x10 || 0x0A || 00 00 00 00 00 00 00 00 00 00 || ''unknown'' || | ||
| | |||
|- | |- | ||
| | | 0x1A || 0x02 || 01 09 || ''unknown'' || | ||
|- | |- | ||
| | | 0x1C || 0x04 || 00 00 00 55 || ''unknown'' || | ||
|- | |- | ||
| | | 0x20 || 0x02 || 00 01 || ''unknown'' || | ||
|- | |- | ||
| | | 0x22 || 0x02 || 00 63 || ''unknown'' || | ||
|- | |- | ||
| | | 0x24 || 0x05 || FF C0 C0 C0 FF || ''unknown'' || This indicates something like "slot usage", it seems to have 2 posible values: 0xFFC0C0C0FF or 0xFFFFFFFFFF | ||
|- | |- | ||
| | | 0x29 || 0x01 || 00 || ''unknown'' || Always zero ?. Related with the previous value ? | ||
|- | |- | ||
| | | 0x2A || 0x02 || 00 00 || ''unknown'' || Always zero ?. Related with the previous value ? | ||
|- | |- | ||
| | | 0x2C || 0x04 || 00 00 00 0C || ''unknown'' || | ||
|- | |- | ||
| | | 0x30 || 0x04 || 00 00 00 05 || ''children_amount'' || Number of "chidren" items under the root item '''CEDialog''' (in this example there are 5 childrens: CERectComponent, CELabel, CEButton, CEButton, CEButton) | ||
|- | |- | ||
| '' | | rowspan="5" | All this previous values seeems to be definitions of the root '''CEDialog'''. After it continues with the first children of the hierarchy named '''CERectComponent'''... and so on... | ||
|} | |} | ||
*CELabel | |||
* | *CEButton | ||
*etc...<!--to fill later--> | |||
{{File Formats}} | {{File Formats}} | ||
<noinclude>[[Category:Main]]</noinclude> | <noinclude>[[Category:Main]]</noinclude> |