MxCh: Difference between revisions

663 bytes added ,  27 April 2019
no edit summary
No edit summary
No edit summary
Line 28: Line 28:
|}
|}


=== "Split" Chunk? ===
=== 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.
In addition to the data being split into chunks, the chunks themselves are sometimes split into two. If a chunk is split, both chunks will have the ''Flags?'' section set to 16, and 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.
 
The necessity of the split chunks appears to be due to the way Lego Island streams SI files; it appears to only be able to stream 20000h (131072 bytes) at a time. Therefore the SI file itself can have no data that extends over a multiple of 20000h. Doing so causes Lego Island to crash as it tries to read beyond the 20000h buffer it's allocated for streaming. Therefore if a chunk is going to extend beyond 20000h, it must be split at that point and then another chunk must be written with the remainder of the data. This can be quite an obstacle to inserting audio that is larger than the existing audio, since literally all subsequent chunks of all subsequent songs must be shifted to fit around the 20000h multipliers, essentially necessitating a reconstruction of most, if not all, of the file.