<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.temlib.org/AtariForumWiki/index.php?action=history&amp;feed=atom&amp;title=GEM_Metafile_file_format</id>
	<title>GEM Metafile file format - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.temlib.org/AtariForumWiki/index.php?action=history&amp;feed=atom&amp;title=GEM_Metafile_file_format"/>
	<link rel="alternate" type="text/html" href="https://www.temlib.org/AtariForumWiki/index.php?title=GEM_Metafile_file_format&amp;action=history"/>
	<updated>2026-05-06T18:17:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.2</generator>
	<entry>
		<id>https://www.temlib.org/AtariForumWiki/index.php?title=GEM_Metafile_file_format&amp;diff=13464&amp;oldid=prev</id>
		<title>&gt;Lp: moved GEM Meta file format to GEM Metafile file format: spelling error</title>
		<link rel="alternate" type="text/html" href="https://www.temlib.org/AtariForumWiki/index.php?title=GEM_Metafile_file_format&amp;diff=13464&amp;oldid=prev"/>
		<updated>2017-01-20T07:02:23Z</updated>

		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/AtariForumWiki/index.php/GEM_Meta_file_format&quot; class=&quot;mw-redirect&quot; title=&quot;GEM Meta file format&quot;&gt;GEM Meta file format&lt;/a&gt; to &lt;a href=&quot;/AtariForumWiki/index.php/GEM_Metafile_file_format&quot; title=&quot;GEM Metafile file format&quot;&gt;GEM Metafile file format&lt;/a&gt;: spelling error&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:02, 20 January 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>&gt;Lp</name></author>
	</entry>
	<entry>
		<id>https://www.temlib.org/AtariForumWiki/index.php?title=GEM_Metafile_file_format&amp;diff=13463&amp;oldid=prev</id>
		<title>&gt;Lp: New page</title>
		<link rel="alternate" type="text/html" href="https://www.temlib.org/AtariForumWiki/index.php?title=GEM_Metafile_file_format&amp;diff=13463&amp;oldid=prev"/>
		<updated>2017-01-20T07:00:51Z</updated>

		<summary type="html">&lt;p&gt;New page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
GEM Meta file    *.GEM&lt;br /&gt;
&lt;br /&gt;
Files ending in '.GEM' are graphic metafiles created by GDOS. They are usually used to&lt;br /&gt;
represent vector graphics but may also be used to store links to bitmap images and&lt;br /&gt;
textual information. Two primary versions of GEM files exist. Version 1 files are&lt;br /&gt;
guaranteed not to contain bezier curves whereas version 3 files may. Version 3.xx files&lt;br /&gt;
are also commonly referred to as GEM/3 files.&lt;br /&gt;
&lt;br /&gt;
The Metafile Header (see META_HEADER structure)&lt;br /&gt;
&lt;br /&gt;
GEM metafiles begin with a header as follows:&lt;br /&gt;
&lt;br /&gt;
 WORD   Contents&lt;br /&gt;
  0     Magic number (0xFFFF).&lt;br /&gt;
  1     Header length in WORDs.&lt;br /&gt;
  2     Version number (major * 100 + minor).&lt;br /&gt;
  3     NDC Flag as follows: Value Meaning 0 (0, 0) in lower-left corner (NDC) &lt;br /&gt;
                                           2 (0, 0) in upper-left corner (RC)&lt;br /&gt;
  4     Minimum X extent.&lt;br /&gt;
  5     Minimum Y extent.&lt;br /&gt;
  6     Maximum X extent.&lt;br /&gt;
  7     Maximum Y extent.&lt;br /&gt;
  8     Page width in tenths of millimeters.&lt;br /&gt;
  9     Page height in tenths of millimeters.&lt;br /&gt;
 10     Lower Left X value of coordinate system.&lt;br /&gt;
 11     Lower Left Y value of coordinate system.&lt;br /&gt;
 12     Upper Right X value of coordinate system.&lt;br /&gt;
 13     Upper Right Y value of coordinate system.&lt;br /&gt;
 ...    Other information may appear in the header following which is&lt;br /&gt;
        currently undefined. Use WORD #1 to skip any unknown information.&lt;br /&gt;
&lt;br /&gt;
The definition of WORDs 4-13 is defined by the creator of the file using three metafile&lt;br /&gt;
commands. WORDs 4-7 are set with the v_meta_extents() function. WORDs 8-9 are defined&lt;br /&gt;
with the vm_pagesize() function. WORDs 10-13 are defined with vm_coords(). If the creator&lt;br /&gt;
fails to specify defaults for any of these values, the appropriate values will be set to&lt;br /&gt;
0 in the header. If zeros appear for WORDs 10-13, the default NDC coordinate system&lt;br /&gt;
should be assumed.&lt;br /&gt;
&lt;br /&gt;
Metafile Records:&lt;br /&gt;
&lt;br /&gt;
Following the header will appear a list of records of varying length which, when&lt;br /&gt;
translated, can be 'played back' on the destination VDI device. Each record is formatted&lt;br /&gt;
as follows:&lt;br /&gt;
&lt;br /&gt;
        WORD    Meaning&lt;br /&gt;
        0       Opcode of VDI function.&lt;br /&gt;
        1       Number of PTSIN elements.&lt;br /&gt;
        2       Number of INTIN elements.&lt;br /&gt;
        3       Function sub-ID.&lt;br /&gt;
        4...    PTSIN elements.&lt;br /&gt;
        ...     INTIN elements.&lt;br /&gt;
&lt;br /&gt;
The list of records is terminated with an opcode of 0xFFFF (this record is written when a&lt;br /&gt;
v_clswk() call is made by the creator). When playing back GEM files, the application must&lt;br /&gt;
translate all coordinates from the metafile coordinate system to that of the destination&lt;br /&gt;
device. In addition, text metrics should be appropriately converted. If an unknown opcode&lt;br /&gt;
is discovered it should be played after any elements of the PTSIN array are translated&lt;br /&gt;
(making the assumption that they should be).&lt;br /&gt;
&lt;br /&gt;
Metafile Sub-Opcodes:&lt;br /&gt;
&lt;br /&gt;
GEM metafiles support the use of special sub-opcodes for implementing reserved and&lt;br /&gt;
user-defined functions. GEM metafile translators should ignore sub-opcodes they don't&lt;br /&gt;
understand. Each sub-opcode can be identified with the primary opcode of 5, function ID&lt;br /&gt;
of 99 and the first (required) member of INTIN being the sub-opcode ID. The currently&lt;br /&gt;
defined sub-opcodes are as follows:&lt;br /&gt;
&lt;br /&gt;
    INTIN[0]    Meaning&lt;br /&gt;
      10        Start Group.&lt;br /&gt;
      11        End Group.&lt;br /&gt;
      49        Set No Line Style.&lt;br /&gt;
      50        Set Attribute Shadow On.&lt;br /&gt;
      51        Set Attribute Shadow Off.&lt;br /&gt;
      80        Start Draw Area Type Primitive.&lt;br /&gt;
      81        End Draw Area Type Primitive.&lt;br /&gt;
&lt;br /&gt;
None of the pre-defined sub-opcodes use additional INTIN or PTSIN elements though&lt;br /&gt;
user-defined sub-opcodes may.&lt;br /&gt;
&lt;br /&gt;
Opcodes from 0-100 are reserved for use by Atari. Sub-opcodes from 101-65535 are&lt;br /&gt;
available for use by developers but should be registered with Atari to avoid possible&lt;br /&gt;
conflicts.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Back to [[ST Picture Formats]]&lt;/div&gt;</summary>
		<author><name>&gt;Lp</name></author>
	</entry>
</feed>