DVM.TXT


Remove Frame

DESCRIPTION DVM FORMAT (v1.0, v2.0, v3.0, v3.1 and v4.0)
========================================================

HEADER

3 bytes:        "DVM"
1 byte:         version 1.0: "Q": quarter screen, "F": full screen.
		higher versions: "V".
Only with version 2.0 and higher:
	1 byte version: Left nibble before point, right nibble after point.
	1 byte infobyte: Bits contain the following information:
		bit 7:    0: quarter screen (160x100)    Version 2.0 and higher
			  1: full screen (320x200)
		bit 6:    0: not compressed
			  1: compressed
		bit 5:    0: standard palette (see next page)
			  1: enhanced palette
		bit 4, 2: 11: 2 colors                   Version 3.0 and higher
			  01: 4 colors                   (Version 3.x can only
			  00: 16 colors                  handle 16 and 256
			  10: 256 colors                 colors)
		bit 3:    0: no text                     Version 3.1 and higher
			  1: text exists
		bit 1:    0: not one enhanced palette    Version 4.0 and higher
			     for whole DVM
			  1: one enhanced palette for 
			     whole DVM (bit 5 should be 1)
1 word: time (ms) to wait after each frame.
If text exists:
	1 word: number of characters:
	x bytes: characters.
If one enhanced palette for whole file:
	number_of_colors*3 bytes 6 bits palette.
	palette saved as (r0, g0, b0, r1, g1, b1, ..., rx, gx, bx)

N.B. with version 1.0 the shower should define infobyte like this:
	If full screen: a0h = 160d
	If quarter screen: 20h = 32d

FRAME DATA

If enhanced palette:
	number_of_colors*3 bytes 6 bits palette.
	
Frame data: 
>From left to right, from top to bottom. For example, if you have a 160x100
uncompressed DVM file, each frame has a size of 16000 bytes. The first 160
bytes contain the colors of the pixels on the first row, the second 160
bytes
contain the colors of the pixels on the second row, and so on.

If compressed: number of bits needed are placed after each other.
(for example, for 4 colors you need 2 bits, so in a byte can be 8/2=4 
information bytes. To get them:
	b1:=usebyte and $c0 shr 12;
	b2:=usebyte and $30 shr 8;
	b3:=usebyte and $0c shr 4;
	b4:=usebyte and $03; )



The DVM format was created by Magic Software Rotterdam and may only be
modified by members of Magic Software Rotterdam.



For any questions or suggestions:

Bert Greevenbosch
Roestmos 12
3069 AR  Rotterdam
The Netherlands

Telephone:
+31-10-4215920