<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://temlib.org/AtariForumWiki2018/index.php?action=history&amp;feed=atom&amp;title=Spectrum_512_Extended_file_format</id>
		<title>Spectrum 512 Extended file format - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://temlib.org/AtariForumWiki2018/index.php?action=history&amp;feed=atom&amp;title=Spectrum_512_Extended_file_format"/>
		<link rel="alternate" type="text/html" href="https://temlib.org/AtariForumWiki2018/index.php?title=Spectrum_512_Extended_file_format&amp;action=history"/>
		<updated>2026-10-19T05:47:09Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://temlib.org/AtariForumWiki2018/index.php?title=Spectrum_512_Extended_file_format&amp;diff=9667&amp;oldid=prev</id>
		<title>AtariWikiSysop: 2 revisions imported</title>
		<link rel="alternate" type="text/html" href="https://temlib.org/AtariForumWiki2018/index.php?title=Spectrum_512_Extended_file_format&amp;diff=9667&amp;oldid=prev"/>
				<updated>2018-06-03T23:13:49Z</updated>
		
		<summary type="html">&lt;p&gt;2 revisions imported&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 23:13, 3 June 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&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>AtariWikiSysop</name></author>	</entry>

	<entry>
		<id>https://temlib.org/AtariForumWiki2018/index.php?title=Spectrum_512_Extended_file_format&amp;diff=9666&amp;oldid=prev</id>
		<title>Lp: moved Spectrum 512 Extended to Spectrum 512 Extended file format: For consistency</title>
		<link rel="alternate" type="text/html" href="https://temlib.org/AtariForumWiki2018/index.php?title=Spectrum_512_Extended_file_format&amp;diff=9666&amp;oldid=prev"/>
				<updated>2017-01-03T00:00:13Z</updated>
		
		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/AtariForumWiki2018/index.php/Spectrum_512_Extended&quot; class=&quot;mw-redirect&quot; title=&quot;Spectrum 512 Extended&quot;&gt;Spectrum 512 Extended&lt;/a&gt; to &lt;a href=&quot;/AtariForumWiki2018/index.php/Spectrum_512_Extended_file_format&quot; title=&quot;Spectrum 512 Extended file format&quot;&gt;Spectrum 512 Extended file format&lt;/a&gt;: For consistency&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 00:00, 3 January 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&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>Lp</name></author>	</entry>

	<entry>
		<id>https://temlib.org/AtariForumWiki2018/index.php?title=Spectrum_512_Extended_file_format&amp;diff=9665&amp;oldid=prev</id>
		<title>Lp: New page</title>
		<link rel="alternate" type="text/html" href="https://temlib.org/AtariForumWiki2018/index.php?title=Spectrum_512_Extended_file_format&amp;diff=9665&amp;oldid=prev"/>
				<updated>2017-01-02T23:59:31Z</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;
Spectrum 512 Extended    *.SPX&lt;br /&gt;
&lt;br /&gt;
SPX files are extended Spectrum files with more than 200 lines in the picture, &lt;br /&gt;
designed by Gizmo of Electronic Images. With a SPX creator like SPXCRT14.PRG &lt;br /&gt;
multiple spectrum pictures can be attached to become one big .SPX file. There &lt;br /&gt;
are two known versions of the format. Version 2 files of the format can be &lt;br /&gt;
packed as a whole (including the header) with either Ice 2.10 or Atomik 3.5.&lt;br /&gt;
&lt;br /&gt;
3  bytes        'SPX', SPX magic header&lt;br /&gt;
1  byte         version (01 or 02)&lt;br /&gt;
1  byte         graphics compression flag, 0 = unpacked&lt;br /&gt;
1  byte         palette compression flag, 0 = unpacked&lt;br /&gt;
1  byte         number of 32000 byte screens&lt;br /&gt;
3  bytes        reserved&lt;br /&gt;
?? bytes        NULL terminated author string&lt;br /&gt;
?? bytes        NULL terminated description string&lt;br /&gt;
4  bytes        size of (packed) graphics data in bytes&lt;br /&gt;
4  bytes        size of (packed) palette data in bytes&lt;br /&gt;
?? bytes        (packed) graphics data&lt;br /&gt;
?? bytes        (packed) palette data&lt;br /&gt;
&lt;br /&gt;
The number of lines in the picture can be calculated by deviding the size of &lt;br /&gt;
the unpacked graphics data by 160. The unpacked SPX picture can be treated as a &lt;br /&gt;
Spectrum screen with more than 200 lines.&lt;br /&gt;
&lt;br /&gt;
In version 1 when a compression flag is set the data is packed with Ice 2.10.&lt;br /&gt;
&lt;br /&gt;
In version 2 a special packer is used, graphics and palettes are packed in one chunk.&lt;br /&gt;
4 bytes         depacked size&lt;br /&gt;
4 bytes         packed size&lt;br /&gt;
Like the Ice packer data is packed from end of file to start. The depakcer starts&lt;br /&gt;
to read data from packed data start+packed size and to write data to &lt;br /&gt;
depacked data start+depacked size. A long is read form packed data into a bitbuffer, &lt;br /&gt;
when the bitbuffer is empty it is refilled with a new long from the packed file. &lt;br /&gt;
With getbits(n) the n most significat bytes are read from the bitbuffer.&lt;br /&gt;
while(bytes read&amp;lt;depacked size)&lt;br /&gt;
  getbits(1)&lt;br /&gt;
    0 : literals&lt;br /&gt;
        len = getbits(4*(getbits(2)+1))&lt;br /&gt;
        read len bytes with getbits(8) and write them to the destination&lt;br /&gt;
        if(len&amp;lt;&amp;gt;$ffff) do a ptr_len&lt;br /&gt;
    1 : ptr_len&lt;br /&gt;
        ptr = getbits(4*(getbits(2)+1))&lt;br /&gt;
        len = getbits(4*(getbits(2)+1))&lt;br /&gt;
        copy len+3 bytes from ptr&lt;br /&gt;
Note: after a literal there is always a ptr_len except when len was $ffff.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See also [[Spectrum 512 file format]]&lt;br /&gt;
&lt;br /&gt;
Back to [[ST Picture Formats]]&lt;/div&gt;</summary>
		<author><name>Lp</name></author>	</entry>

	</feed>