DMV

From MultimediaWiki
Jump to navigation Jump to search
  • Company: Brainstorm Technology
  • Extensions: dmv, mov

This is a video format that is remarkable for coding data for two video frames at one. It has no specific header and frames are always stored in blocks of size 0xAB15 bytes even if data may not make full use of it.

Block starts with 16-bit size of pixel data, 16-bit size of packed tile indices, 253-colour VGA palette (first three colours are unused), pixel data, and LZ77-compressed tile indices. Audio part always starts at offset 0x9D4D.

Frames are coded by splitting a pair of frames into 2x2x2 blocks and painting them with 1-8 colours (from pixel data) using one of 154 pre-defined patterns.

LZ77 compression scheme opcodes (in binary):

  • 000xxxxx -- copy xxxxx+1 bytes from input
  • 001xxxxx yyyyyyyy -- copy yyyyyyyyxxxxx+1 bytes from input
  • 010xxxxx yyyyyyyy -- copy xxxxx+1 bytes from already decoded output using offset yyyyyyyy+4
  • 011xxxxx yyyyyyyy zzzzzzzzz -- copy yyyyyyyyxxxxx+1 bytes from already decoded output using offset yyyyyyyy+4
  • 100xxxxx yyyyyyyy zzzzzzzzz -- copy xxxxx+1 bytes from already decoded output using offset zzzzzzzzyyyyyyyy+4
  • 101xxxxx wwwwwwww yyyyyyyy zzzzzzzzz -- copy wwwwwwwwxxxxx+1 bytes from already decoded output using offset zzzzzzzzyyyyyyyy+4

Games using DMV