MxCh: Difference between revisions

From LEGO Island Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 17: Line 17:
| Chunk Size || 4 || 4-byte integer specifying the size of this chunk minus the first 8 bytes
| Chunk Size || 4 || 4-byte integer specifying the size of this chunk minus the first 8 bytes
|-
|-
| ''Unknown'' || 8 || Unknown data
| ''Flags?'' || 8 || 2-bytes whose purpose are not completely clear, but appear to be some kind of flags (16 appears to mean it's a "split" chunk and 2 appears to mean it's an ending chunk. Ending chunks have no data).
|-
| ID || 10 || 4-byte integer that identifies which MxOb this belongs to.
|-
| ''Milliseconds?'' || 14 || 4-byte integer that appears to be the chunk's offset in milliseconds increasing continuously (1000, 2000, 3000, etc.)
|-
| Chunk Data Size || 18 || 4-byte integer for the size of the data following the header.
|-
|-
| Data || 22 || Arbitrary data no more than "Chunk Size - 14" in bytes (14 for the 22-byte header minus the first 8 bytes)
| Data || 22 || Arbitrary data no more than "Chunk Size - 14" in bytes (14 for the 22-byte header minus the first 8 bytes)
|}
|}
=== "Split" Chunk? ===
In addition to the datas being split into chunks, it also appears the chunks themselves can be split arbitrarily and have another chunk of data inserted between them. If a chunk is split, both chunks will have the ''Flags?'' section set to 16. They'll also both have the same ''Milliseconds?'' value. The "Chunk Size" will be accurate to each chunk's size, but the "Chunk Data Size" of the first chunk appears to be the total size of both chunks' data. The second chunk's "Chunk Data Size" is accurate to its own chunk data size. This is newly discovered information and may not be completely accurate.

Revision as of 00:07, 27 April 2019

MxCh is the identifier for a Lego Island data chunk. They are seen extensively in SI Files to allow interleaving of several different data types.

MxCh chunks contain partial data of various different data types intended to be joined together continuously to form a complete file (an MxDa section). The chunks can also contain solely header data. A chunk will almost never contain a complete file on its own.

Specification

NOTE: This information is incomplete and requires more research and information.

The MxCh header is 22 bytes long and specifies the length of the chunk with other data.

Bytes Offset Description
"MxCh" 0 4-byte chunk identifier
Chunk Size 4 4-byte integer specifying the size of this chunk minus the first 8 bytes
Flags? 8 2-bytes whose purpose are not completely clear, but appear to be some kind of flags (16 appears to mean it's a "split" chunk and 2 appears to mean it's an ending chunk. Ending chunks have no data).
ID 10 4-byte integer that identifies which MxOb this belongs to.
Milliseconds? 14 4-byte integer that appears to be the chunk's offset in milliseconds increasing continuously (1000, 2000, 3000, etc.)
Chunk Data Size 18 4-byte integer for the size of the data following the header.
Data 22 Arbitrary data no more than "Chunk Size - 14" in bytes (14 for the 22-byte header minus the first 8 bytes)

"Split" Chunk?

In addition to the datas being split into chunks, it also appears the chunks themselves can be split arbitrarily and have another chunk of data inserted between them. If a chunk is split, both chunks will have the Flags? section set to 16. They'll also both have the same Milliseconds? value. The "Chunk Size" will be accurate to each chunk's size, but the "Chunk Data Size" of the first chunk appears to be the total size of both chunks' data. The second chunk's "Chunk Data Size" is accurate to its own chunk data size. This is newly discovered information and may not be completely accurate.