Pmd2 AT4PX: Difference between revisions
Jump to navigation
Jump to search
Psy commando (talk | contribs) m (added a more visible link to the PX compression page) |
Psy commando (talk | contribs) (Re-worded intro, added mention of SIR0 wrapped AT4PX) |
||
Line 2: | Line 2: | ||
[[Category:ROM Hacking]] | [[Category:ROM Hacking]] | ||
[[Category:Technical References]] | [[Category:Technical References]] | ||
The AT4PX container is a format used to contain compressed image data exclusively, as opposed to [[pmd2_PKDPX|PKDPX]] which is more of a generic compressed container. | {{DISPLAYTITLE:AT4PX File Format}} | ||
The AT4PX container is a format used to contain compressed image data exclusively, as opposed to [[pmd2_PKDPX|PKDPX]] which is more of a generic compressed container. | |||
Its not unusual to find AT4PX containers wrapped itself by a [[Pmd2_SIR0|SIR0]] container. | |||
Its content is compressed using a custom compression format dubbed [[pmd2_PX_Compression|PX Compression]] for the lack of a better name. | Its content is compressed using a custom compression format dubbed [[pmd2_PX_Compression|PX Compression]] for the lack of a better name. | ||
Line 50: | Line 52: | ||
== Credits == | == Credits == | ||
A big thanks to [https://github.com/Zhorken Zhorken]who figured out the header and the compression format! | A big thanks to [https://github.com/Zhorken Zhorken] who figured out the header and the compression format! |
Revision as of 19:19, 22 March 2015
The AT4PX container is a format used to contain compressed image data exclusively, as opposed to PKDPX which is more of a generic compressed container.
Its not unusual to find AT4PX containers wrapped itself by a SIR0 container.
Its content is compressed using a custom compression format dubbed PX Compression for the lack of a better name.
File Structure
The structure is very simple. A 18 bytes long header followed with the compressed data.
Offset | Length | Endianness | Type | Name | Description |
---|---|---|---|---|---|
0x00 | 5 | big | Magic Number | The magic number, made of the ASCII characters "AT4PX" {0x41, 0x54, 0x34, 0x50, 0x58} | |
0x05 | 2 | little | uint16 | Container Length | The length from the beginning of the header to the end of the compressed data. |
0x07 | 9 | byte array | Ctrl Flags Array | A list of flags to be used in decompressing the container's content. More detail about their purpose on the PX Compression page. They're really nybbles stored in the lower half of a single byte each. | |
0x10 | 2 | little | uint16 | Decompressed Data Length | This is the length of the raw input data before it was compressed. Note how the length of this field differ from the PKDPX format's own Decompressed Data Length ! |
0x12 | ..The PX compressed data begins immediately here!.. |
Credits
A big thanks to Zhorken who figured out the header and the compression format!