<?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_file_format</id>
		<title>Spectrum 512 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_file_format"/>
		<link rel="alternate" type="text/html" href="https://temlib.org/AtariForumWiki2018/index.php?title=Spectrum_512_file_format&amp;action=history"/>
		<updated>2026-10-19T01:58:35Z</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_file_format&amp;diff=9671&amp;oldid=prev</id>
		<title>AtariWikiSysop: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://temlib.org/AtariForumWiki2018/index.php?title=Spectrum_512_file_format&amp;diff=9671&amp;oldid=prev"/>
				<updated>2018-06-03T23:13:49Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision 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_file_format&amp;diff=9670&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_file_format&amp;diff=9670&amp;oldid=prev"/>
				<updated>2017-01-02T23:50:58Z</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    *.SPU&lt;br /&gt;
&lt;br /&gt;
80 words        first scan line of picture (unused) -- should be zeroes&lt;br /&gt;
15920 words     picture data (screen memory) for scan lines 1 through 199&lt;br /&gt;
9552 words      3 palettes for each scan line (the top scan line is&lt;br /&gt;
                not included because Spectrum 512 can't display it)&lt;br /&gt;
-----------&lt;br /&gt;
51104 bytes     total&lt;br /&gt;
&lt;br /&gt;
Note that the Spectrum 512 mode's three palette changes per scan&lt;br /&gt;
line allow more colors on the screen than normally possible, but a&lt;br /&gt;
tremendous amount of CPU time is required to maintain the image.&lt;br /&gt;
&lt;br /&gt;
The Spectrum format specifies a palette of 48 colors for each scan line.&lt;br /&gt;
To decode a Spectrum picture, one must be know which of these 48 colors&lt;br /&gt;
are in effect for a given horizontal pixel position.&lt;br /&gt;
&lt;br /&gt;
Given an x-coordinate (from 0 to 319) and a color index (from 0 to 15),&lt;br /&gt;
the following C function will return the proper index into the Spectrum&lt;br /&gt;
palette (from 0 to 47):&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
 *  Given an x-coordinate and a color index, returns the corresponding&lt;br /&gt;
 *  Spectrum palette index.&lt;br /&gt;
 *&lt;br /&gt;
 *  by Steve Belczyk; placed in the public domain December, 1990.&lt;br /&gt;
 */&lt;br /&gt;
int &lt;br /&gt;
FindIndex(x, c)&lt;br /&gt;
	int x, c;&lt;br /&gt;
{&lt;br /&gt;
	int x1;&lt;br /&gt;
&lt;br /&gt;
	x1 = 10 * c;&lt;br /&gt;
&lt;br /&gt;
	if (1 &amp;amp; c)		/* If c is odd */&lt;br /&gt;
		x1 = x1 - 5;&lt;br /&gt;
	else			/* If c is even */&lt;br /&gt;
		x1 = x1 + 1;&lt;br /&gt;
&lt;br /&gt;
	if (x &amp;gt;= x1 &amp;amp;&amp;amp; x &amp;lt; x1 + 160) &lt;br /&gt;
		c = c + 16;&lt;br /&gt;
	else if (x &amp;gt;= x1 + 160) &lt;br /&gt;
		c = c + 32;&lt;br /&gt;
&lt;br /&gt;
	return c;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Back to [[ST Picture Formats]]&lt;/div&gt;</summary>
		<author><name>Lp</name></author>	</entry>

	</feed>