Implementing Jack Orlando animation support

As I’m still working on my game tool, I decided to implement video format from the Jack Orlando game. So now na_game_tool has AVX support and I’d like to say something about the format.

The format is a rather weird mix of different things. It starts with a fixed-size audio block and that size depends on whether it’s 8-bit PCM or IMA ADPCM (with stereo samples packed into interleaved 32-bit words), it seems to have block structure where an arbitrary chunk of data is stored as 32-bit size plus block data which includes video data with accidental headers. Yes, the file internally may have several FLX animations with different framerates too, so e.g. a 16-fps piece of animation may be followed by 10- or 24-fps animation. And audio stream is global even if it’s stored in small chunks inside FLX (since you have several seconds of pre-roll audio in the beginning). Oh, and palette data may be stored as RGB565 or RGB24 (which you’re supposed to understand from palette chunk size). Video compression is simple but somewhat weird too, as RLE is used to optionally compress data before it gets decoded.

In either case weird does not mean bad and in my line of hobby an interesting codec is worth more than a popular one.

P.S. And there’s even weirder format known as Knowledge Adventure MOV. I gave up on REing it but apparently video there is split into tiles (4×2 or 2×1 pixels apparently) and frame data is those tile indices that may be stored uncompressed, RLE compressed or, apparently, using an arithmetic coder with static frequencies stored in the file header. The difficulty comes from self-modifying code and not the cute kind that simply modifies couple of instruction constant arguments but one that substitutes function call address with a pointer to a special memory buffer allocated in a context and filled elsewhere. In theory it can be figured out without much hassle with, say, a built-in DosBox debugger but I’m not inclined to do that (at least not now).

2 Responses to “Implementing Jack Orlando animation support”

  1. Paul says:

    Want to add fastest FFT implementation on Earth for modern CPUs?

    Join and contribute to the Librempeg project!

    We are exploring exciting new findings in science papers, like smallest number of instructions for WFT like types of algorithms of power of two, and also doing exciting research and new discoveries for non-power of two transforms in Winograd like Fourier Transforms algorithms.

    Skills wanted: unbiased and critical thinking process and deep math and computer knowledge and willing to explore new frontiers and bring new values to all communities over the world.

  2. Kostya says:

    Very nice advertisement indeed, I hope you’ll place it somewhere where other people can read it too.

    (Also pity that I don’t qualify.)

Leave a Reply