home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / FAQSYS18.ZIP / FAQS.DAT / DVM_FORM.TXT < prev    next >
Internet Message Format  |  1995-10-13  |  3KB

  1. From: Bert.Greevenbosch@mmm.xs4all.nl (Bert Greevenbosch)
  2. Date: 27 Feb 95 18:45:00 
  3. Newsgroups: comp.os.msdos.programmer
  4. Subject: DVM movie file format
  5. Organization: Multi Media Master, +31-(0)10-4204461
  6.  
  7. DESCRIPTION DVM FORMAT (v1.0, v2.0, v3.0 and v3.1)
  8. ==================================================
  9.  
  10. HEADER
  11.  
  12. 3 bytes:        "DVM"
  13. 1 byte:         version 1.0: "Q": quarter screen, "F": full screen.
  14.         higher versions: "V".
  15. Only by versions 2.0 and higher:
  16.     1 byte version: Left nibble before point, right nibble after point.
  17.     1 byte infobyte: Bits got the folowing information:
  18.         bit 7:  0: quarter screen (160x100)     Version 2.0 and higher
  19.             1: full screen (320x200)
  20.         bit 6:  0: not compressed
  21.             1: compressed
  22.         bit 5:  0: standard palette (see next page)
  23.             1: enhanced palette
  24.         bit 4:  0: 16 colors                    Version 3.0 and higher
  25.             1: 256 colors
  26.         bit 3:  0: no text                      Version 3.1 and higher
  27.             1: text exist
  28. 1 word: time (ms) to wait after each frame.
  29. If text exist:
  30.     1 word: number of characters:
  31.     x bytes: characters.
  32.  
  33. N.B. by version 1.0 the shower should define infobyte like this:
  34.     If full screen: a0h = 160d
  35.     If quarter screen: 20h = 32d
  36.  
  37. FRAMEDATA
  38.  
  39. If enhanced palette:
  40.     If 16 colors: 48 bytes 6 bits rgb palette (r0, g0, b0, r1, g1, b1,
  41.                            ..., r15, g15, b15)
  42.     If 256 colors: 768 bytes rgb palette (0..255)
  43.  
  44. Framedata: 
  45. >From left to right, from top to bottom. 
  46. Example (quarter screen uncompressed):
  47.  
  48.     var
  49.        bt: byte;
  50.        fi: file;
  51.        x, y: word;
  52.     (...)
  53.     for y:=0 to 99 do
  54.        for x:=0 to 159 do
  55.        begin
  56.           blockread(fi,bt,1);
  57.           putpixel(x,y,bt);
  58.        end;
  59.  
  60. If compressed: Left nibble = byte 1, right nibble = byte 2.
  61. Example (quarter screen compressed):
  62.  
  63.     var
  64.        bt: byte;
  65.        fi: file;
  66.        x, y: word;
  67.     (...)
  68.     for y:=0 to 99 do
  69.        for x:=0 to 79 do
  70.        begin
  71.           blockread(fi,bt,1);
  72.           putpixel(x*2,y,(bt and $f0) shr 4);
  73.           putpixel(x*2+1,y,bt and $0f);
  74.        end;
  75.  
  76. STANDARD PALETTE
  77.  
  78. Does not exist in file, should be included with viewer.
  79. Can be created like this;
  80.  
  81.     var
  82.        palette: array [0..255] of record red, green, blue: byte; end;
  83.        b, c, g, r: byte;
  84.     (...)
  85.     for c:=0 to 15 do
  86.        with palette[c] do
  87.        begin
  88.           red:=round(c*4.2);
  89.           green:=round(c*4.2);
  90.           blue:=round(c*4.2);
  91.        end;
  92.     for r:=0 to 5 do
  93.        for g:=0 to 5 do
  94.           for b:=0 to 5 do
  95.          with palette[r*36+g*6+b+16] do
  96.          begin
  97.             red:=round(r*12.6);
  98.             green:=round(g*12.6);
  99.             blue:=round(b*12.6);
  100.          end;
  101.     for c:=0 to 7 do
  102.        begin
  103.           with palette[232+c] do
  104.           begin
  105.          red:=c*9;
  106.          green:=0;
  107.          blue:=0;
  108.           end;
  109.           with palette[240+c] do
  110.           begin
  111.          red:=0;
  112.          green:=c*9;
  113.          blue:=0;
  114.           end;
  115.           with palette[248+c] do
  116.           begin
  117.          red:=0;
  118.          green:=0;
  119.          blue:=c*9;
  120.           end;
  121.        end;
  122.  
  123. The DVM format was created by Magic Software and may only be modified by
  124. members of Magic Software.
  125.  
  126. Any questions or suggestions? Write me!
  127. E-mail: bert.greevenbosch@mmm.xs4all.nl
  128. -------------------------------------------------------------------------------
  129.     -> Internet: Bert.Greevenbosch@mmm.xs4all.nl
  130.                  ..\|/ Multi Media Master +31-10-4204461 \|/..
  131.     -> Standard disclaimer: The views of this user are strictly his own <-
  132. -------------------------------------------------------------------------------
  133.  
  134.