Jack Orlando AVX
- Company: TopWare
- Extension: avx
This is a rather weird multi-layered format that starts with a constant amount of audio and has block structure that may contain one or more FLX animations with different parameters.
Overall file header:
16-bit number of FLX animations in the file 8-bit number - always 4? 8-bit number - audio depth (8 for raw PCM or 16 for IMA ADPCM compressed audio) N bytes - audio data (0x27100 bytes for 8-bit audio and 0x1AEC0 for 16-bit audio)
Then block data follows using the following block header format: 32-bit block size and some other 32-bit number.
FLX animations start with the following header:
4 bytes - "FLX\0" 2 bytes - number of frames 2 bytes - width 2 bytes - height 2 bytes - frames per second 8 bytes - unknown
FLX frames start with 16-bit frame type and 32-bit size (which includes the header). Known frame types are:
- 0 - intra frame plus audio
- 1 - inter frame plus audio
- 2 - inter frame with an additional RLE compression plus audio
- 4 - palette
Palette type can be determined from its size: 768+6 bytes mean 24-bit RGB palette while 512+6 bytes mean RGB565 palette.
In case of 16-bit audio it is compressed using IMA ADPCM with the default predictors and state not being reset during the decoding. Audio data is stored in interleaved 32-bit little-endian word per channel and it should be decoded from low nibble first.
Video data consists of (skip, copy)
byte pairs followed by pixel data to copy (colour value 0 also means skip). Inter frames start with 32-bit offset in the frame at which decoding should begin. Frame type 2 additionally starts with 32-bit size of unpacked data. Its RLE scheme is very simple: if byte value is not 0xFF
then copy it verbatim, otherwise read run value and its repeat length.