Pmd2 SIR0: Difference between revisions

From ProjectPokemon Wiki
Jump to navigation Jump to search
(Created the SIR0 page. Might need formatting and etc.)
 
(Forgot about the End of File Data Block. I got no data on it, but if anyone does, please add to it !)
Line 45: Line 45:
|  
|  
|  
|  
| End of File Data Block
| [[#End of File Data Block|End of File Data Block]]
| A block of data at the end of the file. Its purpose and format are still unknown..
| A block of data at the end of the file. Its purpose and format are still unknown..
|-
|-
Line 95: Line 95:
| 4 bytes of zeros.
| 4 bytes of zeros.
|}
|}
=== End of File Data Block ===

Revision as of 03:50, 12 December 2014


The SIR0 format is a pretty common wrapper file format. Its also fairly simple.

Also, when it gets loaded into memory, its magic number turns from SIR0 to SIRO, and all the offset its header contains are modified to be offset relative to the NDS's memory.

File Structure

Overview

Offset Length Endianness Type Name Description
0x00 16 Header The SIR0 header
After Header Varies Content Data The data wrapped by the SIR0.
After Content Data Varies Content Padding Some 0xAA padding bytes inserted to align the next section on 16 bytes. May be omitted completely if not required.
After Content Padding Varies End of File Data Block A block of data at the end of the file. Its purpose and format are still unknown..
After End of File Data Block Varies End of File Padding Some 0xAA padding bytes to make the file end on a size divisible by 16 bytes with no leftovers.

Header

SIR0 header. (Total length 16 bytes)
Offset Length Endianness Type Name Description
0x00 4 big Magic Number The 4 ASCII characters for "SIR0" (0x53 0x49 0x52 0x30)
0x04 4 little uint32 Pointer to Content's Header A pointer to the header of the data the SIR0 contains. If there are no headers, it points to the first byte after the SIR0 header.
0x08 4 little uint32 Pointer to End of File Data A pointer to a block of data located after the contained data.
0x0C 4 Null 4 bytes of zeros.

End of File Data Block