]> GEM Metafile
  •  Back 
  •  %Main 
  •  Index 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : ATARI ST Picture formats
Author      : David Baggett/Jan K⌐upka
Version     : atari_gf.hyp 0.01 (17/09/96)
Subject     : Documentation/File formats
Nodes       : 52
Index Size  : 1328
HCP-Version : 3
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : 
@help       : 
@options    : -i -s +y +z
@width      : 75GEM Metafile  *.GEM

Marcel Boom <mboom@mswe.dnet.ms.philips.nl> recently sent me this
format description.  I have reproduced it here, largely unchanged.

The file consists out of a header and the data records. The header has
the following format:

wordword = 2 bytes
 mf_header:         should be -1, which indicates a metafile
wordword = 2 bytes
 mf_hlength:        The length of the header part (usually 24 words)
wordword = 2 bytes
 mf_version:        Version number (usually 101)
wordword = 2 bytes
 mf_ndcrcfl:        0: NDC coordinates, 2: Raster coordinates
wordword = 2 bytes
 mf_extends1:       Optional, minimal used x coordinate
wordword = 2 bytes
 mf_extends2:       Optional, minimal used y coordinate
wordword = 2 bytes
 mf_extends3:       Optional, maximal used x coordinate
wordword = 2 bytes
 mf_extends4:       Optional, maximal used y coordinate
wordword = 2 bytes
 mf_width:          Optional, page width in 0.1 mm
wordword = 2 bytes
 mf_height:         Optional, page height in 0.1 mm
wordword = 2 bytes
 mf_coords1:        Optional, coordinate system param 1
wordword = 2 bytes
 mf_coords2:        Optional, coordinate system param 2
wordword = 2 bytes
 mf_coords3:        Optional, coordinate system param 3
wordword = 2 bytes
 mf_coords4:        Optional, coordinate system param 4
wordword = 2 bytes
 mf_imgflag:        0: No images, 1 contains bit images
wordword = 2 bytes
 mf_reserved1:      reserved.
.
.
wordword = 2 bytes
 mf_reserved9:      reserved.

After the header follows the data records of the following format:

wordword = 2 bytes
 0:                 VDI command number
wordword = 2 bytes
 1:                 n: Number of parameters for ptsin array
wordword = 2 bytes
 2:                 m: Number of parameters for intin array
wordword = 2 bytes
 3:                 Subopcode
wordword = 2 bytes
 4 to 4+n:          ptsin array
wordword = 2 bytes
 4+n to 4+n+m:      intin array

A VDI command number of -1 signals the end of file.

  The meaning of the arrays can be found in the several GEM programming
books.
  NOTE: The wordword = 2 bytes
 qualifier is not the Motorola word, but the Intel word,
so high and low byte are swapped!