.VAS Documented

The Caesar .VAS battle animation format

The two animations on the battle screen, LOSE0001 and WINS0001, are not videos. Each frame is a list of byte runs to XOR onto the four planes of a .VPX picture, so the animation accumulates over whatever the screen already shows.

Used by Caesar

Layout

The player loads the whole file and, for each frame in turn, reads that frame's 32-bit offset from a table near the start. For each of the four planes it selects the plane and XORs that plane's block onto the screen, stepping to the next block by the block's own length. Each frame is drawn onto both display pages.

The file

The rest of the first 0x14 bytes is not used by the player.

OffsetSizeTypeFieldDescription
+0x022u16frame count + 1One more than the number of frames.
+0x144 × framesu32[]frame offsetsOne 32-bit offset per frame, into the file. LOSE0001.VAS has 21 frames, WINS0001.VAS 20.

A frame: four plane blocks, back to back

The plane is the same 16,000-byte quarter a .VPX block decodes to: pixel 4i + p is byte i of plane p.

OffsetSizeTypeFieldDescription
+02u16block lengthFrom the start of this block to the start of the next.
+22u16plane sizeAlways 16000.
+44bytesskippedThe decoder steps over these.
+8runsu16[]runsEach a word w. If bit 15 is set, XOR the next (w & 0x7FFF) + 1 bytes of the file onto the plane. Otherwise skip (w & 0x7FFF) + 1 bytes of the plane. Runs continue until their counts reach the plane size.

Sources